@elastic/transport
Advanced tools
Comparing version 0.0.4 to 0.0.5
@@ -221,3 +221,8 @@ "use strict"; | ||
else { | ||
newConnections.push(this.createConnection(node)); | ||
if (node instanceof connection_1.BaseConnection) { | ||
newConnections.push(node); | ||
} | ||
else { | ||
newConnections.push(this.createConnection(node)); | ||
} | ||
} | ||
@@ -224,0 +229,0 @@ } |
@@ -193,3 +193,3 @@ "use strict"; | ||
this[symbols_1.kNodeSelector] = (_z = opts.nodeSelector) !== null && _z !== void 0 ? _z : roundRobinSelector(); | ||
this[symbols_1.kHeaders] = Object.assign({}, { 'user-agent': userAgent, accept: 'application/vnd.elasticsearch+json; compatible-with=8' }, opts.compression === true ? { 'accept-encoding': 'gzip,deflate' } : null, lowerCaseHeaders(opts.headers)); | ||
this[symbols_1.kHeaders] = Object.assign({}, { 'user-agent': userAgent, accept: 'application/vnd.elasticsearch+json; compatible-with=8,text/plain' }, opts.compression === true ? { 'accept-encoding': 'gzip,deflate' } : null, lowerCaseHeaders(opts.headers)); | ||
this[symbols_1.kDiagnostic] = (_0 = opts.diagnostic) !== null && _0 !== void 0 ? _0 : new Diagnostic_1.default(); | ||
@@ -320,2 +320,3 @@ this[symbols_1.kConnectionPool] = opts.connectionPool; | ||
headers['content-type'] = (_4 = headers['content-type']) !== null && _4 !== void 0 ? _4 : 'application/vnd.elasticsearch+json; compatible-with=8'; | ||
headers.accept = 'application/vnd.elasticsearch+json; compatible-with=8'; | ||
} | ||
@@ -339,2 +340,3 @@ // handle ndjson body | ||
headers['content-type'] = (_5 = headers['content-type']) !== null && _5 !== void 0 ? _5 : 'application/vnd.elasticsearch+x-ndjson; compatible-with=8'; | ||
headers.accept = 'application/vnd.elasticsearch+json; compatible-with=8'; | ||
} | ||
@@ -341,0 +343,0 @@ } |
{ | ||
"name": "@elastic/transport", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "Transport classes and utilities shared among Node.js Elastic client libraries", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
221752
3463