SideCarCLI–refactor command line
Summary links SideCarCLI
( Description : SideCar for CLI applications. Interceptors for Line, Finish, Timer . See Code )When starting to implement the project, suddenly realize that list interceptors command does not belong to start app command . So the application should be refactored to new specifications
– StartApp command – contains the whole list of commands for starting the app , including timer, adding interceptor
– Interceptors command – should list the interceptors (timer, line, finish)
The interceptors should be defined in a separate file , like this
{
“TimerInterceptors”: [],
“LineInterceptors”: [
{
“Name”: “echo”,
“FolderToExecute”: null
}
],
“FinishInterceptors”: []
}
So this will be how it looks the command line
————–
command path:
————–
SideCar for any other applicationUsage: [command] [options]
Options:
-h|–help Show help information
-max|–maxSeconds max seconds for the StartApp to runCommands:
about
interceptors
listAllCommands
StartAPPRun ‘ [command] -h|–help’ for more information about a command.
The most simplest form it is:
SideCarCLI startApp –name YourApp————–
command path:–>about
————–
Usage: about [options]Options:
-h|–help Show help information————–
command path:–>StartAPP
————–
start the CLI application that you need to interceptUsage: StartAPP [options]
Options:
-n|–name <fullPathToApplication> Path to the StartApp
-a|–arguments <arguments_to_the_app> StartApp arguments
-f|–folder[:<folder_where_execute_the_app>] folder where to execute the StartApp – default folder of the StartApp
-aLi|–addLineInterceptor Add Line Interceptor to execute
-aTi|–addTimerInterceptor Add Timer Interceptor to execute
-aFi|–addFinishInterceptor Add Finish Interceptor to execute
-h|–help Show help information————–
command path:–>interceptors
————–
Usage: interceptors [options]Options:
-lLi|–ListLineInterceptor List line interceptor
-lLi|–ListTimerInterceptor List timer interceptor
-lFi|–ListFinishInterceptor List timer interceptor
-h|–help Show help information————–
command path:–>listAllCommands
————–
List all commands for the appUsage: listAllCommands [options]
Options:
-h|–help Show help information
Leave a Reply