mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
chore(NA): moving @kbn/rule-data-utils into bazel (#101290)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
4fae338604
commit
78d8272afe
6 changed files with 85 additions and 3 deletions
|
@ -85,6 +85,7 @@ yarn kbn watch-bazel
|
|||
- @kbn/logging
|
||||
- @kbn/mapbox-gl
|
||||
- @kbn/monaco
|
||||
- @kbn/rule-data-utils
|
||||
- @kbn/securitysolution-es-utils
|
||||
- @kbn/securitysolution-io-ts-alerting-types
|
||||
- @kbn/securitysolution-io-ts-list-types
|
||||
|
|
|
@ -138,7 +138,7 @@
|
|||
"@kbn/legacy-logging": "link:bazel-bin/packages/kbn-legacy-logging",
|
||||
"@kbn/logging": "link:bazel-bin/packages/kbn-logging",
|
||||
"@kbn/monaco": "link:bazel-bin/packages/kbn-monaco",
|
||||
"@kbn/rule-data-utils": "link:packages/kbn-rule-data-utils",
|
||||
"@kbn/rule-data-utils": "link:bazel-bin/packages/kbn-rule-data-utils",
|
||||
"@kbn/securitysolution-list-constants": "link:bazel-bin/packages/kbn-securitysolution-list-constants",
|
||||
"@kbn/securitysolution-es-utils": "link:bazel-bin/packages/kbn-securitysolution-es-utils",
|
||||
"@kbn/securitysolution-io-ts-types": "link:bazel-bin/packages/kbn-securitysolution-io-ts-types",
|
||||
|
|
|
@ -28,6 +28,7 @@ filegroup(
|
|||
"//packages/kbn-mapbox-gl:build",
|
||||
"//packages/kbn-monaco:build",
|
||||
"//packages/kbn-plugin-generator:build",
|
||||
"//packages/kbn-rule-data-utils:build",
|
||||
"//packages/kbn-securitysolution-list-constants:build",
|
||||
"//packages/kbn-securitysolution-io-ts-types:build",
|
||||
"//packages/kbn-securitysolution-io-ts-alerting-types:build",
|
||||
|
|
79
packages/kbn-rule-data-utils/BUILD.bazel
Normal file
79
packages/kbn-rule-data-utils/BUILD.bazel
Normal file
|
@ -0,0 +1,79 @@
|
|||
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-rule-data-utils"
|
||||
PKG_REQUIRE_NAME = "@kbn/rule-data-utils"
|
||||
|
||||
SOURCE_FILES = glob(
|
||||
[
|
||||
"src/**/*.ts",
|
||||
],
|
||||
)
|
||||
|
||||
SRCS = SOURCE_FILES
|
||||
|
||||
filegroup(
|
||||
name = "srcs",
|
||||
srcs = SRCS,
|
||||
)
|
||||
|
||||
NPM_MODULE_EXTRA_FILES = [
|
||||
"package.json",
|
||||
]
|
||||
|
||||
SRC_DEPS = [
|
||||
"@npm//tslib",
|
||||
"@npm//utility-types",
|
||||
]
|
||||
|
||||
TYPES_DEPS = [
|
||||
"@npm//@types/jest",
|
||||
"@npm//@types/node",
|
||||
]
|
||||
|
||||
DEPS = SRC_DEPS + TYPES_DEPS
|
||||
|
||||
ts_config(
|
||||
name = "tsconfig",
|
||||
src = "tsconfig.json",
|
||||
deps = [
|
||||
"//:tsconfig.base.json",
|
||||
],
|
||||
)
|
||||
|
||||
ts_project(
|
||||
name = "tsc",
|
||||
args = ['--pretty'],
|
||||
srcs = SRCS,
|
||||
deps = DEPS,
|
||||
declaration = True,
|
||||
declaration_map = True,
|
||||
incremental = True,
|
||||
out_dir = "target",
|
||||
source_map = True,
|
||||
root_dir = "src",
|
||||
tsconfig = ":tsconfig",
|
||||
)
|
||||
|
||||
js_library(
|
||||
name = PKG_BASE_NAME,
|
||||
srcs = NPM_MODULE_EXTRA_FILES,
|
||||
deps = DEPS + [":tsc"],
|
||||
package_name = PKG_REQUIRE_NAME,
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
pkg_npm(
|
||||
name = "npm_module",
|
||||
deps = [
|
||||
":%s" % PKG_BASE_NAME,
|
||||
]
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "build",
|
||||
srcs = [
|
||||
":npm_module",
|
||||
],
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
|
@ -1,11 +1,12 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"incremental": false,
|
||||
"incremental": true,
|
||||
"outDir": "./target",
|
||||
"stripInternal": false,
|
||||
"declaration": true,
|
||||
"declarationMap": true,
|
||||
"rootDir": "./src",
|
||||
"sourceMap": true,
|
||||
"sourceRoot": "../../../../packages/kbn-rule-data-utils/src",
|
||||
"types": [
|
||||
|
|
|
@ -2703,7 +2703,7 @@
|
|||
version "0.0.0"
|
||||
uid ""
|
||||
|
||||
"@kbn/rule-data-utils@link:packages/kbn-rule-data-utils":
|
||||
"@kbn/rule-data-utils@link:bazel-bin/packages/kbn-rule-data-utils":
|
||||
version "0.0.0"
|
||||
uid ""
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue