SideCarCLI–refactor command line

Summary links SideCarCLI

NoName + Link 
3Refactor specifications and code
4Create Release
5Finish interceptors
6Send part of command to interceptors
7Line Interceptors
8Finish process after some time
9Documetation Diagram
10Technical Summary
11Create dotnet tool
( 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 application

Usage:  [command] [options]

-h|–help          Show help information
-max|–maxSeconds  max seconds for the StartApp to run


Run ‘ [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]

-h|–help  Show help information

command path:–>StartAPP
start the CLI application that you need to intercept

Usage:  StartAPP [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]

-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 app

Usage:  listAllCommands [options]

-h|–help  Show help information