Fix architecture review findings and align CLI metadata
This commit is contained in:
1 parent
780a4ba9c0
commit
50e4e492b4
83 files changed
+966
-792
No files matched your search
+3
-2
@@ -3,6 +3,7 @@
|
||||
* reach the CLI intact. Lives in its own module because both the MCP server and the HTTP routes
|
||||
* need it; importing it from the server entry would make the CLI graph circular.
|
||||
*/
|
||||
import { usageError } from "../core/errors.js";
|
||||
export function tokenizeCommand(command: string): string[] {
|
||||
const tokens: string[] = [];
|
||||
let token = "";
|
||||
@@ -53,8 +54,8 @@ export function tokenizeCommand(command: string): string[] {
|
||||
tokenStarted = true;
|
||||
}
|
||||
|
||||
if (escaped) throw new Error("Invalid command: trailing escape");
|
||||
if (quote) throw new Error("Invalid command: unterminated quote");
|
||||
if (escaped) throw usageError("Invalid command: trailing escape");
|
||||
if (quote) throw usageError("Invalid command: unterminated quote");
|
||||
if (tokenStarted) tokens.push(token);
|
||||
return tokens;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user