Skip to content

Commit

Permalink
[DX] migrate core xpack plugins to tsproject ref (elastic#88676)
Browse files Browse the repository at this point in the history
* migrate cloud, beatsManagement and savedObjectTagging to TS project ref

* migrates globalSearchBar

* fix beatsManagement config

* fix beatsManagement ts

* fix beatsManagement config again

* indent.
  • Loading branch information
pgayvallet committed Jan 20, 2021
1 parent 58b582f commit 87d18f1
Show file tree
Hide file tree
Showing 9 changed files with 166 additions and 168 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import React, { FC } from 'react';
import { Route, Switch } from 'react-router-dom';

interface RouteConfig {
export interface RouteConfig {
path: string;
component: React.ComponentType<any>;
routes?: RouteConfig[];
Expand Down
3 changes: 2 additions & 1 deletion x-pack/plugins/beats_management/public/pages/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ import { BeatsInitialEnrollmentPage } from './walkthrough/initial/beat';
import { FinishWalkthroughPage } from './walkthrough/initial/finish';
import { InitialWalkthroughPage } from './walkthrough/initial/index';
import { InitialTagPage } from './walkthrough/initial/tag';
import type { RouteConfig } from '../components/navigation/child_routes';

export const routeMap = [
export const routeMap: RouteConfig[] = [
{ path: '/tag/create/:tagid?', component: TagCreatePage },
{ path: '/tag/edit/:tagid?', component: TagEditPage },
{
Expand Down
26 changes: 26 additions & 0 deletions x-pack/plugins/beats_management/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"extends": "../../../tsconfig.base.json",
"compilerOptions": {
"composite": true,
"outDir": "./target/types",
"emitDeclarationOnly": true,
"declaration": true,
"declarationMap": true
},
"include": [
"common/**/*",
"public/**/*",
"server/**/*",
"types/**/*",
"scripts/**/*",
"server/index_templates/*.json",
],
"references": [
{ "path": "../../../src/core/tsconfig.json" },
{ "path": "../../../src/plugins/data/tsconfig.json" },
{ "path": "../../../src/plugins/management/tsconfig.json" },
{ "path": "../licensing/tsconfig.json" },
{ "path": "../features/tsconfig.json" },
{ "path": "../security/tsconfig.json" }
]
}
21 changes: 21 additions & 0 deletions x-pack/plugins/cloud/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"extends": "../../../tsconfig.base.json",
"compilerOptions": {
"composite": true,
"outDir": "./target/types",
"emitDeclarationOnly": true,
"declaration": true,
"declarationMap": true,
},
"include": [
"common/**/*",
"public/**/*",
"server/**/*",
],
"references": [
{ "path": "../../../src/core/tsconfig.json" },
{ "path": "../../../src/plugins/usage_collection/tsconfig.json" },
{ "path": "../../../src/plugins/home/tsconfig.json" },
{ "path": "../security/tsconfig.json" },
]
}
18 changes: 18 additions & 0 deletions x-pack/plugins/global_search_bar/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"extends": "../../../tsconfig.base.json",
"compilerOptions": {
"composite": true,
"outDir": "./target/types",
"emitDeclarationOnly": true,
"declaration": true,
"declarationMap": true
},
"include": ["common/**/*", "public/**/*", "server/**/*"],
"references": [
{ "path": "../../../src/core/tsconfig.json" },
{ "path": "../../../src/plugins/usage_collection/tsconfig.json" },
{ "path": "../global_search/tsconfig.json" },
{ "path": "../saved_objects_tagging/tsconfig.json" },
{ "path": "../security/tsconfig.json" }
]
}
25 changes: 25 additions & 0 deletions x-pack/plugins/saved_objects_tagging/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"extends": "../../../tsconfig.base.json",
"compilerOptions": {
"composite": true,
"outDir": "./target/types",
"emitDeclarationOnly": true,
"declaration": true,
"declarationMap": true,
},
"include": [
"common/**/*",
"public/**/*",
"server/**/*",
],
"references": [
{ "path": "../../../src/core/tsconfig.json" },
{ "path": "../../../src/plugins/usage_collection/tsconfig.json" },
{ "path": "../../../src/plugins/management/tsconfig.json" },
{ "path": "../../../src/plugins/saved_objects_tagging_oss/tsconfig.json" },
{ "path": "../../../src/plugins/kibana_react/tsconfig.json" },
{ "path": "../../../src/plugins/usage_collection/tsconfig.json" },
{ "path": "../features/tsconfig.json" },
{ "path": "../security/tsconfig.json" },
]
}
8 changes: 6 additions & 2 deletions x-pack/test/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,17 @@
{ "path": "../plugins/global_search_providers/tsconfig.json" },
{ "path": "../plugins/features/tsconfig.json" },
{ "path": "../plugins/embeddable_enhanced/tsconfig.json" },
{ "path": "../plugins/event_log/tsconfig.json"},
{ "path": "../plugins/event_log/tsconfig.json" },
{ "path": "../plugins/licensing/tsconfig.json" },
{ "path": "../plugins/task_manager/tsconfig.json" },
{ "path": "../plugins/telemetry_collection_xpack/tsconfig.json" },
{ "path": "../plugins/ui_actions_enhanced/tsconfig.json" },
{ "path": "../plugins/spaces/tsconfig.json" },
{ "path": "../plugins/security/tsconfig.json" },
{ "path": "../plugins/encrypted_saved_objects/tsconfig.json" }
{ "path": "../plugins/encrypted_saved_objects/tsconfig.json" },
{ "path": "../plugins/beats_management/tsconfig.json" },
{ "path": "../plugins/cloud/tsconfig.json" },
{ "path": "../plugins/saved_objects_tagging/tsconfig.json" },
{ "path": "../plugins/global_search_bar/tsconfig.json" }
]
}
225 changes: 62 additions & 163 deletions x-pack/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
{
"extends": "../tsconfig.base.json",
"include": [
"mocks.ts",
"typings/**/*",
"plugins/**/*",
"tasks/**/*"
],
"include": ["mocks.ts", "typings/**/*", "plugins/**/*", "tasks/**/*"],
"exclude": [
"plugins/apm/e2e/cypress/**/*",
"plugins/apm/ftr_e2e/**/*",
Expand All @@ -31,168 +26,72 @@
"plugins/spaces/**/*",
"plugins/security/**/*",
"plugins/encrypted_saved_objects/**/*",
"plugins/beats_management/**/*",
"plugins/cloud/**/*",
"plugins/saved_objects_tagging/**/*",
"plugins/global_search_bar/**/*",
"test/**/*"
],
"compilerOptions": {
// overhead is too significant
"incremental": false
},
"references": [
{
"path": "../src/core/tsconfig.json"
},
{
"path": "../src/plugins/telemetry_management_section/tsconfig.json"
},
{
"path": "../src/plugins/management/tsconfig.json"
},
{
"path": "../src/plugins/bfetch/tsconfig.json"
},
{
"path": "../src/plugins/charts/tsconfig.json"
},
{
"path": "../src/plugins/console/tsconfig.json"
},
{
"path": "../src/plugins/dashboard/tsconfig.json"
},
{
"path": "../src/plugins/discover/tsconfig.json"
},
{
"path": "../src/plugins/data/tsconfig.json"
},
{
"path": "../src/plugins/dev_tools/tsconfig.json"
},
{
"path": "../src/plugins/embeddable/tsconfig.json"
},
{
"path": "../src/plugins/es_ui_shared/tsconfig.json"
},
{
"path": "../src/plugins/expressions/tsconfig.json"
},
{
"path": "../src/plugins/home/tsconfig.json"
},
{
"path": "../src/plugins/inspector/tsconfig.json"
},
{
"path": "../src/plugins/kibana_legacy/tsconfig.json"
},
{
"path": "../src/plugins/kibana_react/tsconfig.json"
},
{
"path": "../src/plugins/kibana_usage_collection/tsconfig.json"
},
{
"path": "../src/plugins/kibana_utils/tsconfig.json"
},
{
"path": "../src/plugins/navigation/tsconfig.json"
},
{
"path": "../src/plugins/newsfeed/tsconfig.json"
},
{
"path": "../src/plugins/saved_objects/tsconfig.json"
},
{
"path": "../src/plugins/saved_objects_management/tsconfig.json"
},
{
"path": "../src/plugins/saved_objects_tagging_oss/tsconfig.json"
},
{
"path": "../src/plugins/presentation_util/tsconfig.json"
},
{
"path": "../src/plugins/security_oss/tsconfig.json"
},
{
"path": "../src/plugins/share/tsconfig.json"
},
{
"path": "../src/plugins/telemetry/tsconfig.json"
},
{
"path": "../src/plugins/telemetry_collection_manager/tsconfig.json"
},
{
"path": "../src/plugins/url_forwarding/tsconfig.json"
},
{
"path": "../src/plugins/ui_actions/tsconfig.json"
},
{
"path": "../src/plugins/url_forwarding/tsconfig.json"
},
{
"path": "../src/plugins/usage_collection/tsconfig.json"
},
{
"path": "./plugins/console_extensions/tsconfig.json"
},
{
"path": "./plugins/data_enhanced/tsconfig.json"
},
{
"path": "./plugins/discover_enhanced/tsconfig.json"
},
{
"path": "./plugins/global_search/tsconfig.json"
},
{
"path": "./plugins/global_search_providers/tsconfig.json"
},
{
"path": "./plugins/features/tsconfig.json"
},
{
"path": "./plugins/graph/tsconfig.json"
},
{
"path": "./plugins/embeddable_enhanced/tsconfig.json"
},
{
"path": "./plugins/event_log/tsconfig.json"
},
{
"path": "./plugins/licensing/tsconfig.json"
},
{
"path": "./plugins/searchprofiler/tsconfig.json"
},
{
"path": "./plugins/task_manager/tsconfig.json"
},
{
"path": "./plugins/telemetry_collection_xpack/tsconfig.json"
},
{
"path": "./plugins/ui_actions_enhanced/tsconfig.json"
},
{
"path": "./plugins/vis_type_timeseries_enhanced/tsconfig.json"
},
{
"path": "./plugins/translations/tsconfig.json"
},
{
"path": "./plugins/spaces/tsconfig.json"
},
{
"path": "./plugins/security/tsconfig.json"
},
{
"path": "./plugins/encrypted_saved_objects/tsconfig.json"
}
{ "path": "../src/core/tsconfig.json" },
{ "path": "../src/plugins/telemetry_management_section/tsconfig.json" },
{ "path": "../src/plugins/management/tsconfig.json" },
{ "path": "../src/plugins/bfetch/tsconfig.json" },
{ "path": "../src/plugins/charts/tsconfig.json" },
{ "path": "../src/plugins/console/tsconfig.json" },
{ "path": "../src/plugins/dashboard/tsconfig.json" },
{ "path": "../src/plugins/discover/tsconfig.json" },
{ "path": "../src/plugins/data/tsconfig.json" },
{ "path": "../src/plugins/dev_tools/tsconfig.json" },
{ "path": "../src/plugins/embeddable/tsconfig.json" },
{ "path": "../src/plugins/es_ui_shared/tsconfig.json" },
{ "path": "../src/plugins/expressions/tsconfig.json" },
{ "path": "../src/plugins/home/tsconfig.json" },
{ "path": "../src/plugins/inspector/tsconfig.json" },
{ "path": "../src/plugins/kibana_legacy/tsconfig.json" },
{ "path": "../src/plugins/kibana_react/tsconfig.json" },
{ "path": "../src/plugins/kibana_usage_collection/tsconfig.json" },
{ "path": "../src/plugins/kibana_utils/tsconfig.json" },
{ "path": "../src/plugins/navigation/tsconfig.json" },
{ "path": "../src/plugins/newsfeed/tsconfig.json" },
{ "path": "../src/plugins/saved_objects/tsconfig.json" },
{ "path": "../src/plugins/saved_objects_management/tsconfig.json" },
{ "path": "../src/plugins/saved_objects_tagging_oss/tsconfig.json" },
{ "path": "../src/plugins/presentation_util/tsconfig.json" },
{ "path": "../src/plugins/security_oss/tsconfig.json" },
{ "path": "../src/plugins/share/tsconfig.json" },
{ "path": "../src/plugins/telemetry/tsconfig.json" },
{ "path": "../src/plugins/telemetry_collection_manager/tsconfig.json" },
{ "path": "../src/plugins/url_forwarding/tsconfig.json" },
{ "path": "../src/plugins/ui_actions/tsconfig.json" },
{ "path": "../src/plugins/url_forwarding/tsconfig.json" },
{ "path": "../src/plugins/usage_collection/tsconfig.json" },
{ "path": "./plugins/console_extensions/tsconfig.json" },
{ "path": "./plugins/data_enhanced/tsconfig.json" },
{ "path": "./plugins/discover_enhanced/tsconfig.json" },
{ "path": "./plugins/global_search/tsconfig.json" },
{ "path": "./plugins/global_search_providers/tsconfig.json" },
{ "path": "./plugins/features/tsconfig.json" },
{ "path": "./plugins/graph/tsconfig.json" },
{ "path": "./plugins/embeddable_enhanced/tsconfig.json" },
{ "path": "./plugins/event_log/tsconfig.json" },
{ "path": "./plugins/licensing/tsconfig.json" },
{ "path": "./plugins/searchprofiler/tsconfig.json" },
{ "path": "./plugins/task_manager/tsconfig.json" },
{ "path": "./plugins/telemetry_collection_xpack/tsconfig.json" },
{ "path": "./plugins/ui_actions_enhanced/tsconfig.json" },
{ "path": "./plugins/vis_type_timeseries_enhanced/tsconfig.json" },
{ "path": "./plugins/translations/tsconfig.json" },
{ "path": "./plugins/spaces/tsconfig.json" },
{ "path": "./plugins/security/tsconfig.json" },
{ "path": "./plugins/encrypted_saved_objects/tsconfig.json" },
{ "path": "./plugins/beats_management/tsconfig.json" },
{ "path": "./plugins/cloud/tsconfig.json" },
{ "path": "./plugins/saved_objects_tagging/tsconfig.json" },
{ "path": "./plugins/global_search_bar/tsconfig.json" }
]
}
}
6 changes: 5 additions & 1 deletion x-pack/tsconfig.refs.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
{ "path": "./plugins/translations/tsconfig.json" },
{ "path": "./plugins/spaces/tsconfig.json" },
{ "path": "./plugins/security/tsconfig.json" },
{ "path": "./plugins/encrypted_saved_objects/tsconfig.json" }
{ "path": "./plugins/encrypted_saved_objects/tsconfig.json" },
{ "path": "./plugins/beats_management/tsconfig.json" },
{ "path": "./plugins/cloud/tsconfig.json" },
{ "path": "./plugins/saved_objects_tagging/tsconfig.json" },
{ "path": "./plugins/global_search_bar/tsconfig.json" }
]
}

0 comments on commit 87d18f1

Please sign in to comment.