Commit graph

19 commits

Author SHA1 Message Date
Pierre Gayvallet 251bd9afc6
Remove /src/legacy (#95510)
* starting removing stuff

* fix jest config

* disable CLI mode until other PR is merged

* fix the schema

* add deprecation for maxPayloadBytes

* fix legacy start logic

* deletes `env` from unknown args

* fix FTR test config

* some legacy service deletion

* move config validation

* remove legacy exports from entrypoint

* preserve legacy logging in core logging config

* try to fix uiSettings integration tests

* fix legacy service tests

* more type fix

* use fromRoot from @kbn/utils

* cleanup kibana.d.ts

* fix unit tests

* remove src/core/server/utils

* fix server script

* add integration test for `/{path*}` route

* add unit tests on legacy config

* adapt uiSetting IT bis

* fix tests

* update generated doc

* address some review comments

* move review comments

* fix some stuff

* fix some stuff

* fix some stuff

* fix some stuff bis

* generated doc

* add test for ensureValidConfiguration
2021-04-06 09:25:36 +02:00
Brandon Kobel 4584a8b570
Elastic License 2.0 (#90099)
* Updating everything except the license headers themselves

* Applying ESLint rules

* Manually replacing the stragglers
2021-02-03 18:12:39 -08:00
Brandon Kobel 170a2956c8
Updating the License (#88343)
* Updating the Licenses, except for applying eslint, building

* Applying ESLint rules,building @kbn/pm, regenerating api docs
2021-01-19 17:52:56 -08:00
Pierre Gayvallet 0d09cea436
Remove legacy plugins support (#77599)
* remove ALL the things.

* adapt some types and tests

* restore ensureValidConfiguration

* fix legacy service tests

* adapt uiRender mixin

* remove legacy types

* update generated doc

* restore legacy plugin schema

* update generated doc

* remove remaining code of x-pack/legacy

* adapt imports due to merge

* cleanup CODEOWNERS

* cleanup gitignore & i18nrc

* cleanup tsconfig.json

* remove unused i18n keys

* add back `"legacy/plugins/**/*",` to tsconfig until legacy space plugin is deleted

* fix create_jest_config

* remove references from eslintrc

* more eslint cleanup

* remove `x-pack/index.js`

* fix xpack gulp scripts

* fix bug with default + named imports from boom

* remove rules from eslintrc

* remove LegacyInternals

* review comments

* update generated doc

* cleanup legacy metadatas

* revert changes to eslintrc

* update generated doc
2020-09-23 09:52:51 +02:00
Pierre Gayvallet 3759063e81
remove legacy ES plugin (#77703)
* remove legacy ES plug

* fix types

* delete some `legacy/core_plugins` references

* fix type
2020-09-18 09:30:13 +02:00
Mikhail Shustov bcaffba12b
Remove legacy SavedObjects (#76852)
* remove legacy SO integration

* cleanup integration in the legacy platorm

* remove so schema

* update docs

* remove leftovers, update docs

* update docs after merge master
2020-09-08 22:01:31 +02:00
Mikhail Shustov 88c0631344
Update @typescript-eslint to ensure compatibility with TypeScript v3.9 (#74091)
* bump @typescript-eslint deps

* update rules

* fix errors in pacakges

* fix src/

* fix x-pack

* fix test

* fix typings

* fix examples

* allow _ as prefix and suffix

* roll back prefix and suffix changes

* add eslint-plugin-eslint-comments

* report unused rules

* remove unused eslint comments from tests

* remove unused eslint comments 2nd pass

* remove unused eslint comments from src/

* remove unused comments in x-pack

* use no-script-url and no-unsanitized/property for ts files

* remove unused eslint comments

* eui/href-or-on-click removed when not complained

* no import/* rules for ts files

* cleanup

* remove the unused eslint-disable

* rollback unnecessary changes

* allow underscore prefix & sufix in type name

* update docs

* fix type error in enterprise search plugin mocks

* rename platform hack __coreProvider --> _coreProvider

* rollback space removal in src/core/public/legacy/legacy_service.test.ts

* fix naming convention in APM
2020-08-05 17:32:19 +02:00
Uladzislau Lasitsa addb87d779
Move src/legacy/server/index_patterns to data plugin (server) (Remove step) (#61618)
* Removed legacy index pattern

* fix type

* remove unnecessary import

* Removed old references to indexPatternsServiceFactory

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-02 12:53:14 +03:00
renovate[bot] feceb0f98e Update eslint related packages (#48513)
* Update eslint related packages

* add errorMessage to no-restricted-paths validation

* add license to eslintrc file

* ignore broken plugin fixture

* upgrade tangled peer deps

* give name to unnamed func to avoid typescript-eslint/typescript-eslint#1078

* migrate away from removed prefer-interface

* migrate away from removed no-angle-bracket-type-assertions rule

* migrate away from removed no-triple-slash-reference rule

* old config was invalid and made this rule a noop

* fix array-type rule config

* fix readonly paramProperties that weren't being checked

* fix propType ordering

* remove references to non-existent rules

* remove unnecessary disable that is improperly formatted

* fix comment-related spacing

* fix typo/invalid namespace overrides

* rename fn to avoid hook-alike behavior

* remove reference to old removed rule

* use caret version for prettier

* reference babel-eslint with absolute path
2019-10-21 16:32:31 -07:00
Rudolf Meijering 85c8232c0b
Move KibanaMigrator into Server SavedObjectsService (#43433)
* Rename SavedObjectsService -> SavedObjectsLegacyService

* Expose legacy pluginSpecs from Core LegacyService

* Expose legacy uiExports from Core LegacyService

* Move kibana config to NP

* Expose pluginExtendedConfig from LegacyService

* Make KibanaMigrator NP compatible

* KibanaMigrator -> NP SavedObjectsService

* SavedObjectsService never stop retrying ES connection error

* Move waiting for migrations to complete till after legacy service start

* Fix ESArchiver's KibanaMigrator

* Fix reload logging config tests

* Run migrations on savedobjects start

* Fix env tests

* Fix and make legacy tests more robust/isolated

* Cleanup code

* Fix invalid config test

* Fix SavedObject Migrations logging test

* SavedObjectsService tests

* Lifecycle logging and improve getting kibanaConfig instance

* Fix awaitMigration bug and test

* Fix typing error

* Review comments

* Remove unecessary KibanaConfig class

* Move legacy plugin config extension, specs, uiExports entirely into Core

uiExports, specs, disabledSpecs, config now get injected into KbnServer

* Fix config deprecation test

* Use existing logger mock

* Create SavedObjectsConfig for migration config

* Define KibanaMigratorContract type

* KibanaMigratorContract -> IKibanaMigrator + docs improvements

* Fix esArchiver's KibanaMigrator

* Fix plugin generator integration test

* ConfigServiceContract -> IConfigService

* Address review comments

* Review nits

* Document migrations.skip config

* Review comments continued...

* awaitMigrations -> runMigrations

* Type improvements
2019-10-01 09:11:33 +02:00
Rudolf Meijering e137477b5a
[Core] Public saved objects client (#39891)
* Move SavedObjectClient files to core/public

* Initial SavedObjectsService in public Core

* Public SavedObjectsClient tests

* Import SimpleSavedObject from src/core/public

* Use types from source files for kibana.d.ts

* Add html raw loader to x-pack/jest

* Cleanup

* Drop case utilities and improve test coverage

* Update types and documentation

* Fix build breaking when importing directly from /server in /public

* Ensure that all option paramaters are picked and renamed

* Fix option mapping and introduce stronger types

* Eslint: allow imports from src/core/*/types

* Add compatibility layer for kfetch vs http.fetch error responses

* Improve documentation

* Expose SavedObjectsMigrationLogger

* Documentation and type tweaks

* Revert type changes from 73e601f and update api docs

* Refactor request into savedObjectFetch + test

* Make legacy SavedObject compatible with http.fetch exceptions

* Fix types and tests

* simple_saved_object import from src/core/server

* server imports from root instead of server/types

* Make SavedObjectsService a class

* Don't pick unkown keys from server response

* Rename SavedObjectsFindResponse to SavedObjectsFindResponsePublic

* Remove err.response from SavedObjects fetch errors

* Revert "Remove err.response from SavedObjects fetch errors"

This reverts commit 61705ca361.

* Don't introduce err.response until we deprecate err.res
2019-08-06 20:53:05 +02:00
Tiago Costa ed795d28ee
Migrate from tslint (#33826)
* chore(NA): remove tslint dependencies, configs and enable eslint typescript parser.

* fix(NA): apply recommend eslint typescript rule.s

* chore(NA): upgrade eslint package versions.

* chore(NA): split javascript eslint config in an override section.

* chore(NA): split all eslint configs with overrides.

* chore(NA): remove missing console.log.

* chore(NA): change eslint splits and overrides order.

* chore(NA): replace tslint disable comments with eslint ones.

* chore(NA): solve eslint typescript errors for elastic/kibana-custom/no-default-export

* chore(NA): fixed multiple eslint typescript rule failures.

* chore(NA): add tarfet folder to the eslint ignore.

* chore(NA): apply prettier rule to ts type file.

* chore(NA): remove last mentions to tslint

* chore(NA): add old defined rules

* chore(NA): missing port rules website

* chore(na): ordered rules

* chore(NA): solved eslint typescript problems.

* chore(NA): fix spaced comment problems.

* chore(NA): fix some more eslint typescript rules: import/order no-empty-interface

* chore(NA): fix last rules and comment out what are the ones still failing.

* chore(NA): comment out camelcase rule.

* chore(NA): regenerate kbn pm dist.

* chore(NA): updated snapshots.

* chore(NA): updated snapshots.

* chore(NA): disabled sort-keys rule.

* chore(NA): remove rule prefer-arrow/prefer-arrow-functions.

* chore(NA): fix for @typescript-eslint/no-var-requires rule.

* chore(NA): fixes for @typescript-eslint/camelcase rule.

* chore(NA): fix typo on eslint config kibana typescript.

Co-Authored-By: mistic <tiagoffcc@hotmail.com>

* chore(NA): remove legacy note after the intellij upgrade to 2019.1

* fix(NA): import order plugin.

* chore(NA): fix ts ignore positions after auto fix.

* fix(NA): performance issue with typescript eslint.

* refact(NA): eslint configs organization.

* chore(NA): apply resticted paths to ts files too.

* chore(NA): split comment from eslint ignore.
2019-04-05 17:45:23 +01:00
Rudolf Meijering 5c457972d4
Generate core API docs from TSDoc comments (#32148)
* Generate core API docs from TSDoc comments

Uses api-extractor and api-documenter to generate documentation for
the Kibana core API from TSDoc comments in the source code.

Documentation can be generated using `npm run docs:api`.

I used --no-verify to ignore the following pre-commit hook errors:
1. Filenames MUST use snake_case - api-extractor.json
   It's possible to specify a different config file, but I prefer to keep the "standard" config file name.
2. UNHANDLED ERROR: Unable to find tsconfig.json file selecting "common/core_api_review/kibana.api.ts". Ensure one exists and it is listed in "src/dev/typescript/projects.ts"
   This is not a source file, so safe to ignore.

* Flesh out API docs a little bit

* Ignore snake_case check for api-extractor.json

* Ignore api-extractor's review file from pre-commit check

* Try to fix build failing by using masters yarn.lock

* I'm being stupid

* Found a better home for ignoring common/core_api_review/kibana.api.ts

* Node script for detecting core API changes

I initially wanted to include this as a precommit hook, but it takes
quite long to execute (~12s) so might be better suited as a test or
as part of the release process.

The script currently fails because api-extractor uses an older version
of typescript.

* Fix tslint precommit hook ignore condition

* Write tsdoc-metadata.json into ./build

* Add LogMeta and ElasticSearch to exported types & docs

* Suppress logging when running api-extractor from script

* Improve check_core_api_changes script and run as test

* Inline api-extractor.json config

* Fix check_core_api_changes --help flag

* LogMeta TSDoc comments

* check_core_api_changes: fail if api-extractor produces warnings or errors

And print more useful messages to the console

* Move ignored ts files list into dev/file

* Add back build:types since api-exporter cannot operate on source files

* Upgrade api-exporter/documenter

* api-extractor: independantly analyze core/public and core/server

Becasue of https://github.com/Microsoft/web-build-tools/issues/1029
api-extractor can't use core/index.ts as a single entry point for
analyzing the public and server API's as isolated namespaces.

Instead we analyze these projects separately. This introduces other
problems like the api review files and documentation always being
called "kibana." from the package.json filename.

* Build types as part of build task

* Include types in typescript browser compilation

* Force inclusion of core/public for building types

* Fix api review filename in api-exporter errors

* Update docs and API review files

* Fix api-extractor warnings

* Remove ts file ignored list since it's no longer necessary

* Rename exported api package name

* Review comments

* Export other missing types

* Upgrade api-documenter to latest beta

* Export more missing types

* Fix warnings and add api-exporter to Jenkins tests

* Correctly handle runBuildTypes() exceptions

* Fix another swallowed exception

* Fix api-extractor warnings after master merge
2019-04-03 12:26:00 +02:00
Rudolf Meijering 1ffb261788
Expose core api types in /public and /server (#32746)
* Expose core api types in /public and /server

* Export CoreStart from core/public

* Export Server and Public from 'kibana'

* Cast frozen object type back to original

The exported type `InjectedMetadataStart` derives it's type from the returned values.
Since it's internal state is frozen the type changes to `ReadOnly<`. However, consumers
of the API shouldn't have to know or care about this type.

* Be more selective with what gets exported

* Fix type imports in tests

* Fix type errors

* Remove src/type_exports.ts

* More remove src/type_exports.ts

* Remove build:types

* Fix bootstrap import

* Expose internal API's at the top level

Exposing the internal API's at the top level of core/public and core/server
makes it obvious that these API's are consumed outside these modules. Marking
these @internal ensures they don't get exported as part of the documentation.

* Fix tests

* Put core/{public/server} in their own namespaces
2019-03-19 08:35:19 +01:00
Stacey Gammon 3155533c3e
Add some types for interpter plugin registration (#31600)
* Some basic types for top level legacy plugin registration

* put typescript interface closer to implementation

* Use default export, you have to

* fix build and address code review comments
2019-03-05 13:38:32 -05:00
Court Ewing 2ce51a5be5 Update paths to ui, server, deprecation, plugin_discovery in src/legacy
This commit accompanies the four that precede it. Rather than squash
them altogether, the four previous commits all do nothing except move
files to help avoid conflicts.
2019-02-11 10:41:37 -05:00
Felix Stürmer 9588443601
[Infra UI] Read and write data sources from and to saved objects (#28016) 2019-01-25 16:08:09 +01:00
dave.snider@gmail.com a94fd11a3e
EUI 5.8.1 comes with a brand color refresh. Also removes lots of KUI (#27009)
EUI 5.7.0 had a color refresh which switched around our palette to better match branding guidelines. Hex colors are still hard coded in large parts of Kibana so most of the changes not in kbn/ui-framework are simple shifts to match that styling.
2018-12-18 10:59:31 -08:00
Josh Dover 08fd427125
Establish pattern for typing legacy plugins (#26045)
* Add legacy types and export them for plugins
* Add support for core_plugins to import from 'kibana'
2018-12-17 12:52:21 -06:00