* Add support to kbn-es and kbn-test for data archives
* Fix log indent
* Decompress directly to data directory
Co-Authored-By: joshdover <me@joshdover.com>
* Improve logs
* feat(NA): upgrade node js version on file configs.
* chore(NA): migrate configs and 3rd party dependencies to work on node js 10.x
* fix(NA): add missing async function declaration.
* chore(NA): updated elastic/good package to work with node10
* chore(NA): update lockfiles.
* fix(NA): add missing dep.
* fix(NA): types for node 10.
* test(NA): fix error return type for node10.
* fix(NA): kbn-pm webpack config to unlazy a require using lazy-cache. fix(NA): build to work with node 10.
* test(NA): jest integration test for kbn-pluin-helpers.
* test(NA): fix jest tests for kbn-es.
* fix(NA): use ostmpdir instead of a tmp folder inside the fixtures.
* fix(NA): change afterEach on kbn es decompress test.
* fix(NA): change afterEach on kbn es decompress test.
* fix(NA): readd mock-fs for the tests that still use it on kbn-es and that works on node10.
* fix(NA): readd mock-fs for the tests that still use it on kbn-es and that works on node10.
* refact(NA): rewrite tests using mock-fs and completely remove this dependency.
* fix(NA): failing test implementation using jest mock in order to replace mock-fs.
* fix(NA): update jest snapshots to match new ones generated one node 10.
* fix(NA): cli/cluster mock to spyOn off method instead off spyOn removeListener as this was changed on Node 10.
* fix(NA): tests for cluster_manager to also spyOn off and on instead of addListener and removeListener
* test(NA): fix management advance settings image field test flow.
* fix(NA): apply missing types for src/core/server/plugins/discovery/plugins_discovery.ts.
* test(NA): updated 2 missing snapshots for KuiCodeEditor on kbn-ui-framework.
* refact(NA): fix eslint errors.
* refact(NA): fix ts code with tslint fix. chore(NA): update jest snapshots.
* chore(NA): migrate kbn config schema peer dependency to last used joi version to avoid warning on bootstrap.
* fix(NA): tslint errors.
* chore(NA): upgrade types node to the last version.
* fix(NA): missing utf8 input format encoding when reading a file.
* chore(NA): upgrade to node 10.14.1
* fix(NA): Buffer api usage to avoid deprecation warnings.
In order to pre-fetch Elasticsearch snapshots and avoid timeouts during download in images, this adds a `--download` option to the `es snapshot` command.
* [build] Support version-qualifier flag
* add help description
* fix test
* is-release
* temp: re-add alpha1 to package.json
* use version qualifier in build
* fix merge
* Revert "temp: re-add alpha1 to package.json"
This reverts commit a70688542c.
* x-pack
* remove ci build flag
* remove ci build flag
* remove qualifier from canvas
* remove qualifier from infra
* fix x-pack argv
* update comment
* Update rmrfSync method
* Add catch statement
* Fix lint issues
* switch to del package
* remove old rmrf_sync module
* Fix CI failure del is not a function error
* Fix spaces
* Initial handling of windows process termination
* Update exiting ES cluster process on windows
* Use tree-kill
* Add dependency
* Update with solution from Spencer
* Remove catch statement
I was surprised when I tried to spread a `Set` in TypeScript and the browser complained about `Set.slice()` not being defined. This is because TypeScript does not automatically enable support for iterators when targeting earlier ES versions, like we do in the browser, unless you use the `"downlevelIteration": true` compiler option. This injects some helpers into the necessary files for reading/spreading iterators, which can be stuffed behind an import statement with using the `"importHelpers": true` compiler option and include `tslib` in our dependencies. This is already a dependency of several of our packages, so it shouldn't cause any additional modules.
* [devUtils/toolingLog] give tooling log configurable writers
* property shorthand
* remove redundant parameter
* call Error.captureStackTrace when subclassing Error
* describe why we skip stack trace logging for CliError
* always return true/false from log writers
* improve type definitions, writeTo is just an object with write method
* get rid of weird dedent for failures
This upgrades prettier to version 1.14.0. The main motivation is to gain support for the new TypeScript language features introduced in 2.9 and 3.0.
Prettier versions 1.13 and 1.14 also introduced some other JavaScript and TypeScript style improvements resulting in a few small line break and parenthesis changes.
The relevant release notes are:
* [Prettier 1.13.0 Release Notes](https://prettier.io/blog/2018/05/27/1.13.0.html)
* [Prettier 1.40.0 Release Notes](https://prettier.io/blog/2018/07/29/1.14.0.html)
In order to make the license that applies to each file as clear as possible, and to be consistent with elasticsearch, we are adding Apache 2.0 license headers to the top of each file.
Existence of this header is enforced by eslint and tslint and missing headers were automatically added in the last commit by running:
```
node scripts/eslint --fix && node scripts/tslint --fix
```
ES snapshots are located again within the base elasticsearch directory and NOT within an additionally nested elasticsearch-oss directory
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
* [kbn-es/cluster] fix promise handling to properly route success/failure
* [kbn-es/cli] catch errors that bubble to the CLI and log with a bit of style
* [kbn-es] fix promise handling when building from source
* [kbn-es] check for inverse of .stop() condition
* [kbn-es/cluster] resolve promise is cluster stops cleanly
* [kbn-es/cluster/start] reject if ES exits before starting
When kbn-es downloads a snapshot, it writes the in progress download to
`/tmp` rather than the destination path in case the download fails part
way through, then renames the file from `/tmp` to the final location.
This is a good practice, but in CI the `/tmp` directory isn't stored on
the same disk as the project, which causes a rename error to occur
because we're attempting to rename across devices.
This updates the download logic to write to `${destPath}.tmp` instead,
and do the same renaming, so that we can avoid cross-device errors.