Commit graph

676 commits

Author SHA1 Message Date
renovate[bot] bf7e066cc9 Update dependency @elastic/elasticsearch to ^7.3.0 (#43911) 2019-08-25 13:55:03 -07:00
renovate[bot] b1d48d949e Update eslint related packages (#43902) 2019-08-23 14:38:02 -07:00
renovate[bot] 5e7b8f943e Update dependency write-pkg to v4 (#43226)
* Update dependency write-pkg to v4

* rebuild kbn-pm and point worker_threads to built-in module
2019-08-23 13:50:07 -07:00
renovate[bot] b318ebe6bb Update dependency @babel/cli to v7.5.5 (#43836) 2019-08-23 08:26:25 -07:00
Spencer 90de95822b
[mocha] fix test selectors to get everything in packages (#43797)
* [mocha] fix test selectors to get everything in packages

* fix paths in tests

* ignore test files that make it into target directories

* [@kbn/test] don't build test files

* move tests from datemath and test-subj pkgs into __tests__ dirs

* [kbn/test-subj] remove test script

* update yarn.lock
2019-08-22 18:49:01 -07:00
renovate[bot] 572274b779 Update babel related packages (#43595)
* upgrade all babel related modules, and bump lodash minors

* update kbn-pm dist

* update fetch-mock, necessary to use core-js 3

* use regenerator transform in jest tests, as required by EUI

* disable useBuiltIns rather than using regenerator plugin

* remove extra regenerator-runtime import
2019-08-22 18:40:57 -07:00
Tyler Smalley daa86da4cf
Transpile @kbn/analytics with Babel (#43407)
Since this is being imported by the UI as a package, we need to transpile for the
browsers we need to support.

Fixes #42782

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2019-08-22 12:58:51 -07:00
Josh Dover c2ef2c8f51
Add support for dynamic imports (#43716) 2019-08-22 09:48:39 -05:00
Sébastien Loix 1b164c1902
[Console] Update autocomplete api definition (#43651) 2019-08-22 07:35:35 +02:00
Jean-Louis Leysens 357e929bd2
Backport spec_to_console script to work with new JSON file format. (#43427)
* Backport spec_to_console script to work with new JSON file format.

* Updated test fixture to use new JSON file pattern

* Fix if statement
2019-08-19 12:26:33 -07:00
Spencer e8409c0160
Move src/dev/run to @kbn/dev-utils (#43387)
* move src/dev/run into `@kbn/dev-utils`

* forgot to save a replacement
2019-08-16 07:13:54 -07:00
Tre 5d8ad40c5c
[FTR] Refactor mocha under @kbn/test (#42862)
* Run prettier on the files that will be refactored under @kbn/test, in a follow-up pr.

* Fixup all paths to mocha,
under kbn-test, with needed
exports/imports.

* Fixed borked path (bad refactor).

* Fixup one more borked path.

* Fixup tsconfig for xml.ts

* Drop setup_node_env as it's already
in KIBANA/scripts/mocha.js.
Also, fixup cwd for globby as we are
exec-ing from a different directory.
2019-08-15 15:48:39 -06:00
Spencer 7739f5da9e
ts-ify @kbn/dev-utils (#43383) 2019-08-15 12:34:03 -07:00
Spencer b2515c780d
[watcher] add missing await (#41351)
* [watcher] add missing await

* run x-pack-firefoxSmoke ciGroup 40 times, run watcher tests 20 times per job

* Fix failing watcher test

* Revert "run x-pack-firefoxSmoke ciGroup 40 times, run watcher tests 20 times per job"

This reverts commit c5d891d44d.

* Clean up watches via api

* fix linting errors

* don't swallow errors, wait for completion

* strip trailing numbers in suite tags

* run x-pack-firefoxSmoke group 40 times

* Revert "run x-pack-firefoxSmoke group 40 times"

This reverts commit cc4eb6ce54.

* run x-pack-firefoxSmoke group 40 times

# Conflicts:
#	.ci/jobs.yml

* run tests 80 times

* Revert "run tests 80 times"

This reverts commit 4320c9488a.

* Revert "run x-pack-firefoxSmoke group 40 times"

This reverts commit cf0d4056d7.
2019-08-15 10:49:36 -07:00
Jonathan Budzenski e6e92ac2bf
[test] remove x-pack mocha configuration (#42979)
* update scripts

* run mocha from root

* rm mocha grunt task

* rm x-pack mocha setup

* rm x-pack/mocha*

* Revert "rm x-pack/mocha*"

This reverts commit fb56005e77.
2019-08-15 12:21:42 -05:00
Tiago Costa 1d6d1027ca
fix(NA): get dll entries across platforms (#43224)
* fix(NA): get dll entries across platforms

* chore(NA): some more improvements
2019-08-14 03:44:53 +01:00
Patrick Mueller 19fa802697
fix schema.nullable() to support non-strings (#42891)
The previous implementation of `schema.nullable()` ends up having
a problem - it only works right for `schema.nullable(schema.string())`.
For other types, like `schema.number()` and `schema.boolean()`, a `null`
value passed in does not validate.

I poked around a bit, but "it's complicated".  So, went with the
suggested approach of using a `schema.maybe([V, null])` validation,
which works for number and boolean.

Added some additional tests on the `nullable` type.
2019-08-13 21:38:15 -04:00
Tiago Costa e4830625d6
chore(NA): correctly set kibanaRoot on kibana plugin helpers for new generated plugins (#42616)
* chore(NA): correctly set kibanaRoot on kibana plugin helpers for new generated plugins

* chore(NA): support both kibana-extra and plugins dir
2019-08-13 16:16:44 +01:00
renovate[bot] b178de1975 Update dependency supports-color to v7 (#43064) 2019-08-12 12:43:27 -06:00
Vadim Dalecky 48df3c8893
Utility types (#41246)
* feat: 🎸 add @kbn/utility-types

* feat: 🎸 improve @kbn/utility-types

* chore: 🤖 move @kbn/utility-types to dev deps

* chore: 🤖 change @kbn/utility-types build setup

* fix: 🐛 implement review suggestions

* feat: 🎸 add ShallowPromise type

* Update packages/kbn-utility-types/README.md

Co-Authored-By: Luke Elmers <lukeelmers@gmail.com>

* test: 💍 add tests for utility-types

* chore: 🤖 add utility-types tests to TypeScript config

* test: 💍 remove negative tests to not cause TypeScript fail

* chore: 🤖 remove ref to type defs to try fix CI tests

* Update packages/kbn-utility-types/index.ts

Co-Authored-By: Spencer <email@spalger.com>

* chore: 🤖 add TS types index to fix `grunt run:test_projects`

* chore: 🤖 use similar tsconfig.json as in other packages

* chore: 🤖 add "clean" script

* chore: 🤖 add kbn:bootstrap script
2019-08-12 15:45:32 +02:00
renovate[bot] 7b39137ce8 Update dependency commander to v3 (#43041) 2019-08-09 16:13:31 -06:00
Tyler Smalley 35d33b7fbf
[kbn-es] Support for passing regex value to ES (#42651)
We test each value to determine if it's a file, in which case we move it to the
config directory. This is required to support things like SSL certificates which
are required to be within the ES directory. path.isAbsolute evalues to true for
a regular expression. In order to resolve this, we also verify that the file
exists.

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2019-08-08 18:03:03 -07:00
Mike Côté cb0cabf0cc
Add Elasticsearch SSL support for integration tests (#41765)
* Allow tests to use SSL between Kibana and Elasticsearch

* Fix cert path

* By default no tests will use the new ssl feature
2019-08-08 18:38:16 -04:00
Tre 1681f78a52
Drop explicit dependency, to fixup #42867 (#42886) 2019-08-07 16:59:06 -06:00
Mike Côté aaea5679d0
Add SSL support when starting Elasticsearch from yarn es (#42527)
* Initial work

* Add integration tests

* Use constants

* Fix broken code

* Handle scenario where esArgs is a string

* Remove || []

* Apply PR feedback

* Use const format
2019-08-07 10:34:44 -04:00
dave.snider@gmail.com 04a9547612
Remove unused KUI code (#42748)
* Remove unused KUI code

* delete a bunch of dead code

* feedback

* linting
2019-08-06 17:50:46 -07:00
Tre e62ec7c5ec
[FTR] Refactor FTR to live under KBN-TEST (#42547)
Refactor the FTR to live under KBN-TEST . 

Next, refactor any and all files that the
FTR needs to live under KBN-TEST,
as needed.
2019-08-06 15:35:16 -06:00
Nick Peihl 8a3b96d768
[Maps] Load Maki icons from spritesheet (#42499)
* Load Maki icons from spritesheet
2019-08-06 13:32:04 -07:00
Patrick Mueller 25026381ec
Adds config-schema nullable composite type (#41728)
The `nullable` type is very similar to the `maybe` type, except that
it validates nulls and undefined values to null, instead of undefined.
Eg,

    maybe(T): T | undefined
    nullable(T): T | null
2019-08-06 09:46:00 -04:00
Matt Bargar dd75d831fe
Put filters back in the filter context where they belong (#42095)
Filters were never really meant to take part in scoring in the first place. This PR puts filters back in the filter context where they were in 4.x so they can benefit from the filter cache.
2019-08-01 17:43:01 -04:00
Aleh Zasypkin 1a103c02e4
[@kbn/es] Add a predefined list of Elasticsearch secure settings to be added into keystore. Re-enable OIDC tests. (#42239) 2019-08-01 09:14:51 +02:00
Peter Pisljar ba8a453112 Initial conversion of Index Patterns service to TypeScript. 2019-07-30 08:26:42 -06:00
dave.snider@gmail.com c2b926e2e7
EUI 13.0.0 (#41723) 2019-07-23 15:09:16 -07:00
Ahmad Bamieh 9d7cf53eba
[telemetry] Analytics Package (#41113)
* kbn-analytics

* kbn-analytics

* expose provider

* add logger

* performance and stats reporters

* finalize ui stats metric

* functional tests

* remove readme file for now

* update readme

* add types file into to tsconfigs

* Update packages/kbn-analytics/src/report.ts

Co-Authored-By: Josh Dover <me@joshdover.com>

* fix typechecks

* use enum instead of strings for metric types

* getUiStatsReporter -> createUiStatsReporter

* fix special typo in README

* remove unused stop method

* fix tests

* default debug to false

* use chrome.getInjected

* add METRIC_TYPE to jest module mocks

* mock create fn

* handle enabled:false

* init ui_metric in test setup env

* regenerator runtime

* transform-regenerator

* update lock file

* update babel configs

* runtime dep

* add regenerator

* babel configs

* use env-preset

* merge conflicts

* fix workpad telemetry tests

* regeneratorRuntime attempt to fix number 30000

* env targets

* remove module config

* try again

* try without regenerator

* use kbn/babel-preset/webpack_preset only

* runtime

* just use typescript

* update tsconfig

* Caches trackers by app value for infra useTrackMetric hook
2019-07-23 15:46:56 +03:00
Ahmad Bamieh 131e4c24c3
[i18n] fix i18nrc parsing (#41741)
* check for translations in file

* update template
2019-07-23 14:31:37 +03:00
Tiago Costa b17e4ad8f3
chore(NA): enable @typescript-eslint/explicit-member-accessibility rule (#41422) 2019-07-19 16:30:54 +01:00
taku333 2a0ea9eaed [Kibana Plugin Generator]target branch → version (#30207)
A version error will occur each time the following procedure is executed.
Changing「6.6」 from 「6.6.1」 will succeed.
So I changed branch (6.6) to version(6.6.1).

1.Execute「node scripts/generate_plugin my_plugin_name」with [Kibana Plugin Generator][Quick Start]
2.Answer「6.6」to the question 「What Kibana version are you targeting?(6.x)」
3.Execute「yarn start」
2019-07-18 14:00:19 -07:00
Vadim Dalecky 8f0de3abdb
chore: 🤖 forbid import from ui/** (#40537)
* chore: 🤖 forbid importing from ui/** from within shims

* chore: 🤖 allow importing platfrom in dashboard embeddable sihm

* chore: 🤖 use np_ready folder, improve rule

* chore: 🤖 update ESLint error message

* feat: 🎸 improve eslint plugin rule

* test: 💍 add tests for restricted paths linter rule

* test: 💍 add ESLint package to CI testing suite

* chore: 🤖 fix linter errors
2019-07-18 22:52:13 +02:00
Spencer c3f31c79fb
[jest] disallow invalid describe calls (#41378)
* [jest] disallow invalid describe calls

* correct other describe calls

* remove unnecessary glob

* cast decribe names to strings

* remove new async describe function
2019-07-18 10:11:33 -07:00
Spencer 06b9853925
[autoprefixer] upgrade to 9.6.1, unify browserslist handling (#41038)
* [autoprefixer] upgrade to 9.6.1, unify browserslist handling

* remove debug option from datemath babel config
2019-07-15 09:33:33 -07:00
Aleh Zasypkin 6a29ef4105
Make Kerberos authentication provider work with Elastic anonymous access. (#40994) 2019-07-15 17:30:58 +02:00
Brandon Kobel 174102c70c
Updating lodash (#40702)
* Updating to @elastic/lodash to 3.10.1-npm-kibana2

* Updating lodash to 4.17.13

There's a stray dependency to lodash 4.17.11 via cypress which doesn't
use "^". This is a dev dependency, so we can ignore it for a bit while
they update their package.json

* Updating some forgotten references to @elastic/lodash@3.10.1-kibana1

* Updating lodash-es to 4.17.13

* Updating to @elastic/lodash to 3.10.1-npm-kibana3

* Using the root resolutions to update cypress's version of lodash.

Thanks @spalger!!!
2019-07-12 10:32:45 -07:00
Spencer 415e3bca27
[ts] upgrade to 3.5.3 (#40228)
* [ts] upgrade to 3.5.2

* [ts] run from cwd so that relative paths are correct

* move eslint-disable-line comment into jsx attribute

* autofix eslint violations

* avoid generic type, it's not necessary and problematic

* make elasticsearch.cluster optional, many instances don't have them

* remove invalid prop

* expand AllowUnknownProperties to cleanly handle arrays

* esfilter values can sometimes be an array of strings

* allow exception objects to have unknown properties

* define accumulator as a boolean

* fix return type

* return a 404 if beat isn't found after update

* use Object.values for better types

* define return type of get() call

* define value type for Set

* define return value of get()

* define State property type

* use less get(), so ts can infer types

* define Set item type

* map state type

* make default_operator optional, since it's not always defined

* remove seemingly unused prop

* define return type of get() fn

* define inner type for state

* don't define base types are objects with index signatues

* regenerate public api docs

* make indices privileges optional too

* remove unnecessary index-signature from Exception interface

* use variadic _arg instead

* [core/plugin] use Record<string, any> rather than {}

* replace a couple more instances of {}

* revert some unnecessary changes

* remove unused types

* [reporting] output, payload, and meta are required properties

* bump to latest patch version
2019-07-10 12:26:23 -07:00
Ahmad Bamieh f9e45f37cd
[Core] Remove lock file from packages/kbn-spec-to-console and… (#40395)
* remove lock file from packages/kbn-spec-to-console and update jest

* update handlebars to 4.1.0

* update jest-cli
2019-07-06 10:55:03 +03:00
Spencer 62127f18eb
[kbn/es] add command to build es snapshots for each license an… (#40331) 2019-07-05 16:12:41 -07:00
Mikhail Shustov 39ebe7365b
Extend @kbn/config-schema (#40118)
* support null for literal type

* support schemas withing right operand of conditional type

* add never type to ban usage

* remove never options. add when needed

* add tests for Reference.isReference
2019-07-04 10:36:56 +02:00
spalger 3300b1cdf3 [master] force snapshot artifact if KBN_ES_SNAPSHOT_URL is set (#40317)
* force snapshot artifact if `KBN_ES_SNAPSHOT_URL` is set

* override the snapshot to a specific build at a custom url

(cherry picked from commit 6fda5bf3bf)
2019-07-03 18:40:41 -07:00
Spencer a95ae8c037
[prettier] upgrade to 1.18.2 (#40229)
* [prettier] upgrade to 1.18.2

* autofix prettier violations
2019-07-03 12:36:44 -07:00
Sébastien Loix 40089f9a7d
Console update autocomplete definitions (#39508) 2019-07-02 18:33:27 +02:00
renovate[bot] d142171366 Update dependency eslint-plugin-import to v2.18.0 (#39934)
* Update dependency eslint-plugin-import to v2.18.0

* fix new import order violations
2019-06-28 15:51:50 -07:00