numux 1.12.0 → 1.12.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/dist/numux.js +39 -10
- package/package.json +1 -1
package/dist/numux.js
CHANGED
|
@@ -5,15 +5,29 @@ var __getProtoOf = Object.getPrototypeOf;
|
|
|
5
5
|
var __defProp = Object.defineProperty;
|
|
6
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
function __accessProp(key) {
|
|
9
|
+
return this[key];
|
|
10
|
+
}
|
|
11
|
+
var __toESMCache_node;
|
|
12
|
+
var __toESMCache_esm;
|
|
8
13
|
var __toESM = (mod, isNodeMode, target) => {
|
|
14
|
+
var canCache = mod != null && typeof mod === "object";
|
|
15
|
+
if (canCache) {
|
|
16
|
+
var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
|
|
17
|
+
var cached = cache.get(mod);
|
|
18
|
+
if (cached)
|
|
19
|
+
return cached;
|
|
20
|
+
}
|
|
9
21
|
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
10
22
|
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
11
23
|
for (let key of __getOwnPropNames(mod))
|
|
12
24
|
if (!__hasOwnProp.call(to, key))
|
|
13
25
|
__defProp(to, key, {
|
|
14
|
-
get: (
|
|
26
|
+
get: __accessProp.bind(mod, key),
|
|
15
27
|
enumerable: true
|
|
16
28
|
});
|
|
29
|
+
if (canCache)
|
|
30
|
+
cache.set(mod, to);
|
|
17
31
|
return to;
|
|
18
32
|
};
|
|
19
33
|
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
@@ -22,7 +36,7 @@ var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports,
|
|
|
22
36
|
var require_package = __commonJS((exports, module) => {
|
|
23
37
|
module.exports = {
|
|
24
38
|
name: "numux",
|
|
25
|
-
version: "1.12.
|
|
39
|
+
version: "1.12.2",
|
|
26
40
|
description: "Terminal multiplexer with dependency orchestration",
|
|
27
41
|
type: "module",
|
|
28
42
|
license: "MIT",
|
|
@@ -1705,11 +1719,13 @@ class ProcessManager {
|
|
|
1705
1719
|
const maxRestarts = proc.maxRestarts;
|
|
1706
1720
|
if (maxRestarts !== undefined && attempt >= maxRestarts) {
|
|
1707
1721
|
log(`[${name}] Reached maxRestarts limit (${maxRestarts}), not restarting`);
|
|
1708
|
-
|
|
1709
|
-
|
|
1722
|
+
if (maxRestarts > 0) {
|
|
1723
|
+
const encoder2 = new TextEncoder;
|
|
1724
|
+
const msg2 = `\r
|
|
1710
1725
|
\x1B[31m[numux] reached restart limit (${maxRestarts}), giving up\x1B[0m\r
|
|
1711
1726
|
`;
|
|
1712
|
-
|
|
1727
|
+
this.emit({ type: "output", name, data: encoder2.encode(msg2) });
|
|
1728
|
+
}
|
|
1713
1729
|
return;
|
|
1714
1730
|
}
|
|
1715
1731
|
const delay = Math.min(BACKOFF_BASE_MS * 2 ** attempt, BACKOFF_MAX_MS);
|
|
@@ -1930,7 +1946,6 @@ class Pane {
|
|
|
1930
1946
|
if (selection?.isActive && !selection.isDragging) {
|
|
1931
1947
|
const text = selection.getSelectedText();
|
|
1932
1948
|
if (text) {
|
|
1933
|
-
renderer.copyToClipboardOSC52(text);
|
|
1934
1949
|
this._onCopy?.(text);
|
|
1935
1950
|
}
|
|
1936
1951
|
}
|
|
@@ -2375,7 +2390,8 @@ class App {
|
|
|
2375
2390
|
async start() {
|
|
2376
2391
|
this.renderer = await createCliRenderer({
|
|
2377
2392
|
exitOnCtrlC: false,
|
|
2378
|
-
useMouse: true
|
|
2393
|
+
useMouse: true,
|
|
2394
|
+
useKittyKeyboard: {}
|
|
2379
2395
|
});
|
|
2380
2396
|
const { width, height } = this.renderer;
|
|
2381
2397
|
const maxNameLen = Math.max(...this.names.map((n) => n.length));
|
|
@@ -2415,7 +2431,10 @@ class App {
|
|
|
2415
2431
|
for (const name of this.names) {
|
|
2416
2432
|
const interactive = this.config.processes[name].interactive === true;
|
|
2417
2433
|
const pane = new Pane(this.renderer, name, termCols, termRows, interactive);
|
|
2418
|
-
pane.onCopy(() =>
|
|
2434
|
+
pane.onCopy((text) => {
|
|
2435
|
+
this.copyToClipboard(text);
|
|
2436
|
+
this.statusBar.showTemporaryMessage("Copied!");
|
|
2437
|
+
});
|
|
2419
2438
|
pane.onScroll(() => {
|
|
2420
2439
|
if (this.searchMode && this.searchMatches.length > 0 && this.activePane === name) {
|
|
2421
2440
|
this.updateSearchHighlights();
|
|
@@ -2465,7 +2484,7 @@ class App {
|
|
|
2465
2484
|
});
|
|
2466
2485
|
this.renderer.keyInput.on("keypress", (key) => {
|
|
2467
2486
|
log(key);
|
|
2468
|
-
if (key.
|
|
2487
|
+
if (key.super && key.name === "c") {
|
|
2469
2488
|
this.copySelection();
|
|
2470
2489
|
return;
|
|
2471
2490
|
}
|
|
@@ -2601,6 +2620,16 @@ class App {
|
|
|
2601
2620
|
this.tabBar.setInputWaiting(name, false);
|
|
2602
2621
|
}
|
|
2603
2622
|
}
|
|
2623
|
+
copyToClipboard(text) {
|
|
2624
|
+
this.renderer.copyToClipboardOSC52(text);
|
|
2625
|
+
const cmd = process.platform === "darwin" ? "pbcopy" : process.platform === "linux" ? "xclip -selection clipboard" : null;
|
|
2626
|
+
if (cmd) {
|
|
2627
|
+
const [bin, ...args] = cmd.split(" ");
|
|
2628
|
+
const proc = Bun.spawn([bin, ...args], { stdin: "pipe" });
|
|
2629
|
+
proc.stdin.write(text);
|
|
2630
|
+
proc.stdin.end();
|
|
2631
|
+
}
|
|
2632
|
+
}
|
|
2604
2633
|
copySelection() {
|
|
2605
2634
|
const selection = this.renderer.getSelection();
|
|
2606
2635
|
if (!selection?.isActive)
|
|
@@ -2608,7 +2637,7 @@ class App {
|
|
|
2608
2637
|
const text = selection.getSelectedText();
|
|
2609
2638
|
if (!text)
|
|
2610
2639
|
return false;
|
|
2611
|
-
this.
|
|
2640
|
+
this.copyToClipboard(text);
|
|
2612
2641
|
this.renderer.clearSelection();
|
|
2613
2642
|
this.statusBar.showTemporaryMessage("Copied!");
|
|
2614
2643
|
return true;
|