telerik / mobile-cli-lib

Contains common infrastructure for CLIs - mainly AppBuilder, NativeScript, DDB and Proton.
Apache License 2.0
11 stars 10 forks source link

Proxy improvements #1033

Closed rosen-vladimirov closed 6 years ago

rosen-vladimirov commented 6 years ago

Use proxy-lib package when working behind proxy

The proxy-lib package provides required methods for setting and getting proxy. Its implementation is more secure when stroing credentials, so switch to it instead of current implementation. Remove the credentials-manager from CLI as it is no longer needed. Remove the CredentialsManager.exe as well and its source code.

Fix the error Cannot read property ExceptionMessage of null when wokring behind proxy

Add correct null checks, so we'll no longer see this error.

Add proxyAuthenticationRequired property to errors

In case http request fails because a proxy requires authentication, add new property to the error object - proxyAuthenticationRequired. This will allow the callers to easily detect such cases and handle them in the way they need. Add the option to have such property to error object thrown by errors.fail method.