chore(NA): moving @kbn/spec-to-console into bazel (#103470) (#103498)

* chore(NA): moving @kbn/spec-to-console into bazel

* chore(NA): fix licenses

Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
This commit is contained in:
Kibana Machine 2021-06-28 13:08:28 -04:00 committed by GitHub
parent 7d88647c79
commit ebe1f7c95d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 68 additions and 5 deletions

View file

@ -103,6 +103,7 @@ yarn kbn watch-bazel
- @kbn/securitysolution-utils
- @kbn/server-http-tools
- @kbn/server-route-repository
- @kbn/spec-to-console
- @kbn/std
- @kbn/storybook
- @kbn/telemetry-utils

View file

@ -467,6 +467,7 @@
"@kbn/plugin-generator": "link:bazel-bin/packages/kbn-plugin-generator",
"@kbn/plugin-helpers": "link:bazel-bin/packages/kbn-plugin-helpers",
"@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/telemetry-tools": "link:bazel-bin/packages/kbn-telemetry-tools",
"@kbn/test": "link:packages/kbn-test",

View file

@ -48,6 +48,7 @@ filegroup(
"//packages/kbn-securitysolution-hook-utils:build",
"//packages/kbn-server-http-tools:build",
"//packages/kbn-server-route-repository:build",
"//packages/kbn-spec-to-console:build",
"//packages/kbn-std:build",
"//packages/kbn-storybook:build",
"//packages/kbn-telemetry-tools:build",

View 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"],
)

View file

@ -8,8 +8,8 @@
const convert = require('./convert');
const clusterHealthSpec = require('../test/fixtures/cluster_health_spec');
const clusterHealthAutocomplete = require('../test/fixtures/cluster_health_autocomplete');
const clusterHealthSpec = require('./__fixtures__/cluster_health_spec');
const clusterHealthAutocomplete = require('./__fixtures__/cluster_health_autocomplete');
test('convert', () => {
expect(convert(clusterHealthSpec)).toEqual(clusterHealthAutocomplete);

View file

@ -1,11 +1,12 @@
{
"name": "spec-to-console",
"version": "0.0.0",
"name": "@kbn/spec-to-console",
"version": "1.0.0",
"description": "ES REST spec -> Console autocomplete",
"main": "index.js",
"directories": {
"lib": "lib"
},
"private": true,
"scripts": {
"format": "../../node_modules/.bin/prettier **/*.js --write"
},

View file

@ -6,4 +6,4 @@
* Side Public License, v 1.
*/
require('../packages/kbn-spec-to-console/bin/spec_to_console');
require('@kbn/spec-to-console/bin/spec_to_console');

View file

@ -2769,6 +2769,10 @@
version "0.0.0"
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":
version "0.0.0"
uid ""