* chore(NA): moving @kbn/dev-utils into bazel * docs(NA): updated generated plugin list Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
This commit is contained in:
parent
cbc1f12860
commit
b3fc91c6d8
|
@ -68,6 +68,7 @@ yarn kbn watch-bazel
|
|||
- @kbn/babel-code-parser
|
||||
- @kbn/babel-preset
|
||||
- @kbn/config-schema
|
||||
- @kbn/dev-utils
|
||||
- @kbn/expect
|
||||
- @kbn/logging
|
||||
- @kbn/std
|
||||
|
|
|
@ -6,7 +6,7 @@ NOTE:
|
|||
|
||||
node scripts/build_plugin_list_docs
|
||||
|
||||
You can update the template within packages/kbn-dev-utils/target/plugin_list/generate_plugin_list.js
|
||||
You can update the template within node_modules/@kbn/dev-utils/target/plugin_list/generate_plugin_list.js
|
||||
|
||||
////
|
||||
|
||||
|
|
|
@ -437,7 +437,7 @@
|
|||
"@kbn/babel-code-parser": "link:bazel-bin/packages/kbn-babel-code-parser/npm_module",
|
||||
"@kbn/babel-preset": "link:bazel-bin/packages/kbn-babel-preset/npm_module",
|
||||
"@kbn/cli-dev-mode": "link:packages/kbn-cli-dev-mode",
|
||||
"@kbn/dev-utils": "link:packages/kbn-dev-utils",
|
||||
"@kbn/dev-utils": "link:bazel-bin/packages/kbn-dev-utils/npm_module",
|
||||
"@kbn/docs-utils": "link:packages/kbn-docs-utils",
|
||||
"@kbn/es": "link:packages/kbn-es",
|
||||
"@kbn/es-archiver": "link:packages/kbn-es-archiver",
|
||||
|
|
|
@ -10,6 +10,7 @@ filegroup(
|
|||
"//packages/kbn-babel-code-parser:build",
|
||||
"//packages/kbn-babel-preset:build",
|
||||
"//packages/kbn-config-schema:build",
|
||||
"//packages/kbn-dev-utils:build",
|
||||
"//packages/kbn-expect:build",
|
||||
"//packages/kbn-logging:build",
|
||||
"//packages/kbn-std:build",
|
||||
|
|
|
@ -16,8 +16,5 @@
|
|||
"bugs": {
|
||||
"url": "https://github.com/elastic/kibana/tree/master/packages/elastic-eslint-config-kibana"
|
||||
},
|
||||
"homepage": "https://github.com/elastic/kibana/tree/master/packages/elastic-eslint-config-kibana",
|
||||
"dependencies": {
|
||||
"@kbn/dev-utils": "link:../kbn-dev-utils"
|
||||
}
|
||||
"homepage": "https://github.com/elastic/kibana/tree/master/packages/elastic-eslint-config-kibana"
|
||||
}
|
|
@ -8,8 +8,5 @@
|
|||
"scripts": {
|
||||
"build": "node ./scripts/build.js",
|
||||
"kbn:bootstrap": "yarn build --dev"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@kbn/dev-utils": "link:../kbn-dev-utils"
|
||||
}
|
||||
}
|
|
@ -12,8 +12,5 @@
|
|||
"build": "node scripts/build",
|
||||
"kbn:bootstrap": "node scripts/build --source-maps",
|
||||
"kbn:watch": "node scripts/build --source-maps --watch"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@kbn/dev-utils": "link:../kbn-dev-utils"
|
||||
}
|
||||
}
|
|
@ -16,7 +16,6 @@
|
|||
"dependencies": {
|
||||
"@kbn/config": "link:../kbn-config",
|
||||
"@kbn/server-http-tools": "link:../kbn-server-http-tools",
|
||||
"@kbn/optimizer": "link:../kbn-optimizer",
|
||||
"@kbn/dev-utils": "link:../kbn-dev-utils"
|
||||
"@kbn/optimizer": "link:../kbn-optimizer"
|
||||
}
|
||||
}
|
|
@ -8,9 +8,5 @@
|
|||
"scripts": {
|
||||
"build": "../../node_modules/.bin/tsc",
|
||||
"kbn:bootstrap": "yarn build"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@kbn/dev-utils": "link:../kbn-dev-utils",
|
||||
"@kbn/utility-types": "link:../kbn-utility-types"
|
||||
}
|
||||
}
|
|
@ -9,9 +9,5 @@
|
|||
"build": "../../node_modules/.bin/tsc",
|
||||
"kbn:bootstrap": "yarn build",
|
||||
"kbn:watch": "yarn build --watch"
|
||||
},
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"@kbn/dev-utils": "link:../kbn-dev-utils"
|
||||
}
|
||||
}
|
128
packages/kbn-dev-utils/BUILD.bazel
Normal file
128
packages/kbn-dev-utils/BUILD.bazel
Normal file
|
@ -0,0 +1,128 @@
|
|||
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-dev-utils"
|
||||
PKG_REQUIRE_NAME = "@kbn/dev-utils"
|
||||
|
||||
SOURCE_FILES = glob(
|
||||
[
|
||||
"src/**/*.ts",
|
||||
],
|
||||
exclude = [
|
||||
"**/*.test.*"
|
||||
],
|
||||
)
|
||||
|
||||
SRCS = SOURCE_FILES
|
||||
|
||||
filegroup(
|
||||
name = "srcs",
|
||||
srcs = SRCS,
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "certs",
|
||||
srcs = glob(
|
||||
[
|
||||
"certs/**/*",
|
||||
],
|
||||
exclude = [
|
||||
"**/README.md"
|
||||
],
|
||||
),
|
||||
)
|
||||
|
||||
NPM_MODULE_EXTRA_FILES = [
|
||||
"package.json",
|
||||
"README.md",
|
||||
":certs",
|
||||
"ci_stats_reporter/package.json",
|
||||
"stdio/package.json",
|
||||
"tooling_log/package.json"
|
||||
]
|
||||
|
||||
SRC_DEPS = [
|
||||
"//packages/kbn-expect",
|
||||
"//packages/kbn-utils",
|
||||
"@npm//@babel/core",
|
||||
"@npm//axios",
|
||||
"@npm//chalk",
|
||||
"@npm//chance",
|
||||
"@npm//cheerio",
|
||||
"@npm//dedent",
|
||||
"@npm//execa",
|
||||
"@npm//exit-hook",
|
||||
"@npm//getopts",
|
||||
"@npm//globby",
|
||||
"@npm//jest-styled-components",
|
||||
"@npm//load-json-file",
|
||||
"@npm//markdown-it",
|
||||
"@npm//moment",
|
||||
"@npm//normalize-path",
|
||||
"@npm//rxjs",
|
||||
"@npm//tree-kill",
|
||||
"@npm//tslib",
|
||||
"@npm//typescript",
|
||||
"@npm//vinyl"
|
||||
]
|
||||
|
||||
TYPES_DEPS = [
|
||||
"@npm//@types/babel__core",
|
||||
"@npm//@types/cheerio",
|
||||
"@npm//@types/dedent",
|
||||
"@npm//@types/flot",
|
||||
"@npm//@types/jest",
|
||||
"@npm//@types/markdown-it",
|
||||
"@npm//@types/node",
|
||||
"@npm//@types/normalize-path",
|
||||
"@npm//@types/react",
|
||||
"@npm//@types/testing-library__jest-dom",
|
||||
"@npm//@types/vinyl"
|
||||
]
|
||||
|
||||
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"],
|
||||
)
|
|
@ -5,15 +5,7 @@
|
|||
"license": "SSPL-1.0 OR Elastic License 2.0",
|
||||
"main": "./target/index.js",
|
||||
"types": "./target/index.d.ts",
|
||||
"scripts": {
|
||||
"build": "../../node_modules/.bin/tsc",
|
||||
"kbn:bootstrap": "yarn build",
|
||||
"kbn:watch": "yarn build --watch"
|
||||
},
|
||||
"kibana": {
|
||||
"devOnly": true
|
||||
},
|
||||
"devDependencies": {
|
||||
"@kbn/expect": "link:../kbn-expect"
|
||||
}
|
||||
}
|
|
@ -6,7 +6,6 @@
|
|||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
import Fs from 'fs';
|
||||
import Path from 'path';
|
||||
|
||||
import normalizePath from 'normalize-path';
|
||||
|
@ -49,7 +48,7 @@ NOTE:
|
|||
node scripts/build_plugin_list_docs
|
||||
|
||||
You can update the template within ${normalizePath(
|
||||
Path.relative(REPO_ROOT, Fs.realpathSync(Path.resolve(__dirname, __filename)))
|
||||
Path.relative(REPO_ROOT, Path.resolve(__dirname, __filename))
|
||||
)}
|
||||
|
||||
////
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"incremental": false,
|
||||
"incremental": true,
|
||||
"outDir": "target",
|
||||
"stripInternal": false,
|
||||
"target": "ES2019",
|
||||
"declaration": true,
|
||||
"declarationMap": true,
|
||||
"rootDir": "src",
|
||||
"sourceMap": true,
|
||||
"sourceRoot": "../../../../packages/kbn-dev-utils/src",
|
||||
"types": [
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
"kbn:watch": "../../node_modules/.bin/tsc --watch"
|
||||
},
|
||||
"dependencies": {
|
||||
"@kbn/config": "link:../kbn-config",
|
||||
"@kbn/dev-utils": "link:../kbn-dev-utils"
|
||||
"@kbn/config": "link:../kbn-config"
|
||||
}
|
||||
}
|
|
@ -13,7 +13,6 @@
|
|||
"kbn:watch": "rm -rf target && ../../node_modules/.bin/tsc --watch"
|
||||
},
|
||||
"dependencies": {
|
||||
"@kbn/dev-utils": "link:../kbn-dev-utils",
|
||||
"@kbn/test": "link:../kbn-test"
|
||||
}
|
||||
}
|
|
@ -11,8 +11,5 @@
|
|||
"build": "node scripts/build",
|
||||
"kbn:bootstrap": "node scripts/build",
|
||||
"kbn:watch": "node scripts/build --watch"
|
||||
},
|
||||
"dependencies": {
|
||||
"@kbn/dev-utils": "link:../kbn-dev-utils"
|
||||
}
|
||||
}
|
|
@ -10,8 +10,5 @@
|
|||
"build": "node scripts/build",
|
||||
"kbn:bootstrap": "node scripts/build --source-maps",
|
||||
"kbn:watch": "node scripts/build --watch --source-maps"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@kbn/dev-utils": "link:../kbn-dev-utils"
|
||||
}
|
||||
}
|
|
@ -11,8 +11,5 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@kbn/i18n": "link:../kbn-i18n"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@kbn/dev-utils": "link:../kbn-dev-utils"
|
||||
}
|
||||
}
|
|
@ -10,9 +10,6 @@
|
|||
"kbn:bootstrap": "yarn build --dev",
|
||||
"build:antlr4ts": "../../node_modules/antlr4ts-cli/antlr4ts ./src/painless/antlr/painless_lexer.g4 ./src/painless/antlr/painless_parser.g4 && node ./scripts/fix_generated_antlr.js"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@kbn/dev-utils": "link:../kbn-dev-utils"
|
||||
},
|
||||
"dependencies": {
|
||||
"@kbn/i18n": "link:../kbn-i18n"
|
||||
}
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@kbn/config": "link:../kbn-config",
|
||||
"@kbn/dev-utils": "link:../kbn-dev-utils",
|
||||
"@kbn/ui-shared-deps": "link:../kbn-ui-shared-deps"
|
||||
}
|
||||
}
|
|
@ -8,8 +8,5 @@
|
|||
"scripts": {
|
||||
"kbn:bootstrap": "node scripts/build",
|
||||
"kbn:watch": "node scripts/build --watch"
|
||||
},
|
||||
"dependencies": {
|
||||
"@kbn/dev-utils": "link:../kbn-dev-utils"
|
||||
}
|
||||
}
|
|
@ -17,7 +17,6 @@
|
|||
"kbn:watch": "../../node_modules/.bin/tsc --watch"
|
||||
},
|
||||
"dependencies": {
|
||||
"@kbn/dev-utils": "link:../kbn-dev-utils",
|
||||
"@kbn/optimizer": "link:../kbn-optimizer"
|
||||
}
|
||||
}
|
|
@ -11,8 +11,5 @@
|
|||
"build": "../../node_modules/.bin/webpack",
|
||||
"kbn:watch": "../../node_modules/.bin/webpack --watch",
|
||||
"prettier": "../../node_modules/.bin/prettier --write './src/**/*.ts'"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@kbn/dev-utils": "link:../kbn-dev-utils"
|
||||
}
|
||||
}
|
|
@ -12,8 +12,5 @@
|
|||
"build": "../../node_modules/.bin/tsc",
|
||||
"kbn:bootstrap": "yarn build",
|
||||
"watch": "yarn build --watch"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@kbn/dev-utils": "link:../kbn-dev-utils"
|
||||
}
|
||||
}
|
|
@ -12,9 +12,5 @@
|
|||
"build": "../../node_modules/.bin/babel src --out-dir target --delete-dir-on-start --extensions .ts --source-maps=inline",
|
||||
"kbn:bootstrap": "yarn build",
|
||||
"kbn:watch": "yarn build --watch"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@kbn/dev-utils": "link:../kbn-dev-utils",
|
||||
"@kbn/utility-types": "link:../kbn-utility-types"
|
||||
}
|
||||
}
|
|
@ -17,9 +17,5 @@
|
|||
"@kbn/es": "link:../kbn-es",
|
||||
"@kbn/i18n": "link:../kbn-i18n",
|
||||
"@kbn/optimizer": "link:../kbn-optimizer"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@kbn/dev-utils": "link:../kbn-dev-utils",
|
||||
"@kbn/expect": "link:../kbn-expect"
|
||||
}
|
||||
}
|
|
@ -12,8 +12,5 @@
|
|||
"@kbn/analytics": "link:../kbn-analytics",
|
||||
"@kbn/i18n": "link:../kbn-i18n",
|
||||
"@kbn/monaco": "link:../kbn-monaco"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@kbn/dev-utils": "link:../kbn-dev-utils"
|
||||
}
|
||||
}
|
|
@ -27,9 +27,7 @@
|
|||
"yarn": "^1.21.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@kbn/dev-utils": "link:../packages/kbn-dev-utils",
|
||||
"@kbn/es": "link:../packages/kbn-es",
|
||||
"@kbn/expect": "link:../packages/kbn-expect",
|
||||
"@kbn/plugin-helpers": "link:../packages/kbn-plugin-helpers",
|
||||
"@kbn/storybook": "link:../packages/kbn-storybook",
|
||||
"@kbn/test": "link:../packages/kbn-test"
|
||||
|
|
Loading…
Reference in a new issue