mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
chore(NA): moving @kbn/server-route-repository into bazel (#101484)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
0254ff06b5
commit
21d04614ea
7 changed files with 95 additions and 9 deletions
|
@ -97,6 +97,7 @@ yarn kbn watch-bazel
|
|||
- @kbn/securitysolution-list-utils
|
||||
- @kbn/securitysolution-utils
|
||||
- @kbn/server-http-tools
|
||||
- @kbn/server-route-repository
|
||||
- @kbn/std
|
||||
- @kbn/telemetry-utils
|
||||
- @kbn/tinymath
|
||||
|
|
|
@ -150,7 +150,7 @@
|
|||
"@kbn/securitysolution-list-utils": "link:bazel-bin/packages/kbn-securitysolution-list-utils",
|
||||
"@kbn/securitysolution-utils": "link:bazel-bin/packages/kbn-securitysolution-utils",
|
||||
"@kbn/server-http-tools": "link:bazel-bin/packages/kbn-server-http-tools",
|
||||
"@kbn/server-route-repository": "link:packages/kbn-server-route-repository",
|
||||
"@kbn/server-route-repository": "link:bazel-bin/packages/kbn-server-route-repository",
|
||||
"@kbn/std": "link:bazel-bin/packages/kbn-std",
|
||||
"@kbn/tinymath": "link:bazel-bin/packages/kbn-tinymath",
|
||||
"@kbn/ui-framework": "link:packages/kbn-ui-framework",
|
||||
|
|
|
@ -40,6 +40,7 @@ filegroup(
|
|||
"//packages/kbn-securitysolution-utils:build",
|
||||
"//packages/kbn-securitysolution-es-utils:build",
|
||||
"//packages/kbn-server-http-tools:build",
|
||||
"//packages/kbn-server-route-repository:build",
|
||||
"//packages/kbn-std:build",
|
||||
"//packages/kbn-telemetry-tools:build",
|
||||
"//packages/kbn-tinymath:build",
|
||||
|
|
89
packages/kbn-server-route-repository/BUILD.bazel
Normal file
89
packages/kbn-server-route-repository/BUILD.bazel
Normal file
|
@ -0,0 +1,89 @@
|
|||
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-server-route-repository"
|
||||
PKG_REQUIRE_NAME = "@kbn/server-route-repository"
|
||||
|
||||
SOURCE_FILES = glob(
|
||||
[
|
||||
"src/**/*.ts",
|
||||
],
|
||||
exclude = [
|
||||
"**/*.test.*",
|
||||
],
|
||||
)
|
||||
|
||||
SRCS = SOURCE_FILES
|
||||
|
||||
filegroup(
|
||||
name = "srcs",
|
||||
srcs = SRCS,
|
||||
)
|
||||
|
||||
NPM_MODULE_EXTRA_FILES = [
|
||||
"package.json",
|
||||
"README.md"
|
||||
]
|
||||
|
||||
SRC_DEPS = [
|
||||
"//packages/kbn-config-schema",
|
||||
"//packages/kbn-io-ts-utils",
|
||||
"@npm//@hapi/boom",
|
||||
"@npm//fp-ts",
|
||||
"@npm//io-ts",
|
||||
"@npm//lodash",
|
||||
"@npm//utility-types"
|
||||
]
|
||||
|
||||
TYPES_DEPS = [
|
||||
"@npm//@types/jest",
|
||||
"@npm//@types/lodash",
|
||||
"@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"],
|
||||
)
|
|
@ -4,10 +4,5 @@
|
|||
"types": "./target/index.d.ts",
|
||||
"version": "1.0.0",
|
||||
"license": "SSPL-1.0 OR Elastic License 2.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "../../node_modules/.bin/tsc",
|
||||
"kbn:bootstrap": "yarn build",
|
||||
"kbn:watch": "yarn build --watch"
|
||||
}
|
||||
"private": true
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"incremental": false,
|
||||
"incremental": true,
|
||||
"outDir": "./target",
|
||||
"stripInternal": false,
|
||||
"declaration": true,
|
||||
|
|
|
@ -2759,7 +2759,7 @@
|
|||
version "0.0.0"
|
||||
uid ""
|
||||
|
||||
"@kbn/server-route-repository@link:packages/kbn-server-route-repository":
|
||||
"@kbn/server-route-repository@link:bazel-bin/packages/kbn-server-route-repository":
|
||||
version "0.0.0"
|
||||
uid ""
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue