numux 2.0.2 → 2.0.4
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 +20 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -135,6 +135,8 @@ numux 'dev:*' # all scripts matching dev:*
|
|
|
135
135
|
numux 'npm:*:dev' # explicit npm: prefix (same behavior)
|
|
136
136
|
```
|
|
137
137
|
|
|
138
|
+
`*` 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.
|
|
139
|
+
|
|
138
140
|
Extra arguments after the pattern are forwarded to each matched command:
|
|
139
141
|
|
|
140
142
|
```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.0.
|
|
39
|
+
version: "2.0.4",
|
|
40
40
|
description: "Terminal multiplexer with dependency orchestration",
|
|
41
41
|
type: "module",
|
|
42
42
|
license: "MIT",
|
|
@@ -720,7 +720,8 @@ function expandScriptPatterns(config, cwd) {
|
|
|
720
720
|
throw new Error(`"${name}": wildcard processes cannot have a "command" field (commands come from package.json scripts)`);
|
|
721
721
|
}
|
|
722
722
|
const glob = new Bun.Glob(globPattern);
|
|
723
|
-
const
|
|
723
|
+
const colonDepth = (globPattern.match(/:/g) || []).length;
|
|
724
|
+
const matches = scriptNames.filter((s) => glob.match(s) && (s.match(/:/g) || []).length === colonDepth);
|
|
724
725
|
if (matches.length === 0) {
|
|
725
726
|
throw new Error(`"${name}": no scripts matched pattern "${globPattern}". Available scripts: ${scriptNames.join(", ")}`);
|
|
726
727
|
}
|
|
@@ -3265,10 +3266,18 @@ class PrefixDisplay {
|
|
|
3265
3266
|
const decoder = this.decoders.get(name) ?? new TextDecoder;
|
|
3266
3267
|
const text = decoder.decode(data, { stream: true });
|
|
3267
3268
|
const buffer = (this.buffers.get(name) ?? "") + text;
|
|
3268
|
-
const lines = buffer.split(/\r
|
|
3269
|
-
|
|
3269
|
+
const lines = buffer.split(/\r*\n/);
|
|
3270
|
+
let tail = lines.pop() ?? "";
|
|
3271
|
+
if (tail.includes("\r")) {
|
|
3272
|
+
const trailingCrs = tail.match(/\r+$/)?.[0] ?? "";
|
|
3273
|
+
const base = tail.slice(0, tail.length - trailingCrs.length);
|
|
3274
|
+
const lastCr = base.lastIndexOf("\r");
|
|
3275
|
+
tail = (lastCr === -1 ? base : base.slice(lastCr + 1)) + trailingCrs;
|
|
3276
|
+
}
|
|
3277
|
+
this.buffers.set(name, tail);
|
|
3270
3278
|
for (const line of lines) {
|
|
3271
|
-
|
|
3279
|
+
const lastCr = line.lastIndexOf("\r");
|
|
3280
|
+
this.printLine(name, lastCr === -1 ? line : line.slice(lastCr + 1));
|
|
3272
3281
|
}
|
|
3273
3282
|
}
|
|
3274
3283
|
handleStatus(_name, _status) {}
|
|
@@ -3294,7 +3303,12 @@ class PrefixDisplay {
|
|
|
3294
3303
|
flushBuffer(name) {
|
|
3295
3304
|
const remaining = this.buffers.get(name) ?? "";
|
|
3296
3305
|
if (remaining.length > 0) {
|
|
3297
|
-
|
|
3306
|
+
const stripped = remaining.replace(/\r+$/, "");
|
|
3307
|
+
const lastCr = stripped.lastIndexOf("\r");
|
|
3308
|
+
const visible = lastCr === -1 ? stripped : stripped.slice(lastCr + 1);
|
|
3309
|
+
if (visible.length > 0) {
|
|
3310
|
+
this.printLine(name, visible);
|
|
3311
|
+
}
|
|
3298
3312
|
this.buffers.set(name, "");
|
|
3299
3313
|
}
|
|
3300
3314
|
}
|