kibana/packages/kbn-securitysolution-t-grid/BUILD.bazel

126 lines
2.1 KiB
Python
Raw Normal View History

[RAC] T-Grid is moving to a new home (#100265) * wip * First pass at standalone and embedded redux stores and usage * wip * First pass at standalone and embedded redux stores and usage * wip * clean up * wip * refact(NA): remove extra pkg_npm target and add specific target folders on @kbn/i18n * cleanup * - fixes type errors in tests * WIP remove use_manage_timeline * wip add query + selector * finishing integrating timeline manage context from redux * integrating t-grid in security solution * fix RowRender type * WIP begin to move components from package to plugin * integration of t-grid inside of security solution * wip to make redux work * little trick to make it render * - fixes a few type errors * better integration betwen tgrid and security solutions * bringing back tsconfig on timeline * wip integration t-grid in observability * fix types * fix type in security solutions * add type to import + trie dto get the bundle size as small as possible * fix type in integration test * fix type in integration test * - fix tests * clean up to use technical fields * - fixes unit tests * - mocks the `useDateFormat` function of the `useKibana` service to fix unit tests * fix t-grid settings vs create timeline + fix inspect button * fix last suites test * Update unit tests, snapshots and lint * Fix bad merge * fix plugin export * Fix some failing tests * fix unit tets in timelines plugins * fix latest test * fix i18n * free obs from t-grid * Fix timeline functional plugin types * fix store provider * Update failing defaultHeader test * Fix i18n usage in security solution * Fix remaining i18n errors in timelines plugin * Dedupe common shared types * move drag and drop utils in package to avoid duplication * More shared type cleanup * add feature flag * review I * fix merge with master * fix i18n translation * More type deduping * Use @kbn/common-utils, fix remaining types * fix types * fix tests * missing type * fix cypress tests Co-authored-by: Kevin Qualters <kevin.qualters@elastic.co> Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com> Co-authored-by: Andrew Goldstein <andrew.goldstein@elastic.co>
2021-06-23 00:56:33 +02:00
load("@npm//@bazel/typescript:index.bzl", "ts_config", "ts_project")
load("@build_bazel_rules_nodejs//:index.bzl", "js_library", "pkg_npm")
PKG_BASE_NAME = "kbn-securitysolution-t-grid"
PKG_REQUIRE_NAME = "@kbn/securitysolution-t-grid"
SOURCE_FILES = glob(
[
"src/**/*.ts",
"src/**/*.tsx",
],
exclude = [
"**/*.test.*",
"**/*.mock.*",
],
)
SRCS = SOURCE_FILES
filegroup(
name = "srcs",
srcs = SRCS,
)
NPM_MODULE_EXTRA_FILES = [
"react/package.json",
"package.json",
"README.md",
]
SRC_DEPS = [
"//packages/kbn-babel-preset",
"//packages/kbn-dev-utils",
"//packages/kbn-i18n",
"@npm//@babel/core",
"@npm//babel-loader",
"@npm//enzyme",
"@npm//jest",
"@npm//lodash",
"@npm//react",
"@npm//react-beautiful-dnd",
"@npm//tslib",
]
TYPES_DEPS = [
"@npm//typescript",
"@npm//@types/enzyme",
"@npm//@types/jest",
"@npm//@types/lodash",
"@npm//@types/node",
"@npm//@types/react",
"@npm//@types/react-beautiful-dnd",
]
DEPS = SRC_DEPS + TYPES_DEPS
ts_config(
name = "tsconfig",
src = "tsconfig.json",
deps = [
"//:tsconfig.base.json",
],
)
ts_config(
name = "tsconfig_browser",
src = "tsconfig.browser.json",
deps = [
"//:tsconfig.base.json",
"//:tsconfig.browser.json",
],
)
ts_project(
name = "tsc",
args = ["--pretty"],
srcs = SRCS,
deps = DEPS,
declaration = True,
declaration_dir = "target_types",
declaration_map = True,
incremental = True,
out_dir = "target_node",
root_dir = "src",
source_map = True,
tsconfig = ":tsconfig",
)
ts_project(
name = "tsc_browser",
args = ['--pretty'],
srcs = SRCS,
deps = DEPS,
allow_js = True,
declaration = False,
incremental = True,
out_dir = "target_web",
source_map = True,
root_dir = "src",
tsconfig = ":tsconfig_browser",
)
js_library(
name = PKG_BASE_NAME,
package_name = PKG_REQUIRE_NAME,
srcs = NPM_MODULE_EXTRA_FILES,
visibility = ["//visibility:public"],
deps = [":tsc", ":tsc_browser"] + DEPS,
)
pkg_npm(
name = "npm_module",
deps = [
":%s" % PKG_BASE_NAME,
],
)
filegroup(
name = "build",
srcs = [
":npm_module",
],
visibility = ["//visibility:public"],
)