mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
chore(NA): splits types from code on @kbn/es-query (#120783)
* chore(NA): splits types from code on @kbn/es-query * chore(NA): add missing type exports * chore(NA): export types as types Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
58f2dc9e9f
commit
662f491251
10 changed files with 37 additions and 12 deletions
|
@ -570,6 +570,7 @@
|
|||
"@types/kbn__dev-utils": "link:bazel-bin/packages/kbn-dev-utils/npm_module_types",
|
||||
"@types/kbn__docs-utils": "link:bazel-bin/packages/kbn-docs-utils/npm_module_types",
|
||||
"@types/kbn__es-archiver": "link:bazel-bin/packages/kbn-es-archiver/npm_module_types",
|
||||
"@types/kbn__es-query": "link:bazel-bin/packages/kbn-es-query/npm_module_types",
|
||||
"@types/kbn__i18n": "link:bazel-bin/packages/kbn-i18n/npm_module_types",
|
||||
"@types/kbn__i18n-react": "link:bazel-bin/packages/kbn-i18n-react/npm_module_types",
|
||||
"@types/license-checker": "15.0.0",
|
||||
|
|
|
@ -89,6 +89,7 @@ filegroup(
|
|||
"//packages/kbn-dev-utils:build_types",
|
||||
"//packages/kbn-docs-utils:build_types",
|
||||
"//packages/kbn-es-archiver:build_types",
|
||||
"//packages/kbn-es-query:build_types",
|
||||
"//packages/kbn-i18n:build_types",
|
||||
"//packages/kbn-i18n-react:build_types",
|
||||
],
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
load("@npm//@bazel/typescript:index.bzl", "ts_config", "ts_project")
|
||||
load("@npm//@bazel/typescript:index.bzl", "ts_config")
|
||||
load("@npm//peggy:index.bzl", "peggy")
|
||||
load("@build_bazel_rules_nodejs//:index.bzl", "js_library", "pkg_npm")
|
||||
load("//src/dev/bazel:index.bzl", "jsts_transpiler")
|
||||
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-es-query"
|
||||
PKG_REQUIRE_NAME = "@kbn/es-query"
|
||||
TYPES_PKG_REQUIRE_NAME = "@types/kbn__es-query"
|
||||
|
||||
SOURCE_FILES = glob(
|
||||
[
|
||||
|
@ -104,7 +105,7 @@ ts_project(
|
|||
js_library(
|
||||
name = PKG_BASE_NAME,
|
||||
srcs = NPM_MODULE_EXTRA_FILES + [":grammar"],
|
||||
deps = RUNTIME_DEPS + [":target_node", ":target_web", ":tsc_types"],
|
||||
deps = RUNTIME_DEPS + [":target_node", ":target_web"],
|
||||
package_name = PKG_REQUIRE_NAME,
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
@ -123,3 +124,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"],
|
||||
)
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
"name": "@kbn/es-query",
|
||||
"browser": "./target_web/index.js",
|
||||
"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
|
||||
|
|
|
@ -23,4 +23,5 @@ export const toElasticsearchQuery = (...params: Parameters<typeof astToElasticse
|
|||
export { KQLSyntaxError } from './kuery_syntax_error';
|
||||
export { nodeTypes, nodeBuilder } from './node_types';
|
||||
export { fromKueryExpression } from './ast';
|
||||
export type { DslQuery, KueryNode, KueryQueryOptions } from './types';
|
||||
export type { FunctionTypeBuildNode, NodeTypes } from './node_types';
|
||||
export type { DslQuery, KueryNode, KueryQueryOptions, KueryParseOptions } from './types';
|
||||
|
|
|
@ -10,9 +10,9 @@ import * as functionType from './function';
|
|||
import * as literal from './literal';
|
||||
import * as namedArg from './named_arg';
|
||||
import * as wildcard from './wildcard';
|
||||
import { NodeTypes } from './types';
|
||||
import { FunctionTypeBuildNode, NodeTypes } from './types';
|
||||
|
||||
export type { NodeTypes };
|
||||
export type { FunctionTypeBuildNode, NodeTypes };
|
||||
export { nodeBuilder } from './node_builder';
|
||||
|
||||
/**
|
||||
|
|
|
@ -34,7 +34,7 @@ RUNTIME_DEPS = [
|
|||
]
|
||||
|
||||
TYPES_DEPS = [
|
||||
"//packages/kbn-es-query",
|
||||
"//packages/kbn-es-query:npm_module_types",
|
||||
"@npm//@elastic/elasticsearch",
|
||||
"@npm//tslib",
|
||||
"@npm//utility-types",
|
||||
|
|
|
@ -45,7 +45,7 @@ RUNTIME_DEPS = [
|
|||
]
|
||||
|
||||
TYPES_DEPS = [
|
||||
"//packages/kbn-es-query",
|
||||
"//packages/kbn-es-query:npm_module_types",
|
||||
"//packages/kbn-i18n",
|
||||
"//packages/kbn-securitysolution-list-hooks",
|
||||
"//packages/kbn-securitysolution-list-utils",
|
||||
|
|
|
@ -38,11 +38,12 @@ RUNTIME_DEPS = [
|
|||
]
|
||||
|
||||
TYPES_DEPS = [
|
||||
"//packages/kbn-es-query",
|
||||
"//packages/kbn-i18n",
|
||||
"//packages/kbn-es-query:npm_module_types",
|
||||
"//packages/kbn-i18n:npm_module_types",
|
||||
"//packages/kbn-securitysolution-io-ts-list-types",
|
||||
"//packages/kbn-securitysolution-list-constants",
|
||||
"//packages/kbn-securitysolution-utils",
|
||||
"@npm//@elastic/elasticsearch",
|
||||
"@npm//@types/jest",
|
||||
"@npm//@types/lodash",
|
||||
"@npm//@types/node",
|
||||
|
|
|
@ -5849,6 +5849,10 @@
|
|||
version "0.0.0"
|
||||
uid ""
|
||||
|
||||
"@types/kbn__es-query@link:bazel-bin/packages/kbn-es-query/npm_module_types":
|
||||
version "0.0.0"
|
||||
uid ""
|
||||
|
||||
"@types/kbn__i18n-react@link:bazel-bin/packages/kbn-i18n-react/npm_module_types":
|
||||
version "0.0.0"
|
||||
uid ""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue