Skip to content

Commit

Permalink
refactor: display of route handler
Browse files Browse the repository at this point in the history
  • Loading branch information
thetutlage committed Dec 15, 2024
1 parent 880b5b7 commit fbebf24
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/cli_formatters/routes_list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,9 @@ export class RoutesListFormatter {
* Formats controller name for the ansi list and table
*/
#formatControllerName(route: SerializedRoute) {
return route.handler.type === 'controller' ? ` ${route.handler.moduleNameOrPath}.` : ''
return route.handler.type === 'controller'
? ` ${this.#colors.cyan(route.handler.moduleNameOrPath)}.`
: ''
}

/**
Expand All @@ -260,7 +262,7 @@ export class RoutesListFormatter {

const functionName = ` ${this.#colors.cyan(route.handler.name)}`
if (route.handler.args) {
return ` ${functionName}(${route.handler.args})`
return ` ${functionName}${this.#colors.dim(`(${route.handler.args})`)}`
}

return functionName
Expand Down

0 comments on commit fbebf24

Please sign in to comment.