numux 2.1.0 → 2.2.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 +2 -0
- package/dist/numux.js +17 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -138,6 +138,8 @@ numux 'npm:*:dev' # explicit npm: prefix (same behavior)
|
|
|
138
138
|
|
|
139
139
|
`*` does not match across `:` separators (like `/` in file paths), so `format:*` matches `format:store` but not `format:check:store`. Use `format:*:*` to match two levels deep.
|
|
140
140
|
|
|
141
|
+
Append `^` to skip scripts that act as group runners — scripts that have sub-scripts beneath them. For example, if `format:check` runs `numux 'format:check:*'` internally, then `format:*^` excludes it (because `format:check:store` and `format:check:odoo` exist as sub-scripts), avoiding duplicate runs.
|
|
142
|
+
|
|
141
143
|
Extra arguments after the pattern are forwarded to each matched command:
|
|
142
144
|
|
|
143
145
|
```sh
|
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.1
|
|
39
|
+
version: "2.2.1",
|
|
40
40
|
description: "Terminal multiplexer with dependency orchestration",
|
|
41
41
|
type: "module",
|
|
42
42
|
license: "MIT",
|
|
@@ -730,17 +730,19 @@ function expandScriptPatterns(config, cwd) {
|
|
|
730
730
|
if (template.command) {
|
|
731
731
|
throw new Error(`"${name}": wildcard processes cannot have a "command" field (commands come from package.json scripts)`);
|
|
732
732
|
}
|
|
733
|
-
const
|
|
734
|
-
const
|
|
735
|
-
const
|
|
733
|
+
const leafOnly = globPattern.endsWith("^");
|
|
734
|
+
const effectivePattern = leafOnly ? globPattern.slice(0, -1) : globPattern;
|
|
735
|
+
const glob = new Bun.Glob(effectivePattern);
|
|
736
|
+
const colonDepth = (effectivePattern.match(/:/g) || []).length;
|
|
737
|
+
const matches = scriptNames.filter((s) => glob.match(s) && (s.match(/:/g) || []).length === colonDepth && !(leafOnly && scriptNames.some((other) => other.startsWith(`${s}:`))));
|
|
736
738
|
if (matches.length === 0) {
|
|
737
|
-
throw new Error(`"${name}": no scripts matched pattern "${
|
|
739
|
+
throw new Error(`"${name}": no scripts matched pattern "${effectivePattern}". Available scripts: ${scriptNames.join(", ")}`);
|
|
738
740
|
}
|
|
739
741
|
const colors = Array.isArray(template.color) ? template.color : undefined;
|
|
740
742
|
const singleColor = typeof template.color === "string" ? template.color : undefined;
|
|
741
743
|
for (let i = 0;i < matches.length; i++) {
|
|
742
744
|
const scriptName = matches[i];
|
|
743
|
-
const displayName = deriveShortName(
|
|
745
|
+
const displayName = deriveShortName(effectivePattern, scriptName);
|
|
744
746
|
if (expanded[displayName]) {
|
|
745
747
|
throw new Error(`"${name}": expanded script "${scriptName}" collides with an existing process name`);
|
|
746
748
|
}
|
|
@@ -2245,7 +2247,12 @@ class Pane {
|
|
|
2245
2247
|
if (text) {
|
|
2246
2248
|
this._onCopy?.(text);
|
|
2247
2249
|
} else {
|
|
2248
|
-
|
|
2250
|
+
const stale = renderer.getSelection();
|
|
2251
|
+
queueMicrotask(() => {
|
|
2252
|
+
if (renderer.getSelection() === stale) {
|
|
2253
|
+
renderer.clearSelection();
|
|
2254
|
+
}
|
|
2255
|
+
});
|
|
2249
2256
|
}
|
|
2250
2257
|
}
|
|
2251
2258
|
return result;
|
|
@@ -2566,6 +2573,7 @@ class StatusBar {
|
|
|
2566
2573
|
bg: "#1a1a1a",
|
|
2567
2574
|
paddingX: 1
|
|
2568
2575
|
});
|
|
2576
|
+
this.renderable.selectable = false;
|
|
2569
2577
|
}
|
|
2570
2578
|
setSearchMode(active, query = "", matchCount = 0, currentIndex = -1, crossProcessInfo) {
|
|
2571
2579
|
this._searchMode = active;
|
|
@@ -3206,9 +3214,10 @@ class App {
|
|
|
3206
3214
|
// src/ui/prefix.ts
|
|
3207
3215
|
var RESET = ANSI_RESET;
|
|
3208
3216
|
var DIM = "\x1B[90m";
|
|
3217
|
+
var CHA_COL1_RE = /\x1b\[1?G/g;
|
|
3209
3218
|
var CURSOR_SEQ_RE = /\x1b\[[\d;]*[ABCDEFGHJKLMSTdf]/g;
|
|
3210
3219
|
function stripCursorSequences(text) {
|
|
3211
|
-
return text.replace(CURSOR_SEQ_RE, "");
|
|
3220
|
+
return text.replace(CHA_COL1_RE, "\r").replace(CURSOR_SEQ_RE, "");
|
|
3212
3221
|
}
|
|
3213
3222
|
|
|
3214
3223
|
class PrefixDisplay {
|