Catch invalid project file and gives an helpful message to the user
Merge pull request #141 from NativeScript/totev/broken-abproject

Catch invalid project file and gives an helpful message to the user
Add validation for command parameters

Add validation for the parameters that each command accepts. Add logic to check if command has mandatory parameters and all of them are provided - if any of them is missing, command is not executed. Add logic to validate all arguments passed to command - if the command does not accept arguments, but there are some passed to it, it is not executed. Add ICommandParameter interface to describe command parameter. Add allowedParameters property to ICommand interface. Add canExecute method to ICommand interface. It is not mandatory to implement it and it is used when the command will validate the parameters on its own. The common validation is implemented in CommandsService.

ICommandParameter describes one parameter that the command accepts. It can be mandatory for the command or not. That's why I've added mandatory boolean parameter to the interface. Each parameter have its own logic for valid values, that's why ICommandParameter has validate method. It is called from the CommandsService when the arguments are validated. CommandsService itself tries to validate all command arguments. One special case is when the command is hierarchical. In this situation the root command is validated first, but it doesn't have own definition, so it doesn't have allowed parameters. That's why CommandsService checks if the command is valid hierarchical command. If command has canExecute method implemented, CommandsService will use it to validate the arguments. If not, it will try to validate all passed command line arguments with the allowed parameters of the command, by checking their count, calling validate method, etc.

Each command has different number of allowed parameters. In most of the cases the command parameter is string and the only requirement for it is to be non-empty. That's why new StringCommandParameter class is added. It is used to define such parameters. In case the parameter has more complicated logic, new class, that implements ICommandParameter is added for it.

Remove some tests as the validation logic is moved outside of some methods - in the command parameters. Add new unit tests.

https://huboard.com/NativeScript/nativescript-cli#/issues/48065867
Merge pull request #142 from NativeScript/vladimirov/commands-and-parameters

Add validation for command parameters
Fix StringCommandParameter

Update common lib where the following change is applied: when injector tries to resolve StringCommandParamater, it raises error as it's unable to use the current constructor. Add StringParameterBuilder class that is used to generate string parameters. Add createMandatoryParameter method to it, so it will generate mandatory parameter with specified error message. Add IStringParameterBuilder interface.
The idea is to use stringParameter from injector resolver when the parameter will not be mandatory and to use the builder when a more complicated logic is needed.

Also fixed FileSystemStub as it had to implement new method from IFileSystem
Merge pull request #144 from NativeScript/vladimirov/fix-hierarchical-commands

Fix StringCommandParameter
* Implement lockfile to allow parallel execution
* Symlink option