numux 2.6.1 → 2.7.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/README.md +13 -1
- package/dist/numux.js +25 -9
- package/dist/types.d.ts +1 -1
- package/package.json +6 -3
package/README.md
CHANGED
|
@@ -59,7 +59,7 @@ export default defineConfig({
|
|
|
59
59
|
|
|
60
60
|
The `defineConfig()` helper is optional — it provides type checking for your config.
|
|
61
61
|
|
|
62
|
-
Processes can be a string (shorthand for `{ command: "..." }`) or a full config object.
|
|
62
|
+
Processes can be a string (shorthand for `{ command: "..." }`), `true` or `{}` (auto-resolves to a matching `package.json` script), or a full config object.
|
|
63
63
|
|
|
64
64
|
Then run:
|
|
65
65
|
|
|
@@ -159,6 +159,18 @@ export default defineConfig({
|
|
|
159
159
|
|
|
160
160
|
Template properties (color, env, dependsOn, etc.) are inherited by all matched processes. Colors given as an array are distributed round-robin.
|
|
161
161
|
|
|
162
|
+
When a process has no command and its name matches a `package.json` script, the command is auto-resolved:
|
|
163
|
+
|
|
164
|
+
```ts
|
|
165
|
+
export default defineConfig({
|
|
166
|
+
processes: {
|
|
167
|
+
lint: true, // → bun run lint
|
|
168
|
+
typecheck: { dependsOn: ['db'] }, // → bun run typecheck (with dependency)
|
|
169
|
+
db: 'docker compose up postgres', // explicit command, not resolved
|
|
170
|
+
},
|
|
171
|
+
})
|
|
172
|
+
```
|
|
173
|
+
|
|
162
174
|
### Options
|
|
163
175
|
|
|
164
176
|
| Flag | Description |
|
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.
|
|
39
|
+
version: "2.7.1",
|
|
40
40
|
description: "Terminal multiplexer with dependency orchestration",
|
|
41
41
|
type: "module",
|
|
42
42
|
license: "MIT",
|
|
@@ -79,14 +79,17 @@ var require_package = __commonJS((exports, module) => {
|
|
|
79
79
|
"dist/"
|
|
80
80
|
],
|
|
81
81
|
dependencies: {
|
|
82
|
-
"@opentui/core": "^0.1.
|
|
83
|
-
"ghostty-opentui": "^1.4.
|
|
82
|
+
"@opentui/core": "^0.1.88",
|
|
83
|
+
"ghostty-opentui": "^1.4.7"
|
|
84
84
|
},
|
|
85
85
|
devDependencies: {
|
|
86
86
|
"@biomejs/biome": "^2.4.4",
|
|
87
87
|
"@commitlint/cli": "^20.4.2",
|
|
88
88
|
"@commitlint/config-conventional": "^20.4.2",
|
|
89
89
|
"@types/bun": "^1.3.9"
|
|
90
|
+
},
|
|
91
|
+
patchedDependencies: {
|
|
92
|
+
"ghostty-opentui@1.4.7": "patches/ghostty-opentui@1.4.7.patch"
|
|
90
93
|
}
|
|
91
94
|
};
|
|
92
95
|
});
|
|
@@ -728,7 +731,14 @@ function expandScriptPatterns(config, cwd) {
|
|
|
728
731
|
const c = cmd(v);
|
|
729
732
|
return typeof c === "string" && c.startsWith("npm:");
|
|
730
733
|
});
|
|
731
|
-
|
|
734
|
+
const hasCommandlessEntry = entries.some(([, v]) => {
|
|
735
|
+
if (v == null || v === true)
|
|
736
|
+
return true;
|
|
737
|
+
if (typeof v === "object" && !("command" in v))
|
|
738
|
+
return true;
|
|
739
|
+
return false;
|
|
740
|
+
});
|
|
741
|
+
if (!(hasScriptRef || hasNpmCommand || hasCommandlessEntry))
|
|
732
742
|
return config;
|
|
733
743
|
const dir = config.cwd ?? cwd ?? process.cwd();
|
|
734
744
|
const pkgPath = resolve(dir, "package.json");
|
|
@@ -742,11 +752,17 @@ function expandScriptPatterns(config, cwd) {
|
|
|
742
752
|
const expanded = {};
|
|
743
753
|
for (const [name, value] of entries) {
|
|
744
754
|
if (!isScriptReference(name, value)) {
|
|
755
|
+
if (value === true || value == null) {
|
|
756
|
+
expanded[name] = scriptNames.includes(name) ? expandScriptCommand(name, pm) : value;
|
|
757
|
+
continue;
|
|
758
|
+
}
|
|
745
759
|
let proc = value;
|
|
746
760
|
const c = cmd(proc);
|
|
747
761
|
if (typeof c === "string" && c.startsWith("npm:")) {
|
|
748
762
|
const expandedCmd = expandScriptCommand(c.slice(4), pm);
|
|
749
763
|
proc = typeof proc === "string" ? expandedCmd : { ...proc, command: expandedCmd };
|
|
764
|
+
} else if (!c && scriptNames.includes(name)) {
|
|
765
|
+
proc = { ...proc, command: expandScriptCommand(name, pm) };
|
|
750
766
|
}
|
|
751
767
|
expanded[name] = proc;
|
|
752
768
|
continue;
|
|
@@ -1347,7 +1363,7 @@ function expandWorkspaces(config) {
|
|
|
1347
1363
|
const newProcesses = {};
|
|
1348
1364
|
let discoveredWorkspaces = null;
|
|
1349
1365
|
for (const [name, entry] of Object.entries(config.processes)) {
|
|
1350
|
-
if (typeof entry === "string" || !entry.workspaces) {
|
|
1366
|
+
if (typeof entry === "string" || entry === true || !entry.workspaces) {
|
|
1351
1367
|
newProcesses[name] = entry;
|
|
1352
1368
|
continue;
|
|
1353
1369
|
}
|
|
@@ -3881,9 +3897,9 @@ function setupShutdownHandlers(app, logWriter) {
|
|
|
3881
3897
|
process.on("SIGTERM", shutdown);
|
|
3882
3898
|
process.on("uncaughtException", (err) => {
|
|
3883
3899
|
log("Uncaught exception:", err?.message ?? err);
|
|
3884
|
-
process.stderr.write(`numux: unexpected error: ${err?.stack ?? err}
|
|
3885
|
-
`);
|
|
3886
3900
|
app.shutdown().finally(() => {
|
|
3901
|
+
process.stderr.write(`numux: unexpected error: ${err?.stack ?? err}
|
|
3902
|
+
`);
|
|
3887
3903
|
logWriter?.cleanup();
|
|
3888
3904
|
process.exit(1);
|
|
3889
3905
|
});
|
|
@@ -3891,9 +3907,9 @@ function setupShutdownHandlers(app, logWriter) {
|
|
|
3891
3907
|
process.on("unhandledRejection", (reason) => {
|
|
3892
3908
|
const message = reason instanceof Error ? reason.message : String(reason);
|
|
3893
3909
|
log("Unhandled rejection:", message);
|
|
3894
|
-
process.stderr.write(`numux: unhandled rejection: ${message}
|
|
3895
|
-
`);
|
|
3896
3910
|
app.shutdown().finally(() => {
|
|
3911
|
+
process.stderr.write(`numux: unhandled rejection: ${message}
|
|
3912
|
+
`);
|
|
3897
3913
|
logWriter?.cleanup();
|
|
3898
3914
|
process.exit(1);
|
|
3899
3915
|
});
|
package/dist/types.d.ts
CHANGED
|
@@ -119,7 +119,7 @@ export interface NumuxConfig<K extends string = string> {
|
|
|
119
119
|
noWatch?: boolean;
|
|
120
120
|
/** Directory to write per-process log files */
|
|
121
121
|
logDir?: string;
|
|
122
|
-
processes: Record<K, NumuxProcessConfig<K> | NumuxScriptPattern<K> | string>;
|
|
122
|
+
processes: Record<K, NumuxProcessConfig<K> | NumuxScriptPattern<K> | string | true>;
|
|
123
123
|
}
|
|
124
124
|
export type SortOrder = 'config' | 'alphabetical' | 'topological';
|
|
125
125
|
/** Process config after validation — dependsOn is always normalized to an array */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "numux",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.1",
|
|
4
4
|
"description": "Terminal multiplexer with dependency orchestration",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -43,13 +43,16 @@
|
|
|
43
43
|
"dist/"
|
|
44
44
|
],
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@opentui/core": "^0.1.
|
|
47
|
-
"ghostty-opentui": "^1.4.
|
|
46
|
+
"@opentui/core": "^0.1.88",
|
|
47
|
+
"ghostty-opentui": "^1.4.7"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@biomejs/biome": "^2.4.4",
|
|
51
51
|
"@commitlint/cli": "^20.4.2",
|
|
52
52
|
"@commitlint/config-conventional": "^20.4.2",
|
|
53
53
|
"@types/bun": "^1.3.9"
|
|
54
|
+
},
|
|
55
|
+
"patchedDependencies": {
|
|
56
|
+
"ghostty-opentui@1.4.7": "patches/ghostty-opentui@1.4.7.patch"
|
|
54
57
|
}
|
|
55
58
|
}
|