From 511febc88dc63e9af0c5f6abda015c4ee1ea0c15 Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Wed, 17 Feb 2021 07:10:33 -0500 Subject: [PATCH] Migrate logstash, monitoring, url_drilldowns, xpack_legacy to ts projects (#91194) (#91610) * migrate drilldowns to ts project * monitoring to ts project * xpack legacy to ts project * logstash to ts projects * missing comma * list deep project * export type to refer in d.ts Co-authored-by: Mikhail Shustov --- src/dev/typescript/projects.ts | 3 +++ tsconfig.refs.json | 5 +++- .../public/lib/variables/context_variables.ts | 2 +- .../drilldowns/url_drilldown/tsconfig.json | 20 ++++++++++++++ x-pack/plugins/logstash/tsconfig.json | 26 +++++++++++++++++++ x-pack/plugins/monitoring/tsconfig.json | 15 +++++++---- x-pack/plugins/xpack_legacy/tsconfig.json | 18 +++++++++++++ x-pack/test/tsconfig.json | 8 +++--- x-pack/tsconfig.json | 12 ++++----- 9 files changed, 93 insertions(+), 16 deletions(-) create mode 100644 x-pack/plugins/drilldowns/url_drilldown/tsconfig.json create mode 100644 x-pack/plugins/logstash/tsconfig.json create mode 100644 x-pack/plugins/xpack_legacy/tsconfig.json diff --git a/src/dev/typescript/projects.ts b/src/dev/typescript/projects.ts index 29379bbb31ee..8b306fc96711 100644 --- a/src/dev/typescript/projects.ts +++ b/src/dev/typescript/projects.ts @@ -17,6 +17,9 @@ export const PROJECTS = [ new Project(resolve(REPO_ROOT, 'x-pack/tsconfig.json')), new Project(resolve(REPO_ROOT, 'x-pack/test/tsconfig.json'), { name: 'x-pack/test' }), new Project(resolve(REPO_ROOT, 'src/core/tsconfig.json')), + new Project(resolve(REPO_ROOT, 'x-pack/plugins/drilldowns/url_drilldown/tsconfig.json'), { + name: 'security_solution/cypress', + }), new Project(resolve(REPO_ROOT, 'x-pack/plugins/security_solution/cypress/tsconfig.json'), { name: 'security_solution/cypress', }), diff --git a/tsconfig.refs.json b/tsconfig.refs.json index 7806cf93756e..428460e0bfeb 100644 --- a/tsconfig.refs.json +++ b/tsconfig.refs.json @@ -67,6 +67,7 @@ { "path": "./x-pack/plugins/data_enhanced/tsconfig.json" }, { "path": "./x-pack/plugins/dashboard_mode/tsconfig.json" }, { "path": "./x-pack/plugins/discover_enhanced/tsconfig.json" }, + { "path": "./x-pack/plugins/drilldowns/url_drilldown/tsconfig.json" }, { "path": "./x-pack/plugins/embeddable_enhanced/tsconfig.json" }, { "path": "./x-pack/plugins/encrypted_saved_objects/tsconfig.json" }, { "path": "./x-pack/plugins/enterprise_search/tsconfig.json" }, @@ -84,6 +85,7 @@ { "path": "./x-pack/plugins/lens/tsconfig.json" }, { "path": "./x-pack/plugins/license_management/tsconfig.json" }, { "path": "./x-pack/plugins/licensing/tsconfig.json" }, + { "path": "./x-pack/plugins/logstash/tsconfig.json" }, { "path": "./x-pack/plugins/maps_legacy_licensing/tsconfig.json" }, { "path": "./x-pack/plugins/maps/tsconfig.json" }, { "path": "./x-pack/plugins/ml/tsconfig.json" }, @@ -112,6 +114,7 @@ { "path": "./x-pack/plugins/remote_clusters/tsconfig.json" }, { "path": "./x-pack/plugins/cross_cluster_replication/tsconfig.json" }, { "path": "./x-pack/plugins/index_lifecycle_management/tsconfig.json" }, - { "path": "./x-pack/plugins/uptime/tsconfig.json" } + { "path": "./x-pack/plugins/uptime/tsconfig.json" }, + { "path": "./x-pack/plugins/xpack_legacy/tsconfig.json" }, ] } diff --git a/x-pack/plugins/drilldowns/url_drilldown/public/lib/variables/context_variables.ts b/x-pack/plugins/drilldowns/url_drilldown/public/lib/variables/context_variables.ts index c0ff776c94ca..65c665a182e1 100644 --- a/x-pack/plugins/drilldowns/url_drilldown/public/lib/variables/context_variables.ts +++ b/x-pack/plugins/drilldowns/url_drilldown/public/lib/variables/context_variables.ts @@ -50,7 +50,7 @@ interface PanelValues extends EmbeddableInput { savedObjectId?: string; } -interface ContextValues { +export interface ContextValues { panel: PanelValues; } diff --git a/x-pack/plugins/drilldowns/url_drilldown/tsconfig.json b/x-pack/plugins/drilldowns/url_drilldown/tsconfig.json new file mode 100644 index 000000000000..50fe41c49b0c --- /dev/null +++ b/x-pack/plugins/drilldowns/url_drilldown/tsconfig.json @@ -0,0 +1,20 @@ +{ + "extends": "../../../../tsconfig.base.json", + "compilerOptions": { + "composite": true, + "outDir": "./target/types", + "emitDeclarationOnly": true, + "declaration": true, + "declarationMap": true + }, + "include": ["public/**/*"], + "references": [ + { "path": "../../../../src/core/tsconfig.json" }, + { "path": "../../ui_actions_enhanced/tsconfig.json" }, + { "path": "../../../../src/plugins/embeddable/tsconfig.json" }, + { "path": "../../../../src/plugins/expressions/tsconfig.json" }, + { "path": "../../../../src/plugins/kibana_react/tsconfig.json" }, + { "path": "../../../../src/plugins/kibana_utils/tsconfig.json" }, + { "path": "../../../../src/plugins/ui_actions/tsconfig.json" } + ] +} diff --git a/x-pack/plugins/logstash/tsconfig.json b/x-pack/plugins/logstash/tsconfig.json new file mode 100644 index 000000000000..6f21cfdb0b19 --- /dev/null +++ b/x-pack/plugins/logstash/tsconfig.json @@ -0,0 +1,26 @@ + +{ + "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/home/tsconfig.json"}, + { "path": "../../../src/plugins/management/tsconfig.json"}, + + { "path": "../features/tsconfig.json" }, + { "path": "../licensing/tsconfig.json"}, + { "path": "../monitoring/tsconfig.json"}, + { "path": "../security/tsconfig.json"}, + ] + } diff --git a/x-pack/plugins/monitoring/tsconfig.json b/x-pack/plugins/monitoring/tsconfig.json index 760ff188aacf..1835c4a75d9d 100644 --- a/x-pack/plugins/monitoring/tsconfig.json +++ b/x-pack/plugins/monitoring/tsconfig.json @@ -7,25 +7,30 @@ "declaration": true, "declarationMap": true }, - "include": ["common/**/*", "public/**/*", "server/**/*"], + "include": [ + "common/**/*", + "public/**/*", + "server/**/*" + ], "references": [ { "path": "../../../src/core/tsconfig.json" }, { "path": "../../../src/plugins/data/tsconfig.json" }, { "path": "../../../src/plugins/home/tsconfig.json" }, { "path": "../../../src/plugins/kibana_legacy/tsconfig.json" }, - { "path": "../../../src/plugins/kibana_utils/tsconfig.json" }, { "path": "../../../src/plugins/navigation/tsconfig.json" }, + { "path": "../../../src/plugins/kibana_react/tsconfig.json" }, + { "path": "../../../src/plugins/kibana_utils/tsconfig.json" }, { "path": "../../../src/plugins/usage_collection/tsconfig.json" }, - { "path": "../actions/tsconfig.json" }, { "path": "../alerts/tsconfig.json" }, + { "path": "../actions/tsconfig.json" }, { "path": "../cloud/tsconfig.json" }, { "path": "../encrypted_saved_objects/tsconfig.json" }, { "path": "../features/tsconfig.json" }, { "path": "../infra/tsconfig.json" }, - { "path": "../license_management/tsconfig.json" }, { "path": "../licensing/tsconfig.json" }, + { "path": "../license_management/tsconfig.json" }, { "path": "../observability/tsconfig.json" }, { "path": "../telemetry_collection_xpack/tsconfig.json" }, - { "path": "../triggers_actions_ui/tsconfig.json" } + { "path": "../triggers_actions_ui/tsconfig.json" }, ] } diff --git a/x-pack/plugins/xpack_legacy/tsconfig.json b/x-pack/plugins/xpack_legacy/tsconfig.json new file mode 100644 index 000000000000..3bfc78b72cb3 --- /dev/null +++ b/x-pack/plugins/xpack_legacy/tsconfig.json @@ -0,0 +1,18 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "composite": true, + "outDir": "./target/types", + "emitDeclarationOnly": true, + "declaration": true, + "declarationMap": true + }, + "include": [ + "server/**/*", + ], + "references": [ + { "path": "../../../src/core/tsconfig.json" }, + { "path": "../../../src/plugins/usage_collection/tsconfig.json" }, + { "path": "../monitoring/tsconfig.json" }, + ] +} diff --git a/x-pack/test/tsconfig.json b/x-pack/test/tsconfig.json index ff3fec1c5aae..4589efa19185 100644 --- a/x-pack/test/tsconfig.json +++ b/x-pack/test/tsconfig.json @@ -6,7 +6,6 @@ "types": ["node", "flot"] }, "include": ["**/*", "../typings/**/*", "../../packages/kbn-test/types/ftr_globals/**/*"], - "exclude": ["../typings/jest.d.ts"], "references": [ { "path": "../../src/core/tsconfig.json" }, { "path": "../../src/plugins/bfetch/tsconfig.json" }, @@ -53,6 +52,7 @@ { "path": "../plugins/global_search_providers/tsconfig.json" }, { "path": "../plugins/features/tsconfig.json" }, { "path": "../plugins/data_enhanced/tsconfig.json" }, + { "path": "../plugins/drilldowns/url_drilldown/tsconfig.json" }, { "path": "../plugins/embeddable_enhanced/tsconfig.json" }, { "path": "../plugins/encrypted_saved_objects/tsconfig.json" }, { "path": "../plugins/enterprise_search/tsconfig.json" }, @@ -68,6 +68,7 @@ { "path": "../plugins/lens/tsconfig.json" }, { "path": "../plugins/license_management/tsconfig.json" }, { "path": "../plugins/licensing/tsconfig.json" }, + { "path": "../plugins/logstash/tsconfig.json" }, { "path": "../plugins/ml/tsconfig.json" }, { "path": "../plugins/monitoring/tsconfig.json" }, { "path": "../plugins/observability/tsconfig.json" }, @@ -89,7 +90,8 @@ { "path": "../plugins/rollup/tsconfig.json" }, { "path": "../plugins/remote_clusters/tsconfig.json" }, { "path": "../plugins/cross_cluster_replication/tsconfig.json" }, - { "path": "../plugins/index_lifecycle_management/tsconfig.json" }, - { "path": "../plugins/uptime/tsconfig.json" } + { "path": "../plugins/index_lifecycle_management/tsconfig.json"}, + { "path": "../plugins/uptime/tsconfig.json" }, + { "path": "../plugins/xpack_legacy/tsconfig.json" } ] } diff --git a/x-pack/tsconfig.json b/x-pack/tsconfig.json index b3e47136977e..08a746bca88b 100644 --- a/x-pack/tsconfig.json +++ b/x-pack/tsconfig.json @@ -6,10 +6,7 @@ "tasks/**/*", "plugins/case/**/*", "plugins/lists/**/*", - "plugins/logstash/**/*", "plugins/security_solution/**/*", - "plugins/xpack_legacy/**/*", - "plugins/drilldowns/url_drilldown/**/*" ], "exclude": [ "test/**/*", @@ -69,6 +66,7 @@ { "path": "./plugins/data_enhanced/tsconfig.json" }, { "path": "./plugins/dashboard_mode/tsconfig.json" }, { "path": "./plugins/discover_enhanced/tsconfig.json" }, + { "path": "./plugins/drilldowns/url_drilldown/tsconfig.json" }, { "path": "./plugins/embeddable_enhanced/tsconfig.json" }, { "path": "./plugins/encrypted_saved_objects/tsconfig.json" }, { "path": "./plugins/enterprise_search/tsconfig.json" }, @@ -86,6 +84,7 @@ { "path": "./plugins/lens/tsconfig.json" }, { "path": "./plugins/license_management/tsconfig.json" }, { "path": "./plugins/licensing/tsconfig.json" }, + { "path": "./plugins/logstash/tsconfig.json" }, { "path": "./plugins/maps_legacy_licensing/tsconfig.json" }, { "path": "./plugins/maps/tsconfig.json" }, { "path": "./plugins/ml/tsconfig.json" }, @@ -111,8 +110,9 @@ { "path": "./plugins/watcher/tsconfig.json" }, { "path": "./plugins/rollup/tsconfig.json" }, { "path": "./plugins/remote_clusters/tsconfig.json" }, - { "path": "./plugins/cross_cluster_replication/tsconfig.json" }, - { "path": "./plugins/index_lifecycle_management/tsconfig.json" }, - { "path": "./plugins/uptime/tsconfig.json" } + { "path": "./plugins/cross_cluster_replication/tsconfig.json"}, + { "path": "./plugins/index_lifecycle_management/tsconfig.json"}, + { "path": "./plugins/uptime/tsconfig.json" }, + { "path": "./plugins/xpack_legacy/tsconfig.json" } ] }