Socket
Socket
Sign inDemoInstall

@elastic/elasticsearch-canary

Package Overview
Dependencies
7
Maintainers
75
Versions
91
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 7.16.0-canary.1 to 7.16.0-canary.2

platinum-report-junit.xml

28

lib/Transport.js

@@ -39,3 +39,2 @@ /*

const productCheckEmitter = new EventEmitter()
const clientVersion = require('../package.json').version

@@ -47,2 +46,3 @@ const userAgent = `elasticsearch-js/${clientVersion} (${os.platform()} ${os.release()}-${os.arch()}; Node.js ${process.version})`

const kApiVersioning = Symbol('api versioning')
const kEventEmitter = Symbol('event emitter')

@@ -76,2 +76,3 @@ class Transport {

this[kApiVersioning] = process.env.ELASTIC_CLIENT_APIVERSIONING === 'true'
this[kEventEmitter] = new EventEmitter()

@@ -188,2 +189,3 @@ this.nodeFilter = opts.nodeFilter || defaultNodeFilter

if (meta.aborted === true) {
this.emit('request', new RequestAbortedError(), result)
return process.nextTick(callback, new RequestAbortedError(), result)

@@ -427,4 +429,2 @@ }

if (options.asStream === true) params.asStream = true
meta.request.params = params
meta.request.options = options

@@ -460,2 +460,4 @@ // handle compression

meta.request.params = params
meta.request.options = options
// still need to check the product or waiting for the check to finish

@@ -468,3 +470,3 @@ if (this[kProductCheck] === 0 || this[kProductCheck] === 1) {

// wait for product check to finish
productCheckEmitter.once('product-check', (error, status) => {
this[kEventEmitter].once('product-check', (error, status) => {
if (status === false) {

@@ -573,6 +575,6 @@ const err = error || new ProductNotSupportedError(result)

)
productCheckEmitter.emit('product-check', null, true)
this[kEventEmitter].emit('product-check', null, true)
} else {
this[kProductCheck] = 0
productCheckEmitter.emit('product-check', err, false)
this[kEventEmitter].emit('product-check', err, false)
}

@@ -583,3 +585,3 @@ } else {

debug('Can\'t access Elasticsearch version')
return productCheckEmitter.emit('product-check', null, false)
return this[kEventEmitter].emit('product-check', null, false)
}

@@ -591,7 +593,7 @@ const tagline = result.body.tagline

if (major < 6) {
return productCheckEmitter.emit('product-check', null, false)
return this[kEventEmitter].emit('product-check', null, false)
} else if (major >= 6 && major < 7) {
if (tagline !== 'You Know, for Search') {
debug('Bad tagline')
return productCheckEmitter.emit('product-check', null, false)
return this[kEventEmitter].emit('product-check', null, false)
}

@@ -601,3 +603,3 @@ } else if (major === 7 && minor < 14) {

debug('Bad tagline')
return productCheckEmitter.emit('product-check', null, false)
return this[kEventEmitter].emit('product-check', null, false)
}

@@ -608,3 +610,3 @@

this[kProductCheck] = 4
return productCheckEmitter.emit('product-check', null, false)
return this[kEventEmitter].emit('product-check', null, false)
}

@@ -614,3 +616,3 @@ } else {

debug('x-elastic-product not recognized')
return productCheckEmitter.emit('product-check', null, false)
return this[kEventEmitter].emit('product-check', null, false)
}

@@ -620,3 +622,3 @@ }

this[kProductCheck] = 2
productCheckEmitter.emit('product-check', null, true)
this[kEventEmitter].emit('product-check', null, true)
}

@@ -623,0 +625,0 @@ })

@@ -14,4 +14,4 @@ {

"homepage": "http://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/index.html",
"version": "7.16.0-canary.1",
"versionCanary": "7.16.0-canary.1",
"version": "7.16.0-canary.2",
"versionCanary": "7.16.0-canary.2",
"keywords": [

@@ -107,3 +107,3 @@ "elasticsearch",

},
"commitHash": "65fabb26"
"commitHash": "bb8f3977"
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc