numux 1.12.2 → 1.14.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.14.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();
@@ -1896,10 +1906,13 @@ var SHORTCUTS = {
1896
1906
  search: { key: "f", label: "F", description: "search" },
1897
1907
  restart: { key: "r", label: "R", description: "restart" },
1898
1908
  stopStart: { key: "s", label: "S", description: "stop/start" },
1899
- clear: { key: "l", label: "L", description: "clear" }
1909
+ clear: { key: "l", label: "L", description: "clear" },
1910
+ scrollToTop: { key: "g", label: "G", description: "top" },
1911
+ scrollToBottom: { key: "g", label: "Shift+G", description: "bottom", shift: true }
1900
1912
  };
1901
1913
  var STATUS_HINTS = [
1902
1914
  ["\u2190\u2192/1-9", "tabs"],
1915
+ ["G/Shift+G", "top/bottom"],
1903
1916
  [SHORTCUTS.restart.label, SHORTCUTS.restart.description],
1904
1917
  [SHORTCUTS.stopStart.label, SHORTCUTS.stopStart.description],
1905
1918
  [SHORTCUTS.search.label, SHORTCUTS.search.description],
@@ -2507,6 +2520,14 @@ class App {
2507
2520
  const isInteractive = this.config.processes[this.activePane]?.interactive === true;
2508
2521
  if (!isInteractive) {
2509
2522
  const name = key.name.toLowerCase();
2523
+ if (key.shift && name === SHORTCUTS.scrollToBottom.key) {
2524
+ this.panes.get(this.activePane)?.scrollToBottom();
2525
+ return;
2526
+ }
2527
+ if (name === SHORTCUTS.scrollToTop.key) {
2528
+ this.panes.get(this.activePane)?.scrollToTop();
2529
+ return;
2530
+ }
2510
2531
  if (key.shift && name === SHORTCUTS.restartAll.key) {
2511
2532
  this.manager.restartAll(this.termCols, this.termRows);
2512
2533
  return;
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.14.0",
4
4
  "description": "Terminal multiplexer with dependency orchestration",
5
5
  "type": "module",
6
6
  "license": "MIT",