chore(NA): splits types from code on @kbn/server-http-tools (#121807)

This commit is contained in:
Tiago Costa 2021-12-22 02:37:29 +00:00 committed by GitHub
parent 4305732a45
commit f7a0afc5e1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 29 additions and 6 deletions

View file

@ -598,6 +598,7 @@
"@types/kbn__securitysolution-rules": "link:bazel-bin/packages/kbn-securitysolution-rules/npm_module_types",
"@types/kbn__securitysolution-t-grid": "link:bazel-bin/packages/kbn-securitysolution-t-grid/npm_module_types",
"@types/kbn__securitysolution-utils": "link:bazel-bin/packages/kbn-securitysolution-utils/npm_module_types",
"@types/kbn__server-http-tools": "link:bazel-bin/packages/kbn-server-http-tools/npm_module_types",
"@types/license-checker": "15.0.0",
"@types/listr": "^0.14.0",
"@types/loader-utils": "^1.1.3",

View file

@ -115,6 +115,7 @@ filegroup(
"//packages/kbn-securitysolution-rules:build_types",
"//packages/kbn-securitysolution-t-grid:build_types",
"//packages/kbn-securitysolution-utils:build_types",
"//packages/kbn-server-http-tools:build_types",
],
)

View file

@ -53,7 +53,7 @@ TYPES_DEPS = [
"//packages/kbn-dev-utils:npm_module_types",
"//packages/kbn-logging",
"//packages/kbn-optimizer:npm_module_types",
"//packages/kbn-server-http-tools",
"//packages/kbn-server-http-tools:npm_module_types",
"//packages/kbn-std",
"//packages/kbn-utils",
"@npm//argsplit",

View file

@ -1,9 +1,10 @@
load("@npm//@bazel/typescript:index.bzl", "ts_config", "ts_project")
load("@build_bazel_rules_nodejs//:index.bzl", "js_library", "pkg_npm")
load("//src/dev/bazel:index.bzl", "jsts_transpiler")
load("@npm//@bazel/typescript:index.bzl", "ts_config")
load("@build_bazel_rules_nodejs//:index.bzl", "js_library")
load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types", "ts_project")
PKG_BASE_NAME = "kbn-server-http-tools"
PKG_REQUIRE_NAME = "@kbn/server-http-tools"
TYPES_PKG_REQUIRE_NAME = "@types/kbn__server-http-tools"
SOURCE_FILES = glob(
[
@ -82,7 +83,7 @@ ts_project(
js_library(
name = PKG_BASE_NAME,
srcs = NPM_MODULE_EXTRA_FILES,
deps = RUNTIME_DEPS + [":target_node", ":tsc_types"],
deps = RUNTIME_DEPS + [":target_node"],
package_name = PKG_REQUIRE_NAME,
visibility = ["//visibility:public"],
)
@ -101,3 +102,20 @@ filegroup(
],
visibility = ["//visibility:public"],
)
pkg_npm_types(
name = "npm_module_types",
srcs = SRCS,
deps = [":tsc_types"],
package_name = TYPES_PKG_REQUIRE_NAME,
tsconfig = ":tsconfig",
visibility = ["//visibility:public"],
)
filegroup(
name = "build_types",
srcs = [
":npm_module_types",
],
visibility = ["//visibility:public"],
)

View file

@ -1,7 +1,6 @@
{
"name": "@kbn/server-http-tools",
"main": "./target_node/index.js",
"types": "./target_types/index.d.ts",
"version": "1.0.0",
"license": "SSPL-1.0 OR Elastic License 2.0",
"private": true

View file

@ -5989,6 +5989,10 @@
version "0.0.0"
uid ""
"@types/kbn__server-http-tools@link:bazel-bin/packages/kbn-server-http-tools/npm_module_types":
version "0.0.0"
uid ""
"@types/keyv@*":
version "3.1.1"
resolved "https://registry.yarnpkg.com/@types/keyv/-/keyv-3.1.1.tgz#e45a45324fca9dab716ab1230ee249c9fb52cfa7"