numux 2.0.0 → 2.0.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 +18 -6
- package/package.json +5 -2
package/dist/numux.js
CHANGED
|
@@ -36,7 +36,7 @@ var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports,
|
|
|
36
36
|
var require_package = __commonJS((exports, module) => {
|
|
37
37
|
module.exports = {
|
|
38
38
|
name: "numux",
|
|
39
|
-
version: "2.0.
|
|
39
|
+
version: "2.0.2",
|
|
40
40
|
description: "Terminal multiplexer with dependency orchestration",
|
|
41
41
|
type: "module",
|
|
42
42
|
license: "MIT",
|
|
@@ -72,7 +72,8 @@ var require_package = __commonJS((exports, module) => {
|
|
|
72
72
|
test: "bun test",
|
|
73
73
|
typecheck: "bunx tsc --noEmit",
|
|
74
74
|
lint: "biome check .",
|
|
75
|
-
fix: "biome check . --fix --unsafe"
|
|
75
|
+
fix: "biome check . --fix --unsafe",
|
|
76
|
+
prepare: "git config core.hooksPath .githooks"
|
|
76
77
|
},
|
|
77
78
|
files: [
|
|
78
79
|
"dist/"
|
|
@@ -83,6 +84,8 @@ var require_package = __commonJS((exports, module) => {
|
|
|
83
84
|
},
|
|
84
85
|
devDependencies: {
|
|
85
86
|
"@biomejs/biome": "^2.4.4",
|
|
87
|
+
"@commitlint/cli": "^20.4.2",
|
|
88
|
+
"@commitlint/config-conventional": "^20.4.2",
|
|
86
89
|
"@types/bun": "^1.3.9"
|
|
87
90
|
}
|
|
88
91
|
};
|
|
@@ -402,6 +405,15 @@ function parseArgs(argv) {
|
|
|
402
405
|
}
|
|
403
406
|
return result;
|
|
404
407
|
}
|
|
408
|
+
var RUNNERS = new Set(["npm", "npx", "yarn", "pnpm", "bun", "bunx"]);
|
|
409
|
+
function deriveProcessName(cmd) {
|
|
410
|
+
const parts = cmd.split(/\s+/);
|
|
411
|
+
const first = parts[0].split("/").pop();
|
|
412
|
+
if (parts.length > 1 && RUNNERS.has(first)) {
|
|
413
|
+
return parts[parts.length - 1];
|
|
414
|
+
}
|
|
415
|
+
return first;
|
|
416
|
+
}
|
|
405
417
|
function buildConfigFromArgs(commands, named, options) {
|
|
406
418
|
const processes = {};
|
|
407
419
|
const colors = options?.colors;
|
|
@@ -412,7 +424,7 @@ function buildConfigFromArgs(commands, named, options) {
|
|
|
412
424
|
}
|
|
413
425
|
for (let i = 0;i < commands.length; i++) {
|
|
414
426
|
const cmd = commands[i];
|
|
415
|
-
let name = cmd
|
|
427
|
+
let name = deriveProcessName(cmd);
|
|
416
428
|
if (processes[name]) {
|
|
417
429
|
name = `${name}-${i}`;
|
|
418
430
|
}
|
|
@@ -1577,7 +1589,7 @@ class ProcessRunner {
|
|
|
1577
1589
|
`;
|
|
1578
1590
|
this.handler.onOutput(encoder.encode(msg));
|
|
1579
1591
|
}
|
|
1580
|
-
this.handler.onStatus(
|
|
1592
|
+
this.handler.onStatus("running");
|
|
1581
1593
|
this.startReadyTimeout(gen);
|
|
1582
1594
|
this.proc.exited.then((code) => {
|
|
1583
1595
|
if (this.generation !== gen)
|
|
@@ -3253,7 +3265,7 @@ class PrefixDisplay {
|
|
|
3253
3265
|
const decoder = this.decoders.get(name) ?? new TextDecoder;
|
|
3254
3266
|
const text = decoder.decode(data, { stream: true });
|
|
3255
3267
|
const buffer = (this.buffers.get(name) ?? "") + text;
|
|
3256
|
-
const lines = buffer.split(/\r
|
|
3268
|
+
const lines = buffer.split(/\r\n|\n|\r/);
|
|
3257
3269
|
this.buffers.set(name, lines.pop() ?? "");
|
|
3258
3270
|
for (const line of lines) {
|
|
3259
3271
|
this.printLine(name, line);
|
|
@@ -3736,7 +3748,7 @@ async function main() {
|
|
|
3736
3748
|
}
|
|
3737
3749
|
for (let i = 0;i < otherCommands.length; i++) {
|
|
3738
3750
|
const cmd = otherCommands[i];
|
|
3739
|
-
let name = cmd
|
|
3751
|
+
let name = deriveProcessName(cmd);
|
|
3740
3752
|
if (processes[name])
|
|
3741
3753
|
name = `${name}-${i}`;
|
|
3742
3754
|
processes[name] = cmd;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "numux",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"description": "Terminal multiplexer with dependency orchestration",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -36,7 +36,8 @@
|
|
|
36
36
|
"test": "bun test",
|
|
37
37
|
"typecheck": "bunx tsc --noEmit",
|
|
38
38
|
"lint": "biome check .",
|
|
39
|
-
"fix": "biome check . --fix --unsafe"
|
|
39
|
+
"fix": "biome check . --fix --unsafe",
|
|
40
|
+
"prepare": "git config core.hooksPath .githooks"
|
|
40
41
|
},
|
|
41
42
|
"files": [
|
|
42
43
|
"dist/"
|
|
@@ -47,6 +48,8 @@
|
|
|
47
48
|
},
|
|
48
49
|
"devDependencies": {
|
|
49
50
|
"@biomejs/biome": "^2.4.4",
|
|
51
|
+
"@commitlint/cli": "^20.4.2",
|
|
52
|
+
"@commitlint/config-conventional": "^20.4.2",
|
|
50
53
|
"@types/bun": "^1.3.9"
|
|
51
54
|
}
|
|
52
55
|
}
|