From 280f802e5fcb91ec973fdfcc9c957189c08a56ff Mon Sep 17 00:00:00 2001 From: Nathan L Smith Date: Wed, 28 Oct 2020 09:01:40 -0500 Subject: [PATCH] Add TS project references for inspector (#81792) --- examples/embeddable_explorer/tsconfig.json | 5 +++-- src/plugins/inspector/tsconfig.json | 15 +++++++++++++ test/tsconfig.json | 26 +++++++--------------- tsconfig.json | 16 +++++++------ tsconfig.refs.json | 7 +++--- x-pack/tsconfig.json | 3 ++- 6 files changed, 41 insertions(+), 31 deletions(-) create mode 100644 src/plugins/inspector/tsconfig.json diff --git a/examples/embeddable_explorer/tsconfig.json b/examples/embeddable_explorer/tsconfig.json index 86b35c5e4943f..4baebebcea42e 100644 --- a/examples/embeddable_explorer/tsconfig.json +++ b/examples/embeddable_explorer/tsconfig.json @@ -9,10 +9,11 @@ "public/**/*.ts", "public/**/*.tsx", "server/**/*.ts", - "../../typings/**/*", + "../../typings/**/*" ], "exclude": [], "references": [ - { "path": "../../src/core/tsconfig.json" } + { "path": "../../src/core/tsconfig.json" }, + { "path": "../../src/plugins/inspector/tsconfig.json" } ] } diff --git a/src/plugins/inspector/tsconfig.json b/src/plugins/inspector/tsconfig.json new file mode 100644 index 0000000000000..2a9c41464532c --- /dev/null +++ b/src/plugins/inspector/tsconfig.json @@ -0,0 +1,15 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "composite": true, + "outDir": "./target/types", + "emitDeclarationOnly": true, + "declaration": true, + "declarationMap": true + }, + "include": ["common/**/*", "public/**/*", "index.ts"], + "references": [ + { "path": "../../core/tsconfig.json" }, + { "path": "../kibana_react/tsconfig.json" } + ] +} diff --git a/test/tsconfig.json b/test/tsconfig.json index a6cc2d34639b7..2949a764d4b1a 100644 --- a/test/tsconfig.json +++ b/test/tsconfig.json @@ -2,29 +2,19 @@ "extends": "../tsconfig.base.json", "compilerOptions": { "tsBuildInfoFile": "../build/tsbuildinfo/test", - "types": [ - "node", - "mocha", - "flot" - ] + "types": ["node", "mocha", "flot"] }, - "include": [ - "**/*", - "../typings/elastic__node_crypto.d.ts", - "typings/**/*" - ], - "exclude": [ - "plugin_functional/plugins/**/*", - "interpreter_functional/plugins/**/*" - ], + "include": ["**/*", "../typings/elastic__node_crypto.d.ts", "typings/**/*"], + "exclude": ["plugin_functional/plugins/**/*", "interpreter_functional/plugins/**/*"], "references": [ { "path": "../src/core/tsconfig.json" }, - { "path": "../src/plugins/kibana_utils/tsconfig.json" }, + { "path": "../src/plugins/inspector/tsconfig.json" }, { "path": "../src/plugins/kibana_react/tsconfig.json" }, - { "path": "../src/plugins/usage_collection/tsconfig.json" }, + { "path": "../src/plugins/kibana_usage_collection/tsconfig.json" }, + { "path": "../src/plugins/kibana_utils/tsconfig.json" }, + { "path": "../src/plugins/newsfeed/tsconfig.json" }, { "path": "../src/plugins/telemetry_collection_manager/tsconfig.json" }, { "path": "../src/plugins/telemetry/tsconfig.json" }, - { "path": "../src/plugins/kibana_usage_collection/tsconfig.json" }, - { "path": "../src/plugins/newsfeed/tsconfig.json" } + { "path": "../src/plugins/usage_collection/tsconfig.json" } ] } diff --git a/tsconfig.json b/tsconfig.json index f43f79389e30f..30b38d0fc2dd3 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -6,8 +6,8 @@ "include": ["kibana.d.ts", "src/**/*", "typings/**/*", "test_utils/**/*"], "exclude": [ "src/**/__fixtures__/**/*", - "src/test_utils/**/*", "src/core/**/*", + "src/plugins/inspector/**/*", "src/plugins/kibana_legacy/**/*", "src/plugins/kibana_react/**/*", "src/plugins/kibana_usage_collection/**/*", @@ -16,7 +16,8 @@ "src/plugins/telemetry_collection_manager/**/*", "src/plugins/telemetry/**/*", "src/plugins/url_forwarding/**/*", - "src/plugins/usage_collection/**/*" + "src/plugins/usage_collection/**/*", + "src/test_utils/**/*" // In the build we actually exclude **/public/**/* from this config so that // we can run the TSC on both this and the .browser version of this config // file, but if we did it during development IDEs would not be able to find @@ -24,14 +25,15 @@ // "src/**/public/**/*" ], "references": [ - { "path": "./src/test_utils/tsconfig.json" }, { "path": "./src/core/tsconfig.json" }, - { "path": "./src/plugins/kibana_utils/tsconfig.json" }, + { "path": "./src/plugins/inspector/tsconfig.json" }, { "path": "./src/plugins/kibana_react/tsconfig.json" }, - { "path": "./src/plugins/usage_collection/tsconfig.json" }, + { "path": "./src/plugins/kibana_usage_collection/tsconfig.json" }, + { "path": "./src/plugins/kibana_utils/tsconfig.json" }, + { "path": "./src/plugins/newsfeed/tsconfig.json" }, { "path": "./src/plugins/telemetry_collection_manager/tsconfig.json" }, { "path": "./src/plugins/telemetry/tsconfig.json" }, - { "path": "./src/plugins/kibana_usage_collection/tsconfig.json" }, - { "path": "./src/plugins/newsfeed/tsconfig.json" } + { "path": "./src/plugins/usage_collection/tsconfig.json" }, + { "path": "./src/test_utils/tsconfig.json" } ] } diff --git a/tsconfig.refs.json b/tsconfig.refs.json index 6247761812581..c16e7a5e1b0f1 100644 --- a/tsconfig.refs.json +++ b/tsconfig.refs.json @@ -2,15 +2,16 @@ "include": [], "references": [ { "path": "./src/core/tsconfig.json" }, - { "path": "./src/test_utils/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/newsfeed/tsconfig.json" }, - { "path": "./src/plugins/telemetry/tsconfig.json" }, { "path": "./src/plugins/telemetry_collection_manager/tsconfig.json" }, + { "path": "./src/plugins/telemetry/tsconfig.json" }, { "path": "./src/plugins/url_forwarding/tsconfig.json" }, - { "path": "./src/plugins/usage_collection/tsconfig.json" } + { "path": "./src/plugins/usage_collection/tsconfig.json" }, + { "path": "./src/test_utils/tsconfig.json" } ] } diff --git a/x-pack/tsconfig.json b/x-pack/tsconfig.json index 057441304f093..5c76a11315a56 100644 --- a/x-pack/tsconfig.json +++ b/x-pack/tsconfig.json @@ -22,13 +22,14 @@ }, "references": [ { "path": "../src/core/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/newsfeed/tsconfig.json" }, - { "path": "../src/plugins/telemetry/tsconfig.json" }, { "path": "../src/plugins/telemetry_collection_manager/tsconfig.json" }, + { "path": "../src/plugins/telemetry/tsconfig.json" }, { "path": "../src/plugins/url_forwarding/tsconfig.json" }, { "path": "../src/plugins/usage_collection/tsconfig.json" }, { "path": "./plugins/global_search/tsconfig.json" },