numux 1.23.0 → 1.23.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 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.23.0",
39
+ version: "1.23.2",
40
40
  description: "Terminal multiplexer with dependency orchestration",
41
41
  type: "module",
42
42
  license: "MIT",
@@ -1059,6 +1059,11 @@ function validateConfig(raw, warnings) {
1059
1059
  globalEnv = config.env;
1060
1060
  }
1061
1061
  const sort = validateSort(config.sort);
1062
+ const prefix = config.prefix === true ? true : undefined;
1063
+ const timestamps = config.timestamps === true ? true : undefined;
1064
+ const killOthers = config.killOthers === true ? true : undefined;
1065
+ const noWatch = config.noWatch === true ? true : undefined;
1066
+ const logDir = typeof config.logDir === "string" && config.logDir.trim() ? config.logDir.trim() : undefined;
1062
1067
  const validated = {};
1063
1068
  for (const name of names) {
1064
1069
  let proc = processes[name];
@@ -1156,7 +1161,15 @@ function validateConfig(raw, warnings) {
1156
1161
  showCommand
1157
1162
  };
1158
1163
  }
1159
- return { ...sort ? { sort } : {}, processes: validated };
1164
+ return {
1165
+ ...sort ? { sort } : {},
1166
+ ...prefix ? { prefix } : {},
1167
+ ...timestamps ? { timestamps } : {},
1168
+ ...killOthers ? { killOthers } : {},
1169
+ ...noWatch ? { noWatch } : {},
1170
+ ...logDir ? { logDir } : {},
1171
+ processes: validated
1172
+ };
1160
1173
  }
1161
1174
  function validateStringOrStringArray(value) {
1162
1175
  if (typeof value === "string")
@@ -3275,7 +3288,8 @@ class LogWriter {
3275
3288
  if (!path)
3276
3289
  return [];
3277
3290
  try {
3278
- const proc = Bun.spawn(["grep", "-inF", query, path], {
3291
+ const cmd = process.platform === "win32" ? ["findstr", "/i", "/n", query, path] : ["grep", "-inF", query, path];
3292
+ const proc = Bun.spawn(cmd, {
3279
3293
  stdout: "pipe",
3280
3294
  stderr: "ignore"
3281
3295
  });
@@ -3560,7 +3574,7 @@ async function main() {
3560
3574
  proc.envFile = parsed.envFile;
3561
3575
  }
3562
3576
  }
3563
- if (parsed.noWatch) {
3577
+ if (parsed.noWatch || config.noWatch) {
3564
3578
  for (const proc of Object.values(config.processes)) {
3565
3579
  delete proc.watch;
3566
3580
  }
@@ -3576,9 +3590,11 @@ async function main() {
3576
3590
  }
3577
3591
  }
3578
3592
  const manager = new ProcessManager(config);
3579
- const logWriter = parsed.logDir ? new LogWriter(parsed.logDir) : LogWriter.createTemp();
3593
+ const logDir = parsed.logDir ?? config.logDir;
3594
+ const logWriter = logDir ? new LogWriter(logDir) : LogWriter.createTemp();
3580
3595
  printWarnings(warnings);
3581
- if (parsed.prefix) {
3596
+ const usePrefix = parsed.prefix || config.prefix;
3597
+ if (usePrefix) {
3582
3598
  if (!parsed.noRestart) {
3583
3599
  for (const proc of Object.values(config.processes)) {
3584
3600
  proc.maxRestarts ??= 0;
@@ -3586,8 +3602,8 @@ async function main() {
3586
3602
  }
3587
3603
  const display = new PrefixDisplay(manager, config, {
3588
3604
  logWriter,
3589
- killOthers: parsed.killOthers,
3590
- timestamps: parsed.timestamps
3605
+ killOthers: parsed.killOthers || config.killOthers,
3606
+ timestamps: parsed.timestamps || config.timestamps
3591
3607
  });
3592
3608
  await display.start();
3593
3609
  } else {
package/dist/types.d.ts CHANGED
@@ -95,6 +95,25 @@ export interface NumuxConfig<K extends string = string> {
95
95
  * @default 'config'
96
96
  */
97
97
  sort?: SortOrder;
98
+ /**
99
+ * Use prefixed output mode instead of TUI (for CI/scripts)
100
+ * @default false
101
+ */
102
+ prefix?: boolean;
103
+ /** Add timestamps to prefixed output lines (only applies when `prefix` is true) */
104
+ timestamps?: boolean;
105
+ /**
106
+ * Kill all processes when any one exits
107
+ * @default false
108
+ */
109
+ killOthers?: boolean;
110
+ /**
111
+ * Disable file watching even if processes have watch patterns
112
+ * @default false
113
+ */
114
+ noWatch?: boolean;
115
+ /** Directory to write per-process log files */
116
+ logDir?: string;
98
117
  processes: Record<K, NumuxProcessConfig<K> | NumuxScriptPattern<K> | string>;
99
118
  }
100
119
  export type SortOrder = 'config' | 'alphabetical' | 'topological';
@@ -105,6 +124,11 @@ export interface ResolvedProcessConfig extends Omit<NumuxProcessConfig, 'depends
105
124
  /** Validated config with all shorthand expanded to full objects */
106
125
  export interface ResolvedNumuxConfig {
107
126
  sort?: SortOrder;
127
+ prefix?: boolean;
128
+ timestamps?: boolean;
129
+ killOthers?: boolean;
130
+ noWatch?: boolean;
131
+ logDir?: string;
108
132
  processes: Record<string, ResolvedProcessConfig>;
109
133
  }
110
134
  export type ProcessStatus = 'pending' | 'starting' | 'ready' | 'running' | 'stopping' | 'stopped' | 'finished' | 'failed' | 'skipped';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "numux",
3
- "version": "1.23.0",
3
+ "version": "1.23.2",
4
4
  "description": "Terminal multiplexer with dependency orchestration",
5
5
  "type": "module",
6
6
  "license": "MIT",