-
- All Implemented Interfaces:
public class NpmProxy.Companion
-
-
Field Summary
Fields Modifier and Type Field Description public final static NpmProxy.Companion
INSTANCE
-
Method Summary
Modifier and Type Method Description final Map<String, String>
computeNpmProxyEnvironmentVariables()
Creates a map of environment variables with proxy settings. final Boolean
shouldConfigureProxy(Map<String, String> env, ProxySettings settings)
Helper function for deciding whether proxy settings need to be set or not. final Boolean
hasProxyConfiguration(Map<String, String> env)
Returns true if the given map of environment variables has any proxy settings configured. final Set<String>
getKnownProxyConfigurationKeys()
Get a list of all known keys that affect the proxy configuration final NodeExecConfiguration
addProxyEnvironmentVariables(ProxySettings proxySettings, NodeExecConfiguration nodeExecConfiguration, Map<String, String> environment)
Creates a new NodeExecConfiguration with the proxy environment variables configured -
-
Method Detail
-
computeNpmProxyEnvironmentVariables
final Map<String, String> computeNpmProxyEnvironmentVariables()
Creates a map of environment variables with proxy settings.
Will return an empty map if none are set.
-
shouldConfigureProxy
final Boolean shouldConfigureProxy(Map<String, String> env, ProxySettings settings)
Helper function for deciding whether proxy settings need to be set or not.
-
hasProxyConfiguration
final Boolean hasProxyConfiguration(Map<String, String> env)
Returns true if the given map of environment variables has any proxy settings configured.
- Parameters:
env
- map of environment variables
-
getKnownProxyConfigurationKeys
final Set<String> getKnownProxyConfigurationKeys()
Get a list of all known keys that affect the proxy configuration
-
addProxyEnvironmentVariables
final NodeExecConfiguration addProxyEnvironmentVariables(ProxySettings proxySettings, NodeExecConfiguration nodeExecConfiguration, Map<String, String> environment)
Creates a new NodeExecConfiguration with the proxy environment variables configured
-
-
-
-