Skip to content

Commit

Permalink
Merge branch 'master' of github.com:elastic/kibana into breaking/remo…
Browse files Browse the repository at this point in the history
…veDashboardOnlyMode
  • Loading branch information
ThomThomson committed Aug 20, 2021
2 parents 637a527 + ff17140 commit a0963aa
Show file tree
Hide file tree
Showing 624 changed files with 6,199 additions and 6,082 deletions.
6 changes: 3 additions & 3 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
/src/plugins/vis_type_timelion/ @elastic/kibana-app
/src/plugins/vis_type_timeseries/ @elastic/kibana-app
/src/plugins/vis_type_vega/ @elastic/kibana-app
/src/plugins/vis_type_vislib/ @elastic/kibana-app
/src/plugins/vis_type_xy/ @elastic/kibana-app
/src/plugins/vis_type_pie/ @elastic/kibana-app
/src/plugins/vis_types/vislib/ @elastic/kibana-app
/src/plugins/vis_types/xy/ @elastic/kibana-app
/src/plugins/vis_types/pie/ @elastic/kibana-app
/src/plugins/visualize/ @elastic/kibana-app
/src/plugins/visualizations/ @elastic/kibana-app
/src/plugins/url_forwarding/ @elastic/kibana-app
Expand Down
6 changes: 3 additions & 3 deletions .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@
"visTypeTagCloud": "src/plugins/vis_type_tagcloud",
"visTypeTimeseries": "src/plugins/vis_type_timeseries",
"visTypeVega": "src/plugins/vis_type_vega",
"visTypeVislib": "src/plugins/vis_type_vislib",
"visTypeXy": "src/plugins/vis_type_xy",
"visTypePie": "src/plugins/vis_type_pie",
"visTypeVislib": "src/plugins/vis_types/vislib",
"visTypeXy": "src/plugins/vis_types/xy",
"visTypePie": "src/plugins/vis_types/pie",
"visualizations": "src/plugins/visualizations",
"visualize": "src/plugins/visualize",
"apmOss": "src/plugins/apm_oss",
Expand Down
6 changes: 3 additions & 3 deletions docs/developer/plugin-list.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ The plugin exposes the static DefaultEditorController class to consume.
|WARNING: Missing README.
|{kib-repo}blob/{branch}/src/plugins/vis_type_pie[visTypePie]
|{kib-repo}blob/{branch}/src/plugins/vis_types/pie[visTypePie]
|WARNING: Missing README.
Expand All @@ -314,11 +314,11 @@ The plugin exposes the static DefaultEditorController class to consume.
|WARNING: Missing README.
|{kib-repo}blob/{branch}/src/plugins/vis_type_vislib[visTypeVislib]
|{kib-repo}blob/{branch}/src/plugins/vis_types/vislib[visTypeVislib]
|WARNING: Missing README.
|{kib-repo}blob/{branch}/src/plugins/vis_type_xy[visTypeXy]
|{kib-repo}blob/{branch}/src/plugins/vis_types/xy[visTypeXy]
|WARNING: Missing README.
Expand Down
1 change: 1 addition & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ module.exports = {
'<rootDir>/packages/*/jest.config.js',
'<rootDir>/src/*/jest.config.js',
'<rootDir>/src/plugins/*/jest.config.js',
'<rootDir>/src/plugins/vis_types/*/jest.config.js',
'<rootDir>/test/*/jest.config.js',
'<rootDir>/x-pack/plugins/*/jest.config.js',
],
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-config/src/config_service.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { mockApplyDeprecations, mockedChangedPaths } from './config_service.test
import { rawConfigServiceMock } from './raw/raw_config_service.mock';

import { schema } from '@kbn/config-schema';
import { MockedLogger, loggerMock } from '@kbn/logging/target/mocks';
import { MockedLogger, loggerMock } from '@kbn/logging/mocks';

import { ConfigService, Env, RawPackageInfo } from '.';

Expand Down
3 changes: 3 additions & 0 deletions packages/kbn-interpreter/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["@kbn/babel-preset/node_preset"]
}
18 changes: 12 additions & 6 deletions packages/kbn-interpreter/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
load("@npm//@bazel/typescript:index.bzl", "ts_config", "ts_project")
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")

PKG_BASE_NAME = "kbn-interpreter"
PKG_REQUIRE_NAME = "@kbn/interpreter"
Expand All @@ -25,7 +26,7 @@ NPM_MODULE_EXTRA_FILES = [
"package.json",
]

SRC_DEPS = [
RUNTIME_DEPS = [
"@npm//lodash",
]

Expand All @@ -35,7 +36,11 @@ TYPES_DEPS = [
"@npm//@types/node",
]

DEPS = SRC_DEPS + TYPES_DEPS
jsts_transpiler(
name = "target_node",
srcs = SRCS,
build_pkg_name = package_name(),
)

peggy(
name = "grammar",
Expand All @@ -62,14 +67,15 @@ ts_config(
)

ts_project(
name = "tsc",
name = "tsc_types",
args = ['--pretty'],
srcs = SRCS,
deps = DEPS,
deps = TYPES_DEPS,
allow_js = True,
declaration = True,
declaration_map = True,
out_dir = "target",
emit_declaration_only = True,
out_dir = "target_types",
source_map = True,
root_dir = "src",
tsconfig = ":tsconfig",
Expand All @@ -78,7 +84,7 @@ ts_project(
js_library(
name = PKG_BASE_NAME,
srcs = NPM_MODULE_EXTRA_FILES + [":grammar"],
deps = DEPS + [":tsc"],
deps = RUNTIME_DEPS + [":target_node", ":tsc_types"],
package_name = PKG_REQUIRE_NAME,
visibility = ["//visibility:public"],
)
Expand Down
4 changes: 2 additions & 2 deletions packages/kbn-interpreter/common/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"private": true,
"main": "../target/common/index.js",
"types": "../target/common/index.d.ts"
"main": "../target_node/common/index.js",
"types": "../target_types/common/index.d.ts"
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Side Public License, v 1.
*/

import { fromExpression } from '@kbn/interpreter/target/common/lib/ast';
import { fromExpression } from '@kbn/interpreter/common';
import { getType } from './get_type';

describe('ast fromExpression', () => {
Expand Down
3 changes: 2 additions & 1 deletion packages/kbn-interpreter/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
"extends": "../../tsconfig.bazel.json",
"compilerOptions": {
"allowJs": true,
"outDir": "./target/types",
"declaration": true,
"declarationMap": true,
"emitDeclarationOnly": true,
"outDir": "./target_types",
"rootDir": "src",
"sourceMap": true,
"sourceRoot": "../../../../packages/kbn-interpreter/src",
Expand Down
3 changes: 3 additions & 0 deletions packages/kbn-logging/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["@kbn/babel-preset/node_preset"]
}
20 changes: 14 additions & 6 deletions packages/kbn-logging/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
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")

PKG_BASE_NAME = "kbn-logging"
PKG_REQUIRE_NAME = "@kbn/logging"
Expand All @@ -21,20 +22,26 @@ filegroup(
)

NPM_MODULE_EXTRA_FILES = [
"mocks/package.json",
"package.json",
"README.md"
]

SRC_DEPS = [
RUNTIME_DEPS = [
"//packages/kbn-std"
]

TYPES_DEPS = [
"//packages/kbn-std",
"@npm//@types/jest",
"@npm//@types/node",
]

DEPS = SRC_DEPS + TYPES_DEPS
jsts_transpiler(
name = "target_node",
srcs = SRCS,
build_pkg_name = package_name(),
)

ts_config(
name = "tsconfig",
Expand All @@ -46,13 +53,14 @@ ts_config(
)

ts_project(
name = "tsc",
name = "tsc_types",
args = ['--pretty'],
srcs = SRCS,
deps = DEPS,
deps = TYPES_DEPS,
declaration = True,
declaration_map = True,
out_dir = "target",
emit_declaration_only = True,
out_dir = "target_types",
source_map = True,
root_dir = "src",
tsconfig = ":tsconfig",
Expand All @@ -61,7 +69,7 @@ ts_project(
js_library(
name = PKG_BASE_NAME,
srcs = NPM_MODULE_EXTRA_FILES,
deps = DEPS + [":tsc"],
deps = RUNTIME_DEPS + [":target_node", ":tsc_types"],
package_name = PKG_REQUIRE_NAME,
visibility = ["//visibility:public"],
)
Expand Down
5 changes: 5 additions & 0 deletions packages/kbn-logging/mocks/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"private": true,
"main": "../target_node/mocks/index.js",
"types": "../target_types/mocks/index.d.ts"
}
4 changes: 2 additions & 2 deletions packages/kbn-logging/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"version": "1.0.0",
"private": true,
"license": "SSPL-1.0 OR Elastic License 2.0",
"main": "./target/index.js",
"types": "./target/index.d.ts"
"main": "./target_node/index.js",
"types": "./target_types/index.d.ts"
}
5 changes: 3 additions & 2 deletions packages/kbn-logging/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"extends": "../../tsconfig.bazel.json",
"compilerOptions": {
"outDir": "target",
"stripInternal": false,
"declaration": true,
"declarationMap": true,
"emitDeclarationOnly": true,
"outDir": "target_types",
"rootDir": "src",
"sourceMap": true,
"sourceRoot": "../../../../packages/kbn-logging/src",
"stripInternal": false,
"types": [
"jest",
"node"
Expand Down
2 changes: 1 addition & 1 deletion src/core/server/http/integration_tests/router.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { loggingSystemMock } from '../../logging/logging_system.mock';
import { createHttpServer } from '../test_utils';
import { HttpService } from '../http_service';
import { Router } from '../router';
import { loggerMock } from '@kbn/logging/target/mocks';
import { loggerMock } from '@kbn/logging/mocks';

let server: HttpService;
let logger: ReturnType<typeof loggingSystemMock.create>;
Expand Down
4 changes: 2 additions & 2 deletions src/core/server/logging/logger.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
* Side Public License, v 1.
*/

export { loggerMock } from '@kbn/logging/target/mocks';
export type { MockedLogger } from '@kbn/logging/target/mocks';
export { loggerMock } from '@kbn/logging/mocks';
export type { MockedLogger } from '@kbn/logging/mocks';
2 changes: 1 addition & 1 deletion src/core/server/metrics/collectors/cgroup.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/

import mockFs from 'mock-fs';
import { loggerMock } from '@kbn/logging/target/mocks';
import { loggerMock } from '@kbn/logging/mocks';
import { OsCgroupMetricsCollector } from './cgroup';

describe('OsCgroupMetricsCollector', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/core/server/metrics/collectors/os.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

jest.mock('getos', () => (cb: Function) => cb(null, { dist: 'distrib', release: 'release' }));

import { loggerMock } from '@kbn/logging/target/mocks';
import { loggerMock } from '@kbn/logging/mocks';
import os from 'os';
import { cgroupCollectorMock } from './os.test.mocks';
import { OsMetricsCollector } from './os';
Expand Down
2 changes: 1 addition & 1 deletion src/core/server/metrics/ops_metrics_collector.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Side Public License, v 1.
*/

import { loggerMock } from '@kbn/logging/target/mocks';
import { loggerMock } from '@kbn/logging/mocks';
import {
mockOsCollector,
mockProcessCollector,
Expand Down
1 change: 1 addition & 0 deletions src/dev/typescript/projects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ export const PROJECTS = [

...findProjects('packages/*/tsconfig.json'),
...findProjects('src/plugins/*/tsconfig.json'),
...findProjects('src/plugins/vis_types/*/tsconfig.json'),
...findProjects('x-pack/plugins/*/tsconfig.json'),
...findProjects('examples/*/tsconfig.json'),
...findProjects('x-pack/examples/*/tsconfig.json'),
Expand Down
Loading

0 comments on commit a0963aa

Please sign in to comment.