@elastic/elasticsearch 7.7.0-rc.2 → 7.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/api/api/async_search.submit.js +4 -0
- package/api/api/autoscaling.delete_autoscaling_policy.js +78 -0
- package/api/api/autoscaling.get_autoscaling_policy.js +78 -0
- package/api/api/autoscaling.put_autoscaling_policy.js +82 -0
- package/api/api/bulk.js +4 -0
- package/api/api/cluster.delete_component_template.js +1 -1
- package/api/api/cluster.delete_voting_config_exclusions.js +79 -0
- package/api/api/cluster.exists_component_template.js +86 -0
- package/api/api/cluster.get_component_template.js +1 -1
- package/api/api/cluster.post_voting_config_exclusions.js +82 -0
- package/api/api/cluster.put_component_template.js +1 -1
- package/api/api/delete_by_query.js +4 -0
- package/api/api/eql.search.js +1 -1
- package/api/api/exists.js +4 -0
- package/api/api/exists_source.js +4 -0
- package/api/api/explain.js +4 -0
- package/api/api/get.js +4 -0
- package/api/api/get_source.js +4 -0
- package/api/api/indices.delete_index_template.js +86 -0
- package/api/api/indices.exists_index_template.js +88 -0
- package/api/api/indices.get_index_template.js +87 -0
- package/api/api/indices.put_index_template.js +91 -0
- package/api/api/indices.simulate_index_template.js +87 -0
- package/api/api/mget.js +4 -0
- package/api/api/ml.delete_data_frame_analytics.js +2 -1
- package/api/api/ml.validate.js +1 -0
- package/api/api/ml.validate_detector.js +1 -0
- package/api/api/search.js +4 -0
- package/api/api/searchable_snapshots.clear_cache.js +83 -0
- package/api/api/searchable_snapshots.mount.js +94 -0
- package/api/api/searchable_snapshots.repository_stats.js +78 -0
- package/api/api/searchable_snapshots.stats.js +77 -0
- package/api/api/snapshot.cleanup_repository.js +1 -1
- package/api/api/tasks.cancel.js +2 -0
- package/api/api/update.js +4 -0
- package/api/api/update_by_query.js +4 -0
- package/api/index.js +39 -1
- package/api/requestParams.d.ts +119 -3
- package/index.d.ts +156 -16
- package/index.js +9 -2
- package/lib/Connection.js +8 -2
- package/lib/Helpers.d.ts +22 -5
- package/lib/Helpers.js +328 -32
- package/lib/Transport.js +30 -15
- package/lib/pool/BaseConnectionPool.js +2 -0
- package/lib/pool/CloudConnectionPool.js +1 -1
- package/lib/pool/ConnectionPool.js +12 -2
- package/package.json +21 -13
|
@@ -11,7 +11,7 @@ const Connection = require('../Connection')
|
|
|
11
11
|
const noop = () => {}
|
|
12
12
|
|
|
13
13
|
class ConnectionPool extends BaseConnectionPool {
|
|
14
|
-
constructor (opts
|
|
14
|
+
constructor (opts) {
|
|
15
15
|
super(opts)
|
|
16
16
|
|
|
17
17
|
this.dead = []
|
|
@@ -60,7 +60,17 @@ class ConnectionPool extends BaseConnectionPool {
|
|
|
60
60
|
const { id } = connection
|
|
61
61
|
debug(`Marking as 'dead' connection '${id}'`)
|
|
62
62
|
if (this.dead.indexOf(id) === -1) {
|
|
63
|
-
|
|
63
|
+
// It might happen that `markDead` is called jsut after
|
|
64
|
+
// a pool update, and in such case we will add to the dead
|
|
65
|
+
// list a node that no longer exist. The following check verify
|
|
66
|
+
// that the connection is still part of the pool before
|
|
67
|
+
// marking it as dead.
|
|
68
|
+
for (var i = 0; i < this.size; i++) {
|
|
69
|
+
if (this.connections[i].id === id) {
|
|
70
|
+
this.dead.push(id)
|
|
71
|
+
break
|
|
72
|
+
}
|
|
73
|
+
}
|
|
64
74
|
}
|
|
65
75
|
connection.status = Connection.statuses.DEAD
|
|
66
76
|
connection.deadCount++
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"types": "index.d.ts",
|
|
6
6
|
"homepage": "http://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/index.html",
|
|
7
|
-
"version": "7.
|
|
7
|
+
"version": "7.8.0",
|
|
8
8
|
"keywords": [
|
|
9
9
|
"elasticsearch",
|
|
10
10
|
"elastic",
|
|
@@ -16,20 +16,19 @@
|
|
|
16
16
|
"index"
|
|
17
17
|
],
|
|
18
18
|
"scripts": {
|
|
19
|
-
"test": "npm run lint &&
|
|
20
|
-
"test:
|
|
21
|
-
"test:
|
|
19
|
+
"test": "npm run lint && tap test/{unit,acceptance}/{*,**/*}.test.js && npm run test:types",
|
|
20
|
+
"test:node8": "npm run lint && tap test/{unit,acceptance}/*.test.js && npm run test:types",
|
|
21
|
+
"test:unit": "tap test/unit/{*,**/*}.test.js",
|
|
22
|
+
"test:acceptance": "tap test/acceptance/*.test.js",
|
|
22
23
|
"test:integration": "node test/integration/index.js",
|
|
23
|
-
"test:integration:helpers": "tap test/integration/helpers/*.test.js
|
|
24
|
+
"test:integration:helpers": "tap test/integration/helpers/*.test.js",
|
|
24
25
|
"test:types": "tsd",
|
|
25
|
-
"test:coverage": "tap test/unit
|
|
26
|
-
"test:coverage-
|
|
26
|
+
"test:coverage-100": "tap test/{unit,acceptance}/{*,**/*}.test.js --coverage --100 --nyc-arg=\"--exclude=api\"",
|
|
27
|
+
"test:coverage-report": "tap test/{unit,acceptance}/{*,**/*}.test.js --coverage --nyc-arg=\"--exclude=api\" && nyc report --reporter=text-lcov > coverage.lcov",
|
|
28
|
+
"test:coverage-ui": "tap test/{unit,acceptance}/{*,**/*}.test.js --coverage --coverage-report=html --nyc-arg=\"--exclude=api\"",
|
|
27
29
|
"lint": "standard",
|
|
28
30
|
"lint:fix": "standard --fix",
|
|
29
|
-
"
|
|
30
|
-
"license-checker": "license-checker --production --onlyAllow='MIT;Apache-2.0;Apache1.1;ISC;BSD-3-Clause;BSD-2-Clause'",
|
|
31
|
-
"elasticsearch": "./scripts/es-docker.sh",
|
|
32
|
-
"elasticsearch:xpack": "./scripts/es-docker-platinum.sh"
|
|
31
|
+
"license-checker": "license-checker --production --onlyAllow='MIT;Apache-2.0;Apache1.1;ISC;BSD-3-Clause;BSD-2-Clause'"
|
|
33
32
|
},
|
|
34
33
|
"author": {
|
|
35
34
|
"name": "Tomas Della Vedova",
|
|
@@ -40,6 +39,7 @@
|
|
|
40
39
|
"company": "Elasticsearch BV"
|
|
41
40
|
},
|
|
42
41
|
"devDependencies": {
|
|
42
|
+
"@sinonjs/fake-timers": "github:sinonjs/fake-timers#0bfffc1",
|
|
43
43
|
"@types/node": "^12.6.2",
|
|
44
44
|
"convert-hrtime": "^3.0.0",
|
|
45
45
|
"dedent": "^0.7.0",
|
|
@@ -49,7 +49,6 @@
|
|
|
49
49
|
"into-stream": "^5.1.1",
|
|
50
50
|
"js-yaml": "^3.13.1",
|
|
51
51
|
"license-checker": "^25.0.1",
|
|
52
|
-
"lolex": "^4.0.1",
|
|
53
52
|
"minimist": "^1.2.0",
|
|
54
53
|
"ora": "^3.4.0",
|
|
55
54
|
"pretty-hrtime": "^1.0.3",
|
|
@@ -62,7 +61,8 @@
|
|
|
62
61
|
"stoppable": "^1.1.0",
|
|
63
62
|
"tap": "^14.4.1",
|
|
64
63
|
"tsd": "^0.11.0",
|
|
65
|
-
"workq": "^2.1.0"
|
|
64
|
+
"workq": "^2.1.0",
|
|
65
|
+
"xmlbuilder2": "^2.1.2"
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
68
|
"debug": "^4.1.1",
|
|
@@ -84,5 +84,13 @@
|
|
|
84
84
|
},
|
|
85
85
|
"tsd": {
|
|
86
86
|
"directory": "test/types"
|
|
87
|
+
},
|
|
88
|
+
"tap": {
|
|
89
|
+
"esm": false,
|
|
90
|
+
"ts": false,
|
|
91
|
+
"jsx": false,
|
|
92
|
+
"flow": false,
|
|
93
|
+
"coverage": false,
|
|
94
|
+
"jobs-auto": true
|
|
87
95
|
}
|
|
88
96
|
}
|