numux 1.11.2 → 1.12.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/dist/numux.js +24 -1
- package/package.json +1 -1
package/dist/numux.js
CHANGED
|
@@ -22,7 +22,7 @@ var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports,
|
|
|
22
22
|
var require_package = __commonJS((exports, module) => {
|
|
23
23
|
module.exports = {
|
|
24
24
|
name: "numux",
|
|
25
|
-
version: "1.
|
|
25
|
+
version: "1.12.0",
|
|
26
26
|
description: "Terminal multiplexer with dependency orchestration",
|
|
27
27
|
type: "module",
|
|
28
28
|
license: "MIT",
|
|
@@ -2750,6 +2750,7 @@ class PrefixDisplay {
|
|
|
2750
2750
|
killOthers;
|
|
2751
2751
|
timestamps;
|
|
2752
2752
|
stopping = false;
|
|
2753
|
+
startTime = 0;
|
|
2753
2754
|
constructor(manager, config, options = {}) {
|
|
2754
2755
|
this.manager = manager;
|
|
2755
2756
|
this.logWriter = options.logWriter;
|
|
@@ -2782,6 +2783,7 @@ class PrefixDisplay {
|
|
|
2782
2783
|
`);
|
|
2783
2784
|
this.shutdown();
|
|
2784
2785
|
});
|
|
2786
|
+
this.startTime = Date.now();
|
|
2785
2787
|
const cols = process.stdout.columns || 80;
|
|
2786
2788
|
const rows = process.stdout.rows || 24;
|
|
2787
2789
|
await this.manager.startAll(cols, rows);
|
|
@@ -2865,6 +2867,17 @@ class PrefixDisplay {
|
|
|
2865
2867
|
process.exit(code === 0 ? 0 : 1);
|
|
2866
2868
|
});
|
|
2867
2869
|
}
|
|
2870
|
+
formatElapsed() {
|
|
2871
|
+
const ms = Date.now() - this.startTime;
|
|
2872
|
+
if (ms < 1000)
|
|
2873
|
+
return `${ms}ms`;
|
|
2874
|
+
const s = ms / 1000;
|
|
2875
|
+
if (s < 60)
|
|
2876
|
+
return `${s.toFixed(1)}s`;
|
|
2877
|
+
const m = Math.floor(s / 60);
|
|
2878
|
+
const rem = s % 60;
|
|
2879
|
+
return `${m}m ${rem.toFixed(0)}s`;
|
|
2880
|
+
}
|
|
2868
2881
|
printSummary() {
|
|
2869
2882
|
const states = this.manager.getAllStates();
|
|
2870
2883
|
const namePad = Math.max(...states.map((s) => s.name.length));
|
|
@@ -2883,6 +2896,16 @@ class PrefixDisplay {
|
|
|
2883
2896
|
`);
|
|
2884
2897
|
}
|
|
2885
2898
|
}
|
|
2899
|
+
const elapsed = this.formatElapsed();
|
|
2900
|
+
if (this.noColor) {
|
|
2901
|
+
process.stdout.write(`
|
|
2902
|
+
Done in ${elapsed}
|
|
2903
|
+
`);
|
|
2904
|
+
} else {
|
|
2905
|
+
process.stdout.write(`
|
|
2906
|
+
${DIM}Done in ${elapsed}${RESET}
|
|
2907
|
+
`);
|
|
2908
|
+
}
|
|
2886
2909
|
}
|
|
2887
2910
|
async shutdown() {
|
|
2888
2911
|
if (this.stopping)
|