Commit Graph

61 Commits

Author SHA1 Message Date
349b832d2b Support for deprecated paths (#828)
* Updated code generation

* API generation

* Updated test
2019-04-26 09:25:34 +02:00
928746d19f Updated test 2019-04-24 10:55:14 +02:00
a21281fc48 Improve typings (#813)
The ApiResponse now accepts a generics that defaults to any, same for every API method that might need a body.
2019-04-10 11:40:25 +02:00
2919f93b73 Custom http agent support (#810) 2019-04-10 11:13:22 +02:00
5af9ec1040 Support for publish_address as hostname/ip:port (#804) 2019-04-08 17:13:44 +02:00
fb73b4b08d Master should use the latest version of ES (#780)
The `master` branch should work with the latest snapshot of Elasticsearch.

- Use `8.0.0-SNAPSHOT`
- Code generation
- Updated scripts and CI conf
2019-03-28 09:05:00 +01:00
5bc57b03bf Improved integration test runner 2019-03-27 14:59:55 +01:00
46bd14a36c Better api error handling (#790)
* API generation

* Updated code generation

* Updated test
2019-03-26 12:04:44 +01:00
5c60d98180 Inspect Connection (#784)
Handles `console.log` and `utils.inspect` invocations for a better debugging experience.

`agent` and `ssl` are hidden since they made the logs very hard to read.
The user can still access them with `instance.agent` and `instance.ssl`.
2019-03-19 09:50:36 +01:00
c53c798899 feat: add support for querystring in options object (#779)
In very few cases, some API uses the same key for both url and query params, such as the bulk method.
The client is not designed to handle such cases since accepts both url and query keys in the same object, and the url parameter will always take precedence.
This pr fixes this edge case by adding a `querystring` key in the options object.

Fixes: https://github.com/elastic/elasticsearch-js/pull/778

```js
client.bulk({
  index: 'index',
  type: '_doc',
  body: [...]
}, {
  querystring: {
    type: '_doc'
  }
}, console.log)
```
2019-03-15 18:09:44 +01:00
a713e28853 WIP: benchmarks (#745)
* Updated dependencies

* Updated .gitignore

* WIP: macro and micro benchmarks

* Updated benchmark suite

* Use the same suite for both macro and micro benchmarks

* WIP: benchmark report

* Updated benchmark suite

* Updated docker scripts

* Updated benchmark suite

* Updated scripts

* Updated benchmark suite

* Added split2
2019-03-12 16:45:49 +01:00
c990ed43d4 Updated test 2019-03-11 17:12:53 +01:00
cae38e6b2b License (#773)
- Added license header
- Added license checker
- Fixed tap
2019-03-08 07:47:24 +01:00
ed3cca0fe6 Platinum integration test (#772)
🎉
2019-03-01 08:42:56 +01:00
fe3c48e83e Updated test 2019-02-28 10:57:48 +01:00
d9b2a969d6 Updated test 2019-02-21 15:39:10 +01:00
5b856cd4c2 Child client support (#768)
With this pr we introduce the `client.child` API, which returns a new client instance that shares the connection pool with the parent client.
This feature can be handy if you need to have multiple client instances with different configurations, but with a shared connection pool.

Example:

```js
const { Client } = require('@elastic/elasticsearch')
const client = new Client({ node: 'http://localhost:9200' })
const child = client.child({
  headers: { 'x-foo': 'bar' },
  requestTimeout: 1000
})

client.info(console.log)
child.info(console.log)
```

**Open questions:**

* Currently, the event emitter is shared between the parent and the child(ren), is it ok?
* Currently, if you extend the parent client, the child client will have the same extensions, while if the child client adds an extension, the parent client will not be extended. Is it ok?

**Caveats:**

* You can override _any_ option except for the connection pool specific options (`ssl`, `agent`, `pingTimeout`, `Connection`, and `resurrectStrategy`).
* You can't specify a new `Connection` class.
* If you call `close` in any of the parent/child clients, every client will be closed.

_Note: the `nodeFilter` and `nodeSelector` options are now `Transport` options and no longer `ConnectionPool` options._
2019-02-21 12:48:49 +01:00
66e8d61476 Updated test 2019-02-20 12:43:15 +01:00
a8f861c4d4 Updated test 2019-02-19 09:34:14 +01:00
bcf895294b Updated test 2019-02-19 08:34:06 +01:00
aa9f5b6d41 Updated integration test runner 2019-02-18 13:00:43 +01:00
2dbf00e821 Updated test 2019-02-12 16:40:19 +01:00
d9a5f24e24 Code coverage++ 2019-02-11 17:37:44 +01:00
3023e45661 Updated test 2019-02-11 12:03:55 +01:00
5e7ca876e4 Added extend method (#763)
* Added extend method

* Updated test
2019-01-30 19:10:59 +01:00
95c4369f9b Updated test 2019-01-30 09:33:13 +01:00
23cfe11e44 Unknown parameters handling (#761) 2019-01-29 17:31:43 +01:00
7acd2e3b07 Elasticsearch 7 support 🚀 (#760)
* API generation

* Updated typings

* Updated code generation

* Updated test

* Updated ci configuration

* Fixed test
2019-01-29 12:10:20 +01:00
bd2755a302 Updated test 2019-01-28 11:27:36 +01:00
9936c0622a Updated test 2019-01-21 16:49:18 +01:00
f12424272f Updated test 2019-01-14 16:09:47 +01:00
dd9ce34079 Updated test 2018-12-19 19:49:40 +01:00
7a181ff9ac Updated test 2018-12-18 17:29:06 +01:00
7cbc887ea0 Updated test 2018-12-13 17:00:33 +01:00
4bf9128cac Updated test 2018-12-12 19:48:27 +01:00
a86a552a85 Updated test 2018-12-12 16:53:51 +01:00
230b08ab86 Updated test 2018-12-10 20:15:42 +01:00
3b737f8e2b Updated test 2018-12-05 22:18:41 +01:00
7e35f6a903 Updated behavior test 2018-12-05 19:33:54 +01:00
18b8c32758 Added behavior test 2018-12-05 17:27:01 +01:00
8fd49389f3 Added debug logs in test 2018-12-05 12:31:24 +01:00
4b2df7504e Updated test 2018-12-04 14:30:28 +01:00
bf4adf0546 Updated test 2018-12-03 18:11:59 +01:00
ab1d7ba992 Typings support (#737)
* Updated scripts

* Updated .gitignore

* Removed symbols

* Fixed typo

* Added typings

* Updated test

* Added typings test
2018-11-30 17:01:55 +01:00
53329e48bc Updated test 2018-11-20 18:52:22 +01:00
da710e26e1 Updated test 2018-11-19 11:35:02 +01:00
bd5ba19e17 Updated test 2018-11-15 17:53:54 +01:00
6284d71281 Merge branch 'next' of https://github.com/elastic/elasticsearch-js into next 2018-11-09 18:09:31 +01:00
ca5e9ca743 Force close the server once the test is finished 2018-11-09 18:09:29 +01:00
6f08079953 WIP: clients-ci (#723)
clients-ci
2018-11-09 17:57:23 +01:00