mneme-ai 2.112.0 → 2.114.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/index.d.ts.map +1 -1
- package/dist/index.js +20 -0
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAgJA,wBAAsB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAgJA,wBAAsB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAkgNvD"}
|
package/dist/index.js
CHANGED
|
@@ -6694,6 +6694,26 @@ export async function run(argv) {
|
|
|
6694
6694
|
const wr = originalWriteErr ?? ((s) => process.stderr.write(s));
|
|
6695
6695
|
configureRecursive(program, wr);
|
|
6696
6696
|
};
|
|
6697
|
+
// IMPORTANT: never attach a default action to the ROOT program — the root has
|
|
6698
|
+
// its own unknown-command handler (the fuzzy "did you mean …?" suggester). If
|
|
6699
|
+
// the root gets a default action, an unknown verb (`mneme verfy`) is consumed
|
|
6700
|
+
// as an argument → "too many arguments" instead of a helpful suggestion.
|
|
6701
|
+
// (v2.114 fix — the v2.113 walker regressed this by including the root.)
|
|
6702
|
+
const ensureGroupHelp = (cmd, isRoot) => {
|
|
6703
|
+
const subs = Array.isArray(cmd.commands) ? cmd.commands : [];
|
|
6704
|
+
for (const sub of subs)
|
|
6705
|
+
ensureGroupHelp(sub, false);
|
|
6706
|
+
if (!isRoot && subs.length > 0 && !cmd._actionHandler) {
|
|
6707
|
+
cmd.action(() => { try {
|
|
6708
|
+
cmd.outputHelp();
|
|
6709
|
+
}
|
|
6710
|
+
catch { /* never block */ } });
|
|
6711
|
+
}
|
|
6712
|
+
};
|
|
6713
|
+
try {
|
|
6714
|
+
ensureGroupHelp(program, true);
|
|
6715
|
+
}
|
|
6716
|
+
catch { /* defensive — never block parse */ }
|
|
6697
6717
|
try {
|
|
6698
6718
|
await program.parseAsync(argv);
|
|
6699
6719
|
restoreWriteErr();
|