* chore(NA): moving @kbn/apm-config-loader into bazel (#98323) Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> # Conflicts: # docs/developer/getting-started/monorepo-packages.asciidoc # packages/BUILD.bazel # packages/kbn-apm-config-loader/package.json * docs(NA): fix docs merge head
This commit is contained in:
parent
899fd68e47
commit
04a382769d
|
@ -63,6 +63,7 @@ yarn kbn watch-bazel
|
|||
|
||||
- @elastic/datemath
|
||||
- @elastic/safer-lodash-set
|
||||
- @kbn/apm-config-loader
|
||||
- @kbn/apm-utils
|
||||
- @kbn/babel-code-parser
|
||||
- @kbn/babel-preset
|
||||
|
|
|
@ -120,7 +120,7 @@
|
|||
"@hapi/wreck": "^17.1.0",
|
||||
"@kbn/ace": "link:packages/kbn-ace",
|
||||
"@kbn/analytics": "link:packages/kbn-analytics",
|
||||
"@kbn/apm-config-loader": "link:packages/kbn-apm-config-loader",
|
||||
"@kbn/apm-config-loader": "link:bazel-bin/packages/kbn-apm-config-loader/npm_module",
|
||||
"@kbn/apm-utils": "link:bazel-bin/packages/kbn-apm-utils/npm_module",
|
||||
"@kbn/config": "link:packages/kbn-config",
|
||||
"@kbn/config-schema": "link:bazel-bin/packages/kbn-config-schema/npm_module",
|
||||
|
|
|
@ -5,6 +5,7 @@ filegroup(
|
|||
srcs = [
|
||||
"//packages/elastic-datemath:build",
|
||||
"//packages/elastic-safer-lodash-set:build",
|
||||
"//packages/kbn-apm-config-loader:build",
|
||||
"//packages/kbn-apm-utils:build",
|
||||
"//packages/kbn-babel-code-parser:build",
|
||||
"//packages/kbn-babel-preset:build",
|
||||
|
|
87
packages/kbn-apm-config-loader/BUILD.bazel
Normal file
87
packages/kbn-apm-config-loader/BUILD.bazel
Normal file
|
@ -0,0 +1,87 @@
|
|||
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-apm-config-loader"
|
||||
PKG_REQUIRE_NAME = "@kbn/apm-config-loader"
|
||||
|
||||
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/elastic-safer-lodash-set",
|
||||
"//packages/kbn-utils",
|
||||
"@npm//js-yaml",
|
||||
"@npm//lodash",
|
||||
]
|
||||
|
||||
TYPES_DEPS = [
|
||||
"@npm//@types/jest",
|
||||
"@npm//@types/js-yaml",
|
||||
"@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 = [":tsc"] + DEPS,
|
||||
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,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-apm-config-loader/src",
|
||||
"types": [
|
||||
|
|
Loading…
Reference in a new issue