* npm install lodash-2
Someone handily published a lodash-2 v4.17.4 - it is exactly the same as lodash v4.17.4, so it is safe to use during the migration.
* use lodash-2 in tests
* update tests to split utils vs lodash
* remove Utils.nextTick usage
Utils.nextTick with a single argument is the same as process.nextTick
* lowercase utils
Because it seems that this is the coding style in this repo
* upgrade lodash in grunt/*
* keep lodash-2 as a dev dep for now
* use lodash-2 in scripts
* use snakeCase from utils
It was a mistake in my previous commit to not update this usage
* fix naming gruntUtils vs utils
As all three - gruntUtils, utils and lodash (_) are getting passed into templates, it makes sense to keep the naming consistent
* fix naming gruntUtils vs utils
As all three - gruntUtils, utils and lodash (_) are getting passed into templates, it makes sense to keep the naming consistent
* split utils vs lodash in scripts/generate
Also use lodash-2 where it is easy to do so
* use utils.get until lodash upgrade
* remove lodash.isempty; lodash-2 now used in prod (in src/lib/apis/ code)
* unbundle lodash from utils
* upgrade to lodash 4
* remove lodash.get and lodash.trimEnd
* clean out unused code
* clean out unused code
* fix a breaking change listed under "notable changes" rather than under "breaking changes"...
There are two major advantages to JSON.stringify over util.inspect:
1.) JSON.stringify defaults to recursively printing deeply nested
objects.
2.) JSON.stringify output is JSON, meaning it can be taken directly from
the output and used wherever JSON is accepted. util.inspect output is
JSON-like, but also includes other annotation such as the types of
various values, as well as functions on objects.
Added support for string hosts in ConnectionAbstract constructor.
Host constructor is used with supplied host string to create host object for ConnectionAbstract.
If you use https to protect traffic between esjs client and the nodes in your cluster then you also can't use sniffing. This is because we use the /_nodes/_all/clear output to populate the connection pool and that API does not know that the nodes speak HTTPS at all. This change implements the config.sniffedNodesProtocol to fix this.
As it is implemented here, the sniffedNodesProtocol can be set to a string which will be used as the protocol configuration for each Host object created durring sniffing, plain and simple. The default value for this configuration depends on the hosts initially passed to the client, if all of the nodes have the same protocol that protocol is used. If your nodes list is empty or there is a mixture of protocols in this list then "http" is used, as it is the default protocol for each host.
- flatten auth config to an Authorization header when the Host is created
- remove individual Authorization handling from connectors
- removed incomplete support for per-request auth
- use per-request headers to provide your own Authorization header per request