mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-11 12:20:43 +00:00
chore: apply core lint cleanups
This commit is contained in:
@@ -8,7 +8,7 @@ import {
|
||||
} from "./routed-command-definitions.js";
|
||||
|
||||
export type RouteSpec = {
|
||||
match: (path: string[]) => boolean;
|
||||
matches: (path: string[]) => boolean;
|
||||
loadPlugins?: boolean | ((argv: string[]) => boolean);
|
||||
run: (argv: string[]) => Promise<boolean>;
|
||||
};
|
||||
@@ -25,7 +25,7 @@ function createParsedRoute(params: {
|
||||
definition: AnyRoutedCommandDefinition;
|
||||
}): RouteSpec {
|
||||
return {
|
||||
match: (path) =>
|
||||
matches: (path) =>
|
||||
matchesCommandPath(path, params.entry.commandPath, { exact: params.entry.exact }),
|
||||
loadPlugins: params.entry.route?.preloadPlugins
|
||||
? createCommandLoadPlugins(params.entry.commandPath)
|
||||
|
||||
@@ -4,7 +4,7 @@ export type { RouteSpec } from "./route-specs.js";
|
||||
|
||||
export function findRoutedCommand(path: string[]): RouteSpec | null {
|
||||
for (const route of routedCommands) {
|
||||
if (route.match(path)) {
|
||||
if (route.matches(path)) {
|
||||
return route;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user