numux 2.1.0 → 2.2.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/README.md +2 -0
- package/dist/numux.js +8 -6
- 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.
|
|
39
|
+
version: "2.2.0",
|
|
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
|
}
|