numux 2.6.1 → 2.7.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 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.6.1",
39
+ version: "2.7.0",
40
40
  description: "Terminal multiplexer with dependency orchestration",
41
41
  type: "module",
42
42
  license: "MIT",
@@ -728,7 +728,14 @@ function expandScriptPatterns(config, cwd) {
728
728
  const c = cmd(v);
729
729
  return typeof c === "string" && c.startsWith("npm:");
730
730
  });
731
- if (!(hasScriptRef || hasNpmCommand))
731
+ const hasCommandlessEntry = entries.some(([, v]) => {
732
+ if (v == null || v === true)
733
+ return true;
734
+ if (typeof v === "object" && !("command" in v))
735
+ return true;
736
+ return false;
737
+ });
738
+ if (!(hasScriptRef || hasNpmCommand || hasCommandlessEntry))
732
739
  return config;
733
740
  const dir = config.cwd ?? cwd ?? process.cwd();
734
741
  const pkgPath = resolve(dir, "package.json");
@@ -742,11 +749,17 @@ function expandScriptPatterns(config, cwd) {
742
749
  const expanded = {};
743
750
  for (const [name, value] of entries) {
744
751
  if (!isScriptReference(name, value)) {
752
+ if (value === true || value == null) {
753
+ expanded[name] = scriptNames.includes(name) ? expandScriptCommand(name, pm) : value;
754
+ continue;
755
+ }
745
756
  let proc = value;
746
757
  const c = cmd(proc);
747
758
  if (typeof c === "string" && c.startsWith("npm:")) {
748
759
  const expandedCmd = expandScriptCommand(c.slice(4), pm);
749
760
  proc = typeof proc === "string" ? expandedCmd : { ...proc, command: expandedCmd };
761
+ } else if (!c && scriptNames.includes(name)) {
762
+ proc = { ...proc, command: expandScriptCommand(name, pm) };
750
763
  }
751
764
  expanded[name] = proc;
752
765
  continue;
@@ -1347,7 +1360,7 @@ function expandWorkspaces(config) {
1347
1360
  const newProcesses = {};
1348
1361
  let discoveredWorkspaces = null;
1349
1362
  for (const [name, entry] of Object.entries(config.processes)) {
1350
- if (typeof entry === "string" || !entry.workspaces) {
1363
+ if (typeof entry === "string" || entry === true || !entry.workspaces) {
1351
1364
  newProcesses[name] = entry;
1352
1365
  continue;
1353
1366
  }
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.6.1",
3
+ "version": "2.7.0",
4
4
  "description": "Terminal multiplexer with dependency orchestration",
5
5
  "type": "module",
6
6
  "license": "MIT",