From 63ca4367e5125dfcc984a467f6dd1e796b4eeb56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Fern=C3=A1ndez=20Haro?= Date: Fri, 30 Aug 2024 15:21:40 +0200 Subject: [PATCH] chore(ui-shared-deps): add `@kbn/ebt-tools` (#191754) --- packages/kbn-ebt-tools/BUILD.bazel | 36 +++++++++++++++++++ packages/kbn-ui-shared-deps-src/BUILD.bazel | 1 + .../kbn-ui-shared-deps-src/src/definitions.js | 3 +- packages/kbn-ui-shared-deps-src/src/entry.js | 1 + 4 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 packages/kbn-ebt-tools/BUILD.bazel diff --git a/packages/kbn-ebt-tools/BUILD.bazel b/packages/kbn-ebt-tools/BUILD.bazel new file mode 100644 index 0000000000000..7f916b42152ca --- /dev/null +++ b/packages/kbn-ebt-tools/BUILD.bazel @@ -0,0 +1,36 @@ +load("@build_bazel_rules_nodejs//:index.bzl", "js_library") + +SRCS = glob( + [ + "**/*.ts", + "**/*.tsx", + ], + exclude = [ + "**/*.config.js", + "**/*.mock.*", + "**/*.test.*", + "**/*.stories.*", + "**/__snapshots__/**", + "**/integration_tests/**", + "**/mocks/**", + "**/scripts/**", + "**/storybook/**", + "**/test_fixtures/**", + "**/test_helpers/**", + ], +) + +SHARED_DEPS = [ + "@npm//@elastic/ebt", + "@npm//@elastic/apm-rum-core", + "@npm//react", + "@npm//react-router-dom", +] + +js_library( + name = "kbn-ebt-tools", + package_name = "@kbn/ebt-tools", + srcs = ["package.json"] + SRCS, + deps = SHARED_DEPS, + visibility = ["//visibility:public"], +) diff --git a/packages/kbn-ui-shared-deps-src/BUILD.bazel b/packages/kbn-ui-shared-deps-src/BUILD.bazel index cd723a8ed6401..d2e67ccd14ac6 100644 --- a/packages/kbn-ui-shared-deps-src/BUILD.bazel +++ b/packages/kbn-ui-shared-deps-src/BUILD.bazel @@ -24,6 +24,7 @@ webpack_cli( "//packages/kbn-ui-theme", "//packages/kbn-i18n", "//packages/kbn-i18n-react", + "//packages/kbn-ebt-tools", "//packages/kbn-esql-ast", "//packages/kbn-monaco", "//packages/kbn-datemath", diff --git a/packages/kbn-ui-shared-deps-src/src/definitions.js b/packages/kbn-ui-shared-deps-src/src/definitions.js index 8dbe5bfbc2828..abdf79b793986 100644 --- a/packages/kbn-ui-shared-deps-src/src/definitions.js +++ b/packages/kbn-ui-shared-deps-src/src/definitions.js @@ -31,7 +31,7 @@ const jsFilename = 'kbn-ui-shared-deps-src.js'; const cssDistFilename = 'kbn-ui-shared-deps-src.css'; /** - * Externals mapping inteded to be used in a webpack config + * Externals mapping intended to be used in a webpack config */ const externals = { /** @@ -102,6 +102,7 @@ const externals = { '@tanstack/react-query-devtools': '__kbnSharedDeps__.ReactQueryDevtools', '@kbn/code-editor': '__kbnSharedDeps__.KbnCodeEditor', '@kbn/esql-ast': '__kbnSharedDeps__.KbnEsqlAst', + '@kbn/ebt-tools': '__kbnSharedDeps__.KbnEbtTools', '@elastic/apm-rum-core': '__kbnSharedDeps__.ElasticApmRumCore', }; diff --git a/packages/kbn-ui-shared-deps-src/src/entry.js b/packages/kbn-ui-shared-deps-src/src/entry.js index 5b56e10108153..dce5edf42b3cb 100644 --- a/packages/kbn-ui-shared-deps-src/src/entry.js +++ b/packages/kbn-ui-shared-deps-src/src/entry.js @@ -75,4 +75,5 @@ export const ReactQuery = require('@tanstack/react-query'); export const ReactQueryDevtools = require('@tanstack/react-query-devtools'); export const KbnCodeEditor = require('@kbn/code-editor'); export const KbnEsqlAst = require('@kbn/esql-ast'); +export const KbnEbtTools = require('@kbn/ebt-tools'); export const ElasticApmRumCore = require('@elastic/apm-rum-core');