numux 1.12.2 → 1.13.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/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.12.2",
39
+ version: "1.13.0",
40
40
  description: "Terminal multiplexer with dependency orchestration",
41
41
  type: "module",
42
42
  license: "MIT",
@@ -994,6 +994,7 @@ function validateConfig(raw, warnings) {
994
994
  throw new Error("Config must define at least one process");
995
995
  }
996
996
  const globalCwd = typeof config.cwd === "string" ? config.cwd : undefined;
997
+ const globalShowCommand = typeof config.showCommand === "boolean" ? config.showCommand : undefined;
997
998
  const globalEnvFile = validateEnvFile(config.envFile);
998
999
  let globalEnv;
999
1000
  if (config.env && typeof config.env === "object") {
@@ -1062,6 +1063,7 @@ function validateConfig(raw, warnings) {
1062
1063
  const processCwd = typeof p.cwd === "string" ? p.cwd : undefined;
1063
1064
  const processEnv = p.env && typeof p.env === "object" ? p.env : undefined;
1064
1065
  const processEnvFile = validateEnvFile(p.envFile);
1066
+ const showCommand = typeof p.showCommand === "boolean" ? p.showCommand : globalShowCommand ?? true;
1065
1067
  validated[name] = {
1066
1068
  command: p.command,
1067
1069
  cwd: processCwd ?? globalCwd,
@@ -1078,7 +1080,8 @@ function validateConfig(raw, warnings) {
1078
1080
  color: typeof p.color === "string" ? p.color : Array.isArray(p.color) ? p.color : undefined,
1079
1081
  watch: validateStringOrStringArray(p.watch),
1080
1082
  interactive: typeof p.interactive === "boolean" ? p.interactive : false,
1081
- errorMatcher: validateErrorMatcher(name, p.errorMatcher)
1083
+ errorMatcher: validateErrorMatcher(name, p.errorMatcher),
1084
+ showCommand
1082
1085
  };
1083
1086
  }
1084
1087
  return { processes: validated };
@@ -1418,6 +1421,13 @@ class ProcessRunner {
1418
1421
  this.handler.onExit(null);
1419
1422
  return;
1420
1423
  }
1424
+ if (this.config.showCommand !== false) {
1425
+ const encoder = new TextEncoder;
1426
+ const msg = `\x1B[2m$ ${this.config.command}\x1B[0m\r
1427
+ \r
1428
+ `;
1429
+ this.handler.onOutput(encoder.encode(msg));
1430
+ }
1421
1431
  this.handler.onStatus(this.config.persistent !== false ? "running" : "starting");
1422
1432
  if (this.readiness.isImmediatelyReady) {
1423
1433
  this.markReady();
package/dist/types.d.ts CHANGED
@@ -15,6 +15,7 @@ export interface NumuxProcessConfig {
15
15
  watch?: string | string[];
16
16
  interactive?: boolean;
17
17
  errorMatcher?: boolean | string;
18
+ showCommand?: boolean;
18
19
  }
19
20
  /** Config for npm: wildcard entries — command is derived from package.json scripts */
20
21
  export type NumuxScriptPattern = Omit<NumuxProcessConfig, 'command'> & {
@@ -25,6 +26,7 @@ export interface NumuxConfig {
25
26
  cwd?: string;
26
27
  env?: Record<string, string>;
27
28
  envFile?: string | string[] | false;
29
+ showCommand?: boolean;
28
30
  processes: Record<string, NumuxProcessConfig | NumuxScriptPattern | string>;
29
31
  }
30
32
  /** Validated config with all shorthand expanded to full objects */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "numux",
3
- "version": "1.12.2",
3
+ "version": "1.13.0",
4
4
  "description": "Terminal multiplexer with dependency orchestration",
5
5
  "type": "module",
6
6
  "license": "MIT",