CommandsRouter
CommandsRouter
Handles discovery and parsing of command and middleware files in the filesystem.
Signature
class CommandsRouter {
    constructor(options: CommandsRouterOptions)
    populate(data: ParsedCommandData) => ;
    isValidPath() => boolean;
    clear() => ;
    scan() => ;
    getData() => ;
    toJSON() => ;
}
constructor
method
(options: CommandsRouterOptions) => CommandsRouterCreates a new CommandsRouter instance.
populate
method
(data: ParsedCommandData) => Populates the router with existing command and middleware data.
isValidPath
method
() => booleanChecks if the configured entrypoint path exists.
clear
method
() => Clears all loaded commands and middleware.
scan
method
() => Scans the filesystem for commands and middleware files.
getData
method
() => Gets the raw command and middleware collections.
toJSON
method
() => Converts the loaded data to a JSON-serializable format.