mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 18:51:07 -04:00
chore(NA): moving @kbn/spec-to-console into bazel (#103470)
* chore(NA): moving @kbn/spec-to-console into bazel * chore(NA): fix licenses
This commit is contained in:
parent
91fc3cc2b9
commit
22d5c90855
10 changed files with 68 additions and 5 deletions
|
@ -103,6 +103,7 @@ yarn kbn watch-bazel
|
||||||
- @kbn/securitysolution-utils
|
- @kbn/securitysolution-utils
|
||||||
- @kbn/server-http-tools
|
- @kbn/server-http-tools
|
||||||
- @kbn/server-route-repository
|
- @kbn/server-route-repository
|
||||||
|
- @kbn/spec-to-console
|
||||||
- @kbn/std
|
- @kbn/std
|
||||||
- @kbn/storybook
|
- @kbn/storybook
|
||||||
- @kbn/telemetry-utils
|
- @kbn/telemetry-utils
|
||||||
|
|
|
@ -470,6 +470,7 @@
|
||||||
"@kbn/plugin-generator": "link:bazel-bin/packages/kbn-plugin-generator",
|
"@kbn/plugin-generator": "link:bazel-bin/packages/kbn-plugin-generator",
|
||||||
"@kbn/plugin-helpers": "link:bazel-bin/packages/kbn-plugin-helpers",
|
"@kbn/plugin-helpers": "link:bazel-bin/packages/kbn-plugin-helpers",
|
||||||
"@kbn/pm": "link:packages/kbn-pm",
|
"@kbn/pm": "link:packages/kbn-pm",
|
||||||
|
"@kbn/spec-to-console": "link:bazel-bin/packages/kbn-spec-to-console",
|
||||||
"@kbn/storybook": "link:bazel-bin/packages/kbn-storybook",
|
"@kbn/storybook": "link:bazel-bin/packages/kbn-storybook",
|
||||||
"@kbn/telemetry-tools": "link:bazel-bin/packages/kbn-telemetry-tools",
|
"@kbn/telemetry-tools": "link:bazel-bin/packages/kbn-telemetry-tools",
|
||||||
"@kbn/test": "link:packages/kbn-test",
|
"@kbn/test": "link:packages/kbn-test",
|
||||||
|
|
|
@ -48,6 +48,7 @@ filegroup(
|
||||||
"//packages/kbn-securitysolution-hook-utils:build",
|
"//packages/kbn-securitysolution-hook-utils:build",
|
||||||
"//packages/kbn-server-http-tools:build",
|
"//packages/kbn-server-http-tools:build",
|
||||||
"//packages/kbn-server-route-repository:build",
|
"//packages/kbn-server-route-repository:build",
|
||||||
|
"//packages/kbn-spec-to-console:build",
|
||||||
"//packages/kbn-std:build",
|
"//packages/kbn-std:build",
|
||||||
"//packages/kbn-storybook:build",
|
"//packages/kbn-storybook:build",
|
||||||
"//packages/kbn-telemetry-tools:build",
|
"//packages/kbn-telemetry-tools:build",
|
||||||
|
|
55
packages/kbn-spec-to-console/BUILD.bazel
Normal file
55
packages/kbn-spec-to-console/BUILD.bazel
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
load("@build_bazel_rules_nodejs//:index.bzl", "js_library", "pkg_npm")
|
||||||
|
|
||||||
|
PKG_BASE_NAME = "kbn-spec-to-console"
|
||||||
|
PKG_REQUIRE_NAME = "@kbn/spec-to-console"
|
||||||
|
|
||||||
|
SOURCE_FILES = glob(
|
||||||
|
[
|
||||||
|
"bin/**/*",
|
||||||
|
"lib/**/*",
|
||||||
|
"index.js"
|
||||||
|
],
|
||||||
|
exclude = [
|
||||||
|
"**/*.test.*",
|
||||||
|
"**/__fixtures__/**",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
SRCS = SOURCE_FILES
|
||||||
|
|
||||||
|
filegroup(
|
||||||
|
name = "srcs",
|
||||||
|
srcs = SRCS,
|
||||||
|
)
|
||||||
|
|
||||||
|
NPM_MODULE_EXTRA_FILES = [
|
||||||
|
"package.json",
|
||||||
|
"README.md",
|
||||||
|
]
|
||||||
|
|
||||||
|
DEPS = []
|
||||||
|
|
||||||
|
js_library(
|
||||||
|
name = PKG_BASE_NAME,
|
||||||
|
srcs = NPM_MODULE_EXTRA_FILES + [
|
||||||
|
":srcs",
|
||||||
|
],
|
||||||
|
deps = 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"],
|
||||||
|
)
|
|
@ -8,8 +8,8 @@
|
||||||
|
|
||||||
const convert = require('./convert');
|
const convert = require('./convert');
|
||||||
|
|
||||||
const clusterHealthSpec = require('../test/fixtures/cluster_health_spec');
|
const clusterHealthSpec = require('./__fixtures__/cluster_health_spec');
|
||||||
const clusterHealthAutocomplete = require('../test/fixtures/cluster_health_autocomplete');
|
const clusterHealthAutocomplete = require('./__fixtures__/cluster_health_autocomplete');
|
||||||
|
|
||||||
test('convert', () => {
|
test('convert', () => {
|
||||||
expect(convert(clusterHealthSpec)).toEqual(clusterHealthAutocomplete);
|
expect(convert(clusterHealthSpec)).toEqual(clusterHealthAutocomplete);
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "spec-to-console",
|
"name": "@kbn/spec-to-console",
|
||||||
"version": "0.0.0",
|
"version": "1.0.0",
|
||||||
"description": "ES REST spec -> Console autocomplete",
|
"description": "ES REST spec -> Console autocomplete",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"directories": {
|
"directories": {
|
||||||
"lib": "lib"
|
"lib": "lib"
|
||||||
},
|
},
|
||||||
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"format": "../../node_modules/.bin/prettier **/*.js --write"
|
"format": "../../node_modules/.bin/prettier **/*.js --write"
|
||||||
},
|
},
|
||||||
|
|
|
@ -6,4 +6,4 @@
|
||||||
* Side Public License, v 1.
|
* Side Public License, v 1.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require('../packages/kbn-spec-to-console/bin/spec_to_console');
|
require('@kbn/spec-to-console/bin/spec_to_console');
|
||||||
|
|
|
@ -2768,6 +2768,10 @@
|
||||||
version "0.0.0"
|
version "0.0.0"
|
||||||
uid ""
|
uid ""
|
||||||
|
|
||||||
|
"@kbn/spec-to-console@link:bazel-bin/packages/kbn-spec-to-console":
|
||||||
|
version "0.0.0"
|
||||||
|
uid ""
|
||||||
|
|
||||||
"@kbn/std@link:bazel-bin/packages/kbn-std":
|
"@kbn/std@link:bazel-bin/packages/kbn-std":
|
||||||
version "0.0.0"
|
version "0.0.0"
|
||||||
uid ""
|
uid ""
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue