Skip to content

Commit

Permalink
chore(NA): merge and solve conflicts with main
Browse files Browse the repository at this point in the history
  • Loading branch information
mistic committed Dec 21, 2021
2 parents 89fdecf + d7a7f6b commit 50613f3
Show file tree
Hide file tree
Showing 139 changed files with 800 additions and 404 deletions.
4 changes: 0 additions & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -850,10 +850,6 @@ module.exports = {
name: 'semver',
message: 'Please use "semver/*/{function}" instead',
},
{
name: '@kbn/rule-data-utils',
message: `Import directly from @kbn/rule-data-utils/* submodules in public/common code`,
},
],
},
],
Expand Down
9 changes: 9 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,15 @@
"@types/kbn__optimizer": "link:bazel-bin/packages/kbn-optimizer/npm_module_types",
"@types/kbn__plugin-generator": "link:bazel-bin/packages/kbn-plugin-generator/npm_module_types",
"@types/kbn__plugin-helpers": "link:bazel-bin/packages/kbn-plugin-helpers/npm_module_types",
"@types/kbn__react-field": "link:bazel-bin/packages/kbn-react-field/npm_module_types",
"@types/kbn__rule-data-utils": "link:bazel-bin/packages/kbn-rule-data-utils/npm_module_types",
"@types/kbn__securitysolution-autocomplete": "link:bazel-bin/packages/kbn-securitysolution-autocomplete/npm_module_types",
"@types/kbn__securitysolution-es-utils": "link:bazel-bin/packages/kbn-securitysolution-es-utils/npm_module_types",
"@types/kbn__securitysolution-hook-utils": "link:bazel-bin/packages/kbn-securitysolution-hook-utils/npm_module_types",
"@types/kbn__securitysolution-io-ts-alerting-types": "link:bazel-bin/packages/kbn-securitysolution-io-ts-alerting-types/npm_module_types",
"@types/kbn__securitysolution-io-ts-list-types": "link:bazel-bin/packages/kbn-securitysolution-io-ts-list-types/npm_module_types",
"@types/kbn__securitysolution-io-ts-types": "link:bazel-bin/packages/kbn-securitysolution-io-ts-types/npm_module_types",
"@types/kbn__securitysolution-list-api": "link:bazel-bin/packages/kbn-securitysolution-list-api/npm_module_types",
"@types/kbn__securitysolution-list-constants": "link:bazel-bin/packages/kbn-securitysolution-list-constants/npm_module_types",
"@types/license-checker": "15.0.0",
"@types/listr": "^0.14.0",
Expand Down
9 changes: 9 additions & 0 deletions packages/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,15 @@ filegroup(
"//packages/kbn-optimizer:build_types",
"//packages/kbn-plugin-generator:build_types",
"//packages/kbn-plugin-helpers:build_types",
"//packages/kbn-react-field:build_types",
"//packages/kbn-rule-data-utils:build_types",
"//packages/kbn-securitysolution-autocomplete:build_types",
"//packages/kbn-securitysolution-es-utils:build_types",
"//packages/kbn-securitysolution-hook-utils:build_types",
"//packages/kbn-securitysolution-io-ts-alerting-types:build_types",
"//packages/kbn-securitysolution-io-ts-list-types:build_types",
"//packages/kbn-securitysolution-io-ts-types:build_types",
"//packages/kbn-securitysolution-list-api:build_types",
"//packages/kbn-securitysolution-list-constants:build_types",
],
)
Expand Down
38 changes: 26 additions & 12 deletions packages/kbn-react-field/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -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-react-field"
PKG_REQUIRE_NAME = "@kbn/react-field"
TYPES_PKG_REQUIRE_NAME = "@types/kbn__react-field"

SOURCE_FILES = glob(
[
Expand All @@ -29,26 +30,22 @@ filegroup(
NPM_MODULE_EXTRA_FILES = [
"package.json",
"README.md",
"field_button/package.json",
"field_icon/package.json",
]

RUNTIME_DEPS = [
"@npm//@elastic/eui",
"@npm//classnames",
"@npm//prop-types",
"@npm//react",
"@npm//classnames",
"@npm//@elastic/eui",
"//packages/kbn-i18n",
]

TYPES_DEPS = [
"//packages/kbn-i18n",
"@npm//tslib",
"@npm//@elastic/eui",
"@npm//@types/classnames",
"@npm//@types/jest",
"@npm//@types/prop-types",
"@npm//@types/classnames",
"@npm//@types/react",
"@npm//@elastic/eui",
]

jsts_transpiler(
Expand Down Expand Up @@ -98,7 +95,7 @@ ts_project(
js_library(
name = PKG_BASE_NAME,
srcs = NPM_MODULE_EXTRA_FILES,
deps = RUNTIME_DEPS + [":target_node", ":target_webpack", ":tsc_types"],
deps = RUNTIME_DEPS + [":target_node", ":target_webpack"],
package_name = PKG_REQUIRE_NAME,
visibility = ["//visibility:public"],
)
Expand All @@ -117,3 +114,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"],
)
5 changes: 0 additions & 5 deletions packages/kbn-react-field/field_button/package.json

This file was deleted.

5 changes: 0 additions & 5 deletions packages/kbn-react-field/field_icon/package.json

This file was deleted.

1 change: 0 additions & 1 deletion packages/kbn-react-field/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"name": "@kbn/react-field",
"main": "./target_node/index.js",
"browser": "./target_webpack/index.js",
"types": "./target_types/index.d.ts",
"version": "1.0.0",
"license": "SSPL-1.0 OR Elastic License 2.0",
"private": true
Expand Down
30 changes: 22 additions & 8 deletions packages/kbn-rule-data-utils/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -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-rule-data-utils"
PKG_REQUIRE_NAME = "@kbn/rule-data-utils"
TYPES_PKG_REQUIRE_NAME = "@types/kbn__rule-data-utils"

SOURCE_FILES = glob(
[
Expand All @@ -20,10 +21,6 @@ filegroup(

NPM_MODULE_EXTRA_FILES = [
"package.json",
"alerts_as_data_rbac/package.json",
"alerts_as_data_severity/package.json",
"alerts_as_data_status/package.json",
"technical_field_names/package.json",
]

RUNTIME_DEPS = [
Expand Down Expand Up @@ -75,7 +72,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"],
)
Expand All @@ -94,3 +91,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"],
)
4 changes: 0 additions & 4 deletions packages/kbn-rule-data-utils/alerts_as_data_rbac/package.json

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion packages/kbn-rule-data-utils/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "@kbn/rule-data-utils",
"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
Expand Down

This file was deleted.

32 changes: 25 additions & 7 deletions packages/kbn-securitysolution-autocomplete/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,10 +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-securitysolution-autocomplete"

PKG_REQUIRE_NAME = "@kbn/securitysolution-autocomplete"
TYPES_PKG_REQUIRE_NAME = "@types/kbn__securitysolution-autocomplete"

SOURCE_FILES = glob(
[
Expand Down Expand Up @@ -46,10 +46,10 @@ RUNTIME_DEPS = [

TYPES_DEPS = [
"//packages/kbn-es-query:npm_module_types",
"//packages/kbn-i18n",
"//packages/kbn-i18n:npm_module_types",
"//packages/kbn-securitysolution-list-hooks",
"//packages/kbn-securitysolution-list-utils",
"//packages/kbn-securitysolution-io-ts-list-types",
"//packages/kbn-securitysolution-io-ts-list-types:npm_module_types",
"@npm//@elastic/eui",
"@npm//@testing-library/react",
"@npm//@testing-library/react-hooks",
Expand Down Expand Up @@ -99,7 +99,7 @@ ts_project(
js_library(
name = PKG_BASE_NAME,
srcs = NPM_MODULE_EXTRA_FILES,
deps = RUNTIME_DEPS + [":target_node", ":target_web", ":tsc_types"],
deps = RUNTIME_DEPS + [":target_node", ":target_web"],
package_name = PKG_REQUIRE_NAME,
visibility = ["//visibility:public"],
)
Expand All @@ -118,3 +118,21 @@ 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"],
)

1 change: 0 additions & 1 deletion packages/kbn-securitysolution-autocomplete/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@
"license": "SSPL-1.0 OR Elastic License 2.0",
"browser": "./target_web/index.js",
"main": "./target_node/index.js",
"types": "./target_types/index.d.ts",
"private": true
}
27 changes: 22 additions & 5 deletions packages/kbn-securitysolution-es-utils/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,10 +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-securitysolution-es-utils"

PKG_REQUIRE_NAME = "@kbn/securitysolution-es-utils"
TYPES_PKG_REQUIRE_NAME = "@types/kbn__securitysolution-es-utils"

SOURCE_FILES = glob(
[
Expand Down Expand Up @@ -76,7 +76,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"],
)
Expand All @@ -95,3 +95,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"],
)
1 change: 0 additions & 1 deletion packages/kbn-securitysolution-es-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@
"description": "security solution elastic search utilities to use across plugins such lists, security_solution, cases, etc...",
"license": "SSPL-1.0 OR Elastic License 2.0",
"main": "./target_node/index.js",
"types": "./target_types/index.d.ts",
"private": true
}
27 changes: 22 additions & 5 deletions packages/kbn-securitysolution-hook-utils/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,10 +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-securitysolution-hook-utils"

PKG_REQUIRE_NAME = "@kbn/securitysolution-hook-utils"
TYPES_PKG_REQUIRE_NAME = "@types/kbn__securitysolution-hook-utils"

SOURCE_FILES = glob(
[
Expand Down Expand Up @@ -83,7 +83,7 @@ ts_project(
js_library(
name = PKG_BASE_NAME,
srcs = NPM_MODULE_EXTRA_FILES,
deps = RUNTIME_DEPS + [":target_node", ":target_web", ":tsc_types"],
deps = RUNTIME_DEPS + [":target_node", ":target_web"],
package_name = PKG_REQUIRE_NAME,
visibility = ["//visibility:public"],
)
Expand All @@ -102,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"],
)
1 change: 0 additions & 1 deletion packages/kbn-securitysolution-hook-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@
"license": "SSPL-1.0 OR Elastic License 2.0",
"browser": "./target_web/index.js",
"main": "./target_node/index.js",
"types": "./target_types/index.d.ts",
"private": true
}
Loading

0 comments on commit 50613f3

Please sign in to comment.