numux 1.25.0 → 1.26.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/README.md +5 -2
- package/dist/numux.js +16 -3
- package/dist/types.d.ts +7 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# numux
|
|
2
2
|
|
|
3
|
-
Terminal multiplexer with dependency orchestration. Run multiple processes in a tabbed TUI with a dependency graph controlling startup order.
|
|
3
|
+
Terminal multiplexer with dependency orchestration. Run multiple processes in a tabbed TUI with a dependency graph controlling startup order, readiness detection, and output capture between processes.
|
|
4
|
+
|
|
5
|
+
Works with zero configuration — pass commands as arguments, run a script across monorepo workspaces with `-w`, or match multiple scripts with glob patterns like `'dev:*'`. For advanced setups, define a typed config with conditional processes, file watching with auto-restart, error detection, log persistence, and output capture — e.g. extract a port from one process's stdout and pass it to another process's command or env.
|
|
4
6
|
|
|
5
7
|
Inspired by `sst dev` and `concurrently`
|
|
6
8
|
|
|
@@ -164,7 +166,8 @@ Template properties (color, env, dependsOn, etc.) are inherited by all matched p
|
|
|
164
166
|
| `-p, --prefix` | Prefixed output mode (no TUI, for CI/scripts) |
|
|
165
167
|
| `--only <a,b,...>` | Only run these processes (+ their dependencies) |
|
|
166
168
|
| `--exclude <a,b,...>` | Exclude these processes |
|
|
167
|
-
| `--kill-others` | Kill all processes when any exits |
|
|
169
|
+
| `--kill-others` | Kill all processes when any exits (regardless of exit code) |
|
|
170
|
+
| `--kill-others-on-fail` | Kill all processes when any exits with a non-zero exit code |
|
|
168
171
|
| `--no-restart` | Disable auto-restart for crashed processes |
|
|
169
172
|
| `-s, --sort <mode>` | Tab display order: `config` (default), `alphabetical`, `topological` |
|
|
170
173
|
| `--no-watch` | Disable file watching even if config has `watch` patterns |
|
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: "1.
|
|
39
|
+
version: "1.26.0",
|
|
40
40
|
description: "Terminal multiplexer with dependency orchestration",
|
|
41
41
|
type: "module",
|
|
42
42
|
license: "MIT",
|
|
@@ -192,7 +192,13 @@ var FLAGS = [
|
|
|
192
192
|
type: "boolean",
|
|
193
193
|
long: "--kill-others",
|
|
194
194
|
key: "killOthers",
|
|
195
|
-
description: "Kill all processes when any exits"
|
|
195
|
+
description: "Kill all processes when any exits (regardless of exit code)"
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
type: "boolean",
|
|
199
|
+
long: "--kill-others-on-fail",
|
|
200
|
+
key: "killOthersOnFail",
|
|
201
|
+
description: "Kill all processes when any exits with non-zero code"
|
|
196
202
|
},
|
|
197
203
|
{
|
|
198
204
|
type: "boolean",
|
|
@@ -342,6 +348,7 @@ function parseArgs(argv) {
|
|
|
342
348
|
exec: false,
|
|
343
349
|
prefix: false,
|
|
344
350
|
killOthers: false,
|
|
351
|
+
killOthersOnFail: false,
|
|
345
352
|
timestamps: false,
|
|
346
353
|
noRestart: false,
|
|
347
354
|
noWatch: false,
|
|
@@ -1063,6 +1070,7 @@ function validateConfig(raw, warnings) {
|
|
|
1063
1070
|
const prefix = config.prefix === true ? true : undefined;
|
|
1064
1071
|
const timestamps = config.timestamps === true ? true : undefined;
|
|
1065
1072
|
const killOthers = config.killOthers === true ? true : undefined;
|
|
1073
|
+
const killOthersOnFail = config.killOthersOnFail === true ? true : undefined;
|
|
1066
1074
|
const noWatch = config.noWatch === true ? true : undefined;
|
|
1067
1075
|
const logDir = typeof config.logDir === "string" && config.logDir.trim() ? config.logDir.trim() : undefined;
|
|
1068
1076
|
const validated = {};
|
|
@@ -1167,6 +1175,7 @@ function validateConfig(raw, warnings) {
|
|
|
1167
1175
|
...prefix ? { prefix } : {},
|
|
1168
1176
|
...timestamps ? { timestamps } : {},
|
|
1169
1177
|
...killOthers ? { killOthers } : {},
|
|
1178
|
+
...killOthersOnFail ? { killOthersOnFail } : {},
|
|
1170
1179
|
...noWatch ? { noWatch } : {},
|
|
1171
1180
|
...logDir ? { logDir } : {},
|
|
1172
1181
|
processes: validated
|
|
@@ -3185,6 +3194,7 @@ class PrefixDisplay {
|
|
|
3185
3194
|
buffers = new Map;
|
|
3186
3195
|
logWriter;
|
|
3187
3196
|
killOthers;
|
|
3197
|
+
killOthersOnFail;
|
|
3188
3198
|
timestamps;
|
|
3189
3199
|
stopping = false;
|
|
3190
3200
|
startTime = 0;
|
|
@@ -3192,6 +3202,7 @@ class PrefixDisplay {
|
|
|
3192
3202
|
this.manager = manager;
|
|
3193
3203
|
this.logWriter = options.logWriter;
|
|
3194
3204
|
this.killOthers = options.killOthers ?? false;
|
|
3205
|
+
this.killOthersOnFail = options.killOthersOnFail ?? false;
|
|
3195
3206
|
this.timestamps = options.timestamps ?? false;
|
|
3196
3207
|
this.noColor = "NO_COLOR" in process.env;
|
|
3197
3208
|
const names = manager.getProcessNames();
|
|
@@ -3233,7 +3244,8 @@ class PrefixDisplay {
|
|
|
3233
3244
|
this.handleStatus(event.name, event.status);
|
|
3234
3245
|
} else if (event.type === "exit") {
|
|
3235
3246
|
this.flushBuffer(event.name);
|
|
3236
|
-
|
|
3247
|
+
const exitCode = this.manager.getState(event.name)?.exitCode ?? null;
|
|
3248
|
+
if (this.killOthers || this.killOthersOnFail && exitCode !== 0) {
|
|
3237
3249
|
this.killAllAndExit(event.name);
|
|
3238
3250
|
} else {
|
|
3239
3251
|
this.checkAllDone();
|
|
@@ -3805,6 +3817,7 @@ async function main() {
|
|
|
3805
3817
|
const display = new PrefixDisplay(manager, config, {
|
|
3806
3818
|
logWriter,
|
|
3807
3819
|
killOthers: parsed.killOthers || config.killOthers,
|
|
3820
|
+
killOthersOnFail: parsed.killOthersOnFail || config.killOthersOnFail,
|
|
3808
3821
|
timestamps: parsed.timestamps || config.timestamps
|
|
3809
3822
|
});
|
|
3810
3823
|
await display.start();
|
package/dist/types.d.ts
CHANGED
|
@@ -109,10 +109,15 @@ export interface NumuxConfig<K extends string = string> {
|
|
|
109
109
|
/** Add timestamps to prefixed output lines (only applies when `prefix` is true) */
|
|
110
110
|
timestamps?: boolean;
|
|
111
111
|
/**
|
|
112
|
-
* Kill all processes when any one exits
|
|
112
|
+
* Kill all processes when any one exits (regardless of exit code)
|
|
113
113
|
* @default false
|
|
114
114
|
*/
|
|
115
115
|
killOthers?: boolean;
|
|
116
|
+
/**
|
|
117
|
+
* Kill all processes when any one exits with a non-zero exit code
|
|
118
|
+
* @default false
|
|
119
|
+
*/
|
|
120
|
+
killOthersOnFail?: boolean;
|
|
116
121
|
/**
|
|
117
122
|
* Disable file watching even if processes have watch patterns
|
|
118
123
|
* @default false
|
|
@@ -133,6 +138,7 @@ export interface ResolvedNumuxConfig {
|
|
|
133
138
|
prefix?: boolean;
|
|
134
139
|
timestamps?: boolean;
|
|
135
140
|
killOthers?: boolean;
|
|
141
|
+
killOthersOnFail?: boolean;
|
|
136
142
|
noWatch?: boolean;
|
|
137
143
|
logDir?: string;
|
|
138
144
|
processes: Record<string, ResolvedProcessConfig>;
|