mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
* Move JSON utils to utils package * Imports from tests * delete * split package * docs * test * test * imports Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Liza Katz <lizka.k@gmail.com>
This commit is contained in:
parent
7a3915949c
commit
243b167d8a
64 changed files with 203 additions and 56 deletions
|
@ -10,6 +10,6 @@
|
|||
esKuery: {
|
||||
nodeTypes: import("../common/es_query/kuery/node_types").NodeTypes;
|
||||
fromKueryExpression: (expression: any, parseOptions?: Partial<import("../common").KueryParseOptions>) => import("../common").KueryNode;
|
||||
toElasticsearchQuery: (node: import("../common").KueryNode, indexPattern?: import("../common").IIndexPattern | undefined, config?: Record<string, any> | undefined, context?: Record<string, any> | undefined) => import("../../kibana_utils/common").JsonObject;
|
||||
toElasticsearchQuery: (node: import("../common").KueryNode, indexPattern?: import("../common").IIndexPattern | undefined, config?: Record<string, any> | undefined, context?: Record<string, any> | undefined) => import("@kbn/common-utils").JsonObject;
|
||||
}
|
||||
```
|
||||
|
|
|
@ -10,6 +10,6 @@
|
|||
esKuery: {
|
||||
nodeTypes: import("../common/es_query/kuery/node_types").NodeTypes;
|
||||
fromKueryExpression: (expression: any, parseOptions?: Partial<import("../common").KueryParseOptions>) => import("../common").KueryNode;
|
||||
toElasticsearchQuery: (node: import("../common").KueryNode, indexPattern?: import("../common").IIndexPattern | undefined, config?: Record<string, any> | undefined, context?: Record<string, any> | undefined) => import("../../kibana_utils/common").JsonObject;
|
||||
toElasticsearchQuery: (node: import("../common").KueryNode, indexPattern?: import("../common").IIndexPattern | undefined, config?: Record<string, any> | undefined, context?: Record<string, any> | undefined) => import("@kbn/common-utils").JsonObject;
|
||||
}
|
||||
```
|
||||
|
|
|
@ -153,6 +153,7 @@
|
|||
"@kbn/ui-framework": "link:packages/kbn-ui-framework",
|
||||
"@kbn/ui-shared-deps": "link:packages/kbn-ui-shared-deps",
|
||||
"@kbn/utility-types": "link:bazel-bin/packages/kbn-utility-types",
|
||||
"@kbn/common-utils": "link:bazel-bin/packages/kbn-common-utils",
|
||||
"@kbn/utils": "link:bazel-bin/packages/kbn-utils",
|
||||
"@loaders.gl/core": "^2.3.1",
|
||||
"@loaders.gl/json": "^2.3.1",
|
||||
|
|
|
@ -12,6 +12,7 @@ filegroup(
|
|||
"//packages/kbn-apm-utils:build",
|
||||
"//packages/kbn-babel-code-parser:build",
|
||||
"//packages/kbn-babel-preset:build",
|
||||
"//packages/kbn-common-utils:build",
|
||||
"//packages/kbn-config:build",
|
||||
"//packages/kbn-config-schema:build",
|
||||
"//packages/kbn-crypto:build",
|
||||
|
|
82
packages/kbn-common-utils/BUILD.bazel
Normal file
82
packages/kbn-common-utils/BUILD.bazel
Normal file
|
@ -0,0 +1,82 @@
|
|||
load("@npm//@bazel/typescript:index.bzl", "ts_config", "ts_project")
|
||||
load("@build_bazel_rules_nodejs//:index.bzl", "js_library", "pkg_npm")
|
||||
|
||||
PKG_BASE_NAME = "kbn-common-utils"
|
||||
PKG_REQUIRE_NAME = "@kbn/common-utils"
|
||||
|
||||
SOURCE_FILES = glob(
|
||||
[
|
||||
"src/**/*.ts",
|
||||
],
|
||||
exclude = ["**/*.test.*"],
|
||||
)
|
||||
|
||||
SRCS = SOURCE_FILES
|
||||
|
||||
filegroup(
|
||||
name = "srcs",
|
||||
srcs = SRCS,
|
||||
)
|
||||
|
||||
NPM_MODULE_EXTRA_FILES = [
|
||||
"package.json",
|
||||
"README.md"
|
||||
]
|
||||
|
||||
SRC_DEPS = [
|
||||
"//packages/kbn-config-schema",
|
||||
"@npm//load-json-file",
|
||||
"@npm//tslib",
|
||||
]
|
||||
|
||||
TYPES_DEPS = [
|
||||
"@npm//@types/jest",
|
||||
"@npm//@types/node",
|
||||
]
|
||||
|
||||
DEPS = SRC_DEPS + TYPES_DEPS
|
||||
|
||||
ts_config(
|
||||
name = "tsconfig",
|
||||
src = "tsconfig.json",
|
||||
deps = [
|
||||
"//:tsconfig.base.json",
|
||||
],
|
||||
)
|
||||
|
||||
ts_project(
|
||||
name = "tsc",
|
||||
args = ['--pretty'],
|
||||
srcs = SRCS,
|
||||
deps = DEPS,
|
||||
declaration = True,
|
||||
declaration_map = True,
|
||||
incremental = True,
|
||||
out_dir = "target",
|
||||
source_map = True,
|
||||
root_dir = "src",
|
||||
tsconfig = ":tsconfig",
|
||||
)
|
||||
|
||||
js_library(
|
||||
name = PKG_BASE_NAME,
|
||||
srcs = NPM_MODULE_EXTRA_FILES,
|
||||
deps = DEPS + [":tsc"],
|
||||
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"],
|
||||
)
|
3
packages/kbn-common-utils/README.md
Normal file
3
packages/kbn-common-utils/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
# @kbn/common-utils
|
||||
|
||||
Shared common (client and server sie) utilities shared across packages and plugins.
|
13
packages/kbn-common-utils/jest.config.js
Normal file
13
packages/kbn-common-utils/jest.config.js
Normal file
|
@ -0,0 +1,13 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
||||
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
||||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
module.exports = {
|
||||
preset: '@kbn/test',
|
||||
rootDir: '../..',
|
||||
roots: ['<rootDir>/packages/kbn-common-utils'],
|
||||
};
|
9
packages/kbn-common-utils/package.json
Normal file
9
packages/kbn-common-utils/package.json
Normal file
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"name": "@kbn/common-utils",
|
||||
"main": "./target/index.js",
|
||||
"browser": "./target/index.js",
|
||||
"types": "./target/index.d.ts",
|
||||
"version": "1.0.0",
|
||||
"license": "SSPL-1.0 OR Elastic License 2.0",
|
||||
"private": true
|
||||
}
|
9
packages/kbn-common-utils/src/index.ts
Normal file
9
packages/kbn-common-utils/src/index.ts
Normal file
|
@ -0,0 +1,9 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
||||
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
||||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
export * from './json';
|
9
packages/kbn-common-utils/src/json/index.ts
Normal file
9
packages/kbn-common-utils/src/json/index.ts
Normal file
|
@ -0,0 +1,9 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
||||
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
||||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
export { JsonArray, JsonValue, JsonObject } from './typed_json';
|
18
packages/kbn-common-utils/tsconfig.json
Normal file
18
packages/kbn-common-utils/tsconfig.json
Normal file
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"incremental": true,
|
||||
"outDir": "target",
|
||||
"declaration": true,
|
||||
"declarationMap": true,
|
||||
"sourceMap": true,
|
||||
"sourceRoot": "../../../../packages/kbn-common-utils/src",
|
||||
"types": [
|
||||
"jest",
|
||||
"node"
|
||||
]
|
||||
},
|
||||
"include": [
|
||||
"src/**/*"
|
||||
]
|
||||
}
|
|
@ -6,6 +6,7 @@
|
|||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
import { JsonObject } from '@kbn/common-utils';
|
||||
import { nodeTypes } from '../node_types/index';
|
||||
import { KQLSyntaxError } from '../kuery_syntax_error';
|
||||
import { KueryNode, DslQuery, KueryParseOptions } from '../types';
|
||||
|
@ -13,7 +14,6 @@ import { IIndexPattern } from '../../../index_patterns/types';
|
|||
|
||||
// @ts-ignore
|
||||
import { parse as parseKuery } from './_generated_/kuery';
|
||||
import { JsonObject } from '../../../../../kibana_utils/common';
|
||||
|
||||
const fromExpression = (
|
||||
expression: string | DslQuery,
|
||||
|
|
|
@ -7,10 +7,10 @@
|
|||
*/
|
||||
|
||||
import _ from 'lodash';
|
||||
import { JsonObject } from '@kbn/common-utils';
|
||||
import * as ast from '../ast';
|
||||
import { nodeTypes } from '../node_types';
|
||||
import { NamedArgTypeBuildNode } from './types';
|
||||
import { JsonObject } from '../../../../../kibana_utils/common';
|
||||
|
||||
export function buildNode(name: string, value: any): NamedArgTypeBuildNode {
|
||||
const argumentNode =
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
* WARNING: these typings are incomplete
|
||||
*/
|
||||
|
||||
import { JsonValue } from '@kbn/common-utils';
|
||||
import { IIndexPattern } from '../../../index_patterns';
|
||||
import { JsonValue } from '../../../../../kibana_utils/common';
|
||||
import { KueryNode } from '..';
|
||||
|
||||
export type FunctionName =
|
||||
|
|
|
@ -53,6 +53,7 @@ import { ISearchOptions as ISearchOptions_2 } from 'src/plugins/data/public';
|
|||
import { ISearchSource as ISearchSource_2 } from 'src/plugins/data/public';
|
||||
import { IStorageWrapper } from 'src/plugins/kibana_utils/public';
|
||||
import { IUiSettingsClient } from 'src/core/public';
|
||||
import { JsonValue } from '@kbn/common-utils';
|
||||
import { KibanaClient } from '@elastic/elasticsearch/api/kibana';
|
||||
import { Location } from 'history';
|
||||
import { LocationDescriptorObject } from 'history';
|
||||
|
@ -856,7 +857,7 @@ export const esFilters: {
|
|||
export const esKuery: {
|
||||
nodeTypes: import("../common/es_query/kuery/node_types").NodeTypes;
|
||||
fromKueryExpression: (expression: any, parseOptions?: Partial<import("../common").KueryParseOptions>) => import("../common").KueryNode;
|
||||
toElasticsearchQuery: (node: import("../common").KueryNode, indexPattern?: import("../common").IIndexPattern | undefined, config?: Record<string, any> | undefined, context?: Record<string, any> | undefined) => import("../../kibana_utils/common").JsonObject;
|
||||
toElasticsearchQuery: (node: import("../common").KueryNode, indexPattern?: import("../common").IIndexPattern | undefined, config?: Record<string, any> | undefined, context?: Record<string, any> | undefined) => import("@kbn/common-utils").JsonObject;
|
||||
};
|
||||
|
||||
// Warning: (ae-missing-release-tag) "esQuery" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
|
|
|
@ -38,6 +38,7 @@ import { ISearchOptions as ISearchOptions_2 } from 'src/plugins/data/public';
|
|||
import { ISearchSource } from 'src/plugins/data/public';
|
||||
import { IUiSettingsClient } from 'src/core/server';
|
||||
import { IUiSettingsClient as IUiSettingsClient_3 } from 'kibana/server';
|
||||
import { JsonValue } from '@kbn/common-utils';
|
||||
import { KibanaRequest } from 'src/core/server';
|
||||
import { KibanaRequest as KibanaRequest_2 } from 'kibana/server';
|
||||
import { Logger } from 'src/core/server';
|
||||
|
@ -460,7 +461,7 @@ export const esFilters: {
|
|||
export const esKuery: {
|
||||
nodeTypes: import("../common/es_query/kuery/node_types").NodeTypes;
|
||||
fromKueryExpression: (expression: any, parseOptions?: Partial<import("../common").KueryParseOptions>) => import("../common").KueryNode;
|
||||
toElasticsearchQuery: (node: import("../common").KueryNode, indexPattern?: import("../common").IIndexPattern | undefined, config?: Record<string, any> | undefined, context?: Record<string, any> | undefined) => import("../../kibana_utils/common").JsonObject;
|
||||
toElasticsearchQuery: (node: import("../common").KueryNode, indexPattern?: import("../common").IIndexPattern | undefined, config?: Record<string, any> | undefined, context?: Record<string, any> | undefined) => import("@kbn/common-utils").JsonObject;
|
||||
};
|
||||
|
||||
// Warning: (ae-missing-release-tag) "esQuery" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
|
|
|
@ -11,7 +11,6 @@ export * from './field_wildcard';
|
|||
export * from './of';
|
||||
export * from './ui';
|
||||
export * from './state_containers';
|
||||
export * from './typed_json';
|
||||
export * from './errors';
|
||||
export { AbortError, abortSignalToPromise } from './abort_utils';
|
||||
export { createGetterSetter, Get, Set } from './create_getter_setter';
|
||||
|
|
|
@ -15,9 +15,6 @@ export {
|
|||
fieldWildcardFilter,
|
||||
fieldWildcardMatcher,
|
||||
Get,
|
||||
JsonArray,
|
||||
JsonObject,
|
||||
JsonValue,
|
||||
of,
|
||||
Set,
|
||||
UiComponent,
|
||||
|
|
|
@ -5,8 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { JsonObject } from '../../../../src/plugins/kibana_utils/common';
|
||||
|
||||
import { JsonObject } from '@kbn/common-utils';
|
||||
export interface AlertUrlNavigation {
|
||||
path: string;
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { JsonObject } from '../../../../../src/plugins/kibana_utils/common';
|
||||
import { JsonObject } from '@kbn/common-utils';
|
||||
import { SanitizedAlert } from '../../common';
|
||||
|
||||
/**
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
import Boom from '@hapi/boom';
|
||||
import { map, mapValues, fromPairs, has } from 'lodash';
|
||||
import { KibanaRequest } from 'src/core/server';
|
||||
import { JsonObject } from '@kbn/common-utils';
|
||||
import { AlertTypeRegistry } from '../types';
|
||||
import { SecurityPluginSetup } from '../../../security/server';
|
||||
import { RegistryAlertType } from '../alert_type_registry';
|
||||
|
@ -19,7 +20,6 @@ import {
|
|||
AlertingAuthorizationFilterOpts,
|
||||
} from './alerting_authorization_kuery';
|
||||
import { KueryNode } from '../../../../../src/plugins/data/server';
|
||||
import { JsonObject } from '../../../../../src/plugins/kibana_utils/common';
|
||||
|
||||
export enum AlertingAuthorizationEntity {
|
||||
Rule = 'rule',
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import { remove } from 'lodash';
|
||||
import { JsonObject } from '../../../../../src/plugins/kibana_utils/common';
|
||||
import { JsonObject } from '@kbn/common-utils';
|
||||
import { nodeBuilder, EsQueryConfig } from '../../../../../src/plugins/data/common';
|
||||
import { toElasticsearchQuery } from '../../../../../src/plugins/data/common/es_query';
|
||||
import { KueryNode } from '../../../../../src/plugins/data/server';
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
import { JsonValue } from '../../../../../../src/plugins/kibana_utils/common';
|
||||
import { JsonValue } from '@kbn/common-utils';
|
||||
|
||||
type RenameAlertToRule<K extends string> = K extends `alertTypeId`
|
||||
? `ruleTypeId`
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { JsonObject } from '@kbn/common-utils';
|
||||
import { FontawesomeIcon } from '../helpers/style_choices';
|
||||
import { WorkspaceField, AdvancedSettings } from './app_state';
|
||||
import { JsonObject } from '../../../../../src/plugins/kibana_utils/public';
|
||||
|
||||
export interface WorkspaceNode {
|
||||
x: number;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import * as rt from 'io-ts';
|
||||
import { JsonArray, JsonObject, JsonValue } from '../../../../src/plugins/kibana_utils/common';
|
||||
import { JsonArray, JsonObject, JsonValue } from '@kbn/common-utils';
|
||||
|
||||
export { JsonArray, JsonObject, JsonValue };
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
import React, { useMemo, useCallback, useEffect } from 'react';
|
||||
import { noop } from 'lodash';
|
||||
import { JsonValue } from '@kbn/common-utils';
|
||||
import { DataPublicPluginStart, esQuery, Filter } from '../../../../../../src/plugins/data/public';
|
||||
import { euiStyled } from '../../../../../../src/plugins/kibana_react/common';
|
||||
import { LogEntryCursor } from '../../../common/log_entry';
|
||||
|
@ -17,7 +18,6 @@ import { BuiltEsQuery, useLogStream } from '../../containers/logs/log_stream';
|
|||
|
||||
import { ScrollableLogTextStreamView } from '../logging/log_text_stream';
|
||||
import { LogColumnRenderConfiguration } from '../../utils/log_column_render_configuration';
|
||||
import { JsonValue } from '../../../../../../src/plugins/kibana_utils/common';
|
||||
import { Query } from '../../../../../../src/plugins/data/common';
|
||||
import { LogStreamErrorBoundary } from './log_stream_error_boundary';
|
||||
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
|
||||
import stringify from 'json-stable-stringify';
|
||||
import React from 'react';
|
||||
import { JsonArray, JsonValue } from '@kbn/common-utils';
|
||||
import { euiStyled } from '../../../../../../../src/plugins/kibana_react/common';
|
||||
import { JsonArray, JsonValue } from '../../../../../../../src/plugins/kibana_utils/common';
|
||||
import { ActiveHighlightMarker, highlightFieldValue, HighlightMarker } from './highlighting';
|
||||
|
||||
export const FieldValue: React.FC<{
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { JsonValue } from '../../../../../../../src/plugins/kibana_utils/common';
|
||||
import { JsonValue } from '@kbn/common-utils';
|
||||
import { euiStyled } from '../../../../../../../src/plugins/kibana_react/common';
|
||||
import { LogColumn } from '../../../../common/log_entry';
|
||||
import { isFieldColumn, isHighlightFieldColumn } from '../../../utils/log_entry';
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import { ReactNode } from 'react';
|
||||
import { JsonValue } from '../../../../../src/plugins/kibana_utils/common';
|
||||
import { JsonValue } from '@kbn/common-utils';
|
||||
|
||||
/**
|
||||
* Interface for common configuration properties, regardless of the column type.
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
import { GenericParams, SearchResponse } from 'elasticsearch';
|
||||
import { Lifecycle } from '@hapi/hapi';
|
||||
import { UsageCollectionSetup } from 'src/plugins/usage_collection/server';
|
||||
import { JsonArray, JsonValue } from '@kbn/common-utils';
|
||||
import { RouteConfig, RouteMethod } from '../../../../../../../src/core/server';
|
||||
import {
|
||||
PluginSetup as DataPluginSetup,
|
||||
|
@ -19,7 +20,6 @@ import { PluginSetupContract as FeaturesPluginSetup } from '../../../../../../pl
|
|||
import { SpacesPluginSetup } from '../../../../../../plugins/spaces/server';
|
||||
import { PluginSetupContract as AlertingPluginContract } from '../../../../../alerting/server';
|
||||
import { MlPluginSetup } from '../../../../../ml/server';
|
||||
import { JsonArray, JsonValue } from '../../../../../../../src/plugins/kibana_utils/common';
|
||||
|
||||
export interface InfraServerPluginSetupDeps {
|
||||
data: DataPluginSetup;
|
||||
|
|
|
@ -11,7 +11,7 @@ import { constant, identity } from 'fp-ts/lib/function';
|
|||
import { pipe } from 'fp-ts/lib/pipeable';
|
||||
import * as runtimeTypes from 'io-ts';
|
||||
import { compact } from 'lodash';
|
||||
import { JsonArray } from '../../../../../../../src/plugins/kibana_utils/common';
|
||||
import { JsonArray } from '@kbn/common-utils';
|
||||
import type { InfraPluginRequestHandlerContext } from '../../../types';
|
||||
import {
|
||||
LogEntriesAdapter,
|
||||
|
|
|
@ -6,7 +6,8 @@
|
|||
*/
|
||||
|
||||
import type { estypes } from '@elastic/elasticsearch';
|
||||
import { JsonObject } from '../../../../../../../src/plugins/kibana_utils/common';
|
||||
import { JsonObject } from '@kbn/common-utils';
|
||||
|
||||
import type { InfraPluginRequestHandlerContext } from '../../../types';
|
||||
|
||||
import {
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { JsonObject } from '../../../../../../../src/plugins/kibana_utils/common';
|
||||
import { JsonObject } from '@kbn/common-utils';
|
||||
import {
|
||||
InventoryItemType,
|
||||
MetricsUIAggregation,
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { JsonArray, JsonValue } from '@kbn/common-utils';
|
||||
import { LogMessagePart } from '../../../../common/log_entry';
|
||||
import { JsonArray, JsonValue } from '../../../../../../../src/plugins/kibana_utils/common';
|
||||
import {
|
||||
LogMessageFormattingCondition,
|
||||
LogMessageFormattingFieldValueConditionValue,
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { JsonValue } from '../../../../../../../src/plugins/kibana_utils/common';
|
||||
import { JsonValue } from '@kbn/common-utils';
|
||||
|
||||
export interface LogMessageFormattingRule {
|
||||
when: LogMessageFormattingCondition;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { JsonObject } from '../../../../../src/plugins/kibana_utils/common';
|
||||
import { JsonObject } from '@kbn/common-utils';
|
||||
|
||||
export const parseFilterQuery = (
|
||||
filterQuery: string | null | undefined
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
import * as rt from 'io-ts';
|
||||
import stringify from 'json-stable-stringify';
|
||||
import { JsonValue } from '../../../../../src/plugins/kibana_utils/common';
|
||||
import { JsonValue } from '@kbn/common-utils';
|
||||
import { jsonValueRT } from '../../common/typed_json';
|
||||
import { SearchStrategyError } from '../../common/search_strategies/common/errors';
|
||||
import { ShardFailure } from './elasticsearch_runtime_types';
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
|
||||
import { estypes } from '@elastic/elasticsearch';
|
||||
|
||||
import { JsonObject } from '@kbn/common-utils';
|
||||
import { buildEsQuery } from '../../../../../src/plugins/data/common/es_query/es_query';
|
||||
import type { DslQuery } from '../../../../../src/plugins/data/common/es_query/kuery';
|
||||
import type { JsonObject } from '../../../../../src/plugins/kibana_utils/common';
|
||||
|
||||
import { isPopulatedObject } from '../util/object_utils';
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
import { DslQuery, Filter } from 'src/plugins/data/common';
|
||||
|
||||
import { JsonObject } from '../../../../src/plugins/kibana_utils/common';
|
||||
import { JsonObject } from '@kbn/common-utils';
|
||||
|
||||
export type ESQuery =
|
||||
| ESRangeQuery
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
import { DslQuery, Filter } from 'src/plugins/data/common';
|
||||
|
||||
import { JsonObject } from '../../../../src/plugins/kibana_utils/common';
|
||||
import { JsonObject } from '@kbn/common-utils';
|
||||
|
||||
export type ESQuery =
|
||||
| ESRangeQuery
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
import { isEmpty, isString, flow } from 'lodash/fp';
|
||||
|
||||
import { JsonObject } from '@kbn/common-utils';
|
||||
import {
|
||||
EsQueryConfig,
|
||||
Query,
|
||||
|
@ -15,7 +16,6 @@ import {
|
|||
esKuery,
|
||||
IIndexPattern,
|
||||
} from '../../../../../../../src/plugins/data/public';
|
||||
import { JsonObject } from '../../../../../../../src/plugins/kibana_utils/public';
|
||||
|
||||
export const convertKueryToElasticSearchQuery = (
|
||||
kueryExpression: string,
|
||||
|
|
|
@ -6,10 +6,10 @@
|
|||
*/
|
||||
|
||||
import type { IScopedClusterClient } from 'kibana/server';
|
||||
import { JsonObject } from '@kbn/common-utils';
|
||||
import { parseFilterQuery } from '../../../../utils/serialized_query';
|
||||
import { SafeResolverEvent } from '../../../../../common/endpoint/types';
|
||||
import { PaginationBuilder } from '../utils/pagination';
|
||||
import { JsonObject } from '../../../../../../../../src/plugins/kibana_utils/common';
|
||||
|
||||
interface TimeRange {
|
||||
from: string;
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
|
||||
import type { ApiResponse, estypes } from '@elastic/elasticsearch';
|
||||
import { IScopedClusterClient } from 'src/core/server';
|
||||
import { JsonObject, JsonValue } from '@kbn/common-utils';
|
||||
import { FieldsObject, ResolverSchema } from '../../../../../../common/endpoint/types';
|
||||
import { JsonObject, JsonValue } from '../../../../../../../../../src/plugins/kibana_utils/common';
|
||||
import { NodeID, TimeRange, docValueFields, validIDs } from '../utils/index';
|
||||
|
||||
interface DescendantsParams {
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
*/
|
||||
|
||||
import { IScopedClusterClient } from 'src/core/server';
|
||||
import { JsonObject, JsonValue } from '@kbn/common-utils';
|
||||
import { FieldsObject, ResolverSchema } from '../../../../../../common/endpoint/types';
|
||||
import { JsonObject, JsonValue } from '../../../../../../../../../src/plugins/kibana_utils/common';
|
||||
import { NodeID, TimeRange, docValueFields, validIDs } from '../utils/index';
|
||||
|
||||
interface LifecycleParams {
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import { IScopedClusterClient } from 'src/core/server';
|
||||
import { JsonObject } from '../../../../../../../../../src/plugins/kibana_utils/common';
|
||||
import { JsonObject } from '@kbn/common-utils';
|
||||
import { EventStats, ResolverSchema } from '../../../../../../common/endpoint/types';
|
||||
import { NodeID, TimeRange } from '../utils/index';
|
||||
|
||||
|
|
|
@ -5,12 +5,12 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { JsonObject } from '@kbn/common-utils';
|
||||
import { SafeResolverEvent } from '../../../../../common/endpoint/types';
|
||||
import {
|
||||
eventIDSafeVersion,
|
||||
timestampSafeVersion,
|
||||
} from '../../../../../common/endpoint/models/event';
|
||||
import { JsonObject } from '../../../../../../../../src/plugins/kibana_utils/common';
|
||||
|
||||
type SearchAfterFields = [number, string];
|
||||
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
import { LoggerFactory } from 'kibana/server';
|
||||
|
||||
import { SearchResponse } from '@elastic/elasticsearch/api/types';
|
||||
import { JsonObject } from '@kbn/common-utils';
|
||||
import { ConfigType } from '../config';
|
||||
import { EndpointAppContextService } from './endpoint_app_context_services';
|
||||
import { JsonObject } from '../../../../../src/plugins/kibana_utils/common';
|
||||
import { HostMetadata, MetadataQueryStrategyVersions } from '../../common/endpoint/types';
|
||||
import { ExperimentalFeatures } from '../../common/experimental_features';
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
import { isEmpty, isPlainObject, isString } from 'lodash/fp';
|
||||
|
||||
import { JsonObject } from '../../../../../src/plugins/kibana_utils/common';
|
||||
import { JsonObject } from '@kbn/common-utils';
|
||||
|
||||
export const parseFilterQuery = (filterQuery: string): JsonObject => {
|
||||
try {
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
import { mapValues } from 'lodash';
|
||||
import stats from 'stats-lite';
|
||||
import { JsonObject } from 'src/plugins/kibana_utils/common';
|
||||
import { JsonObject } from '@kbn/common-utils';
|
||||
import { RawMonitoringStats, RawMonitoredStat, HealthStatus } from './monitoring_stats_stream';
|
||||
import { AveragedStat } from './task_run_calcultors';
|
||||
import { TaskPersistenceTypes } from './task_run_statistics';
|
||||
|
|
|
@ -9,7 +9,7 @@ import { TaskManagerConfig } from '../config';
|
|||
import { of, Subject } from 'rxjs';
|
||||
import { take, bufferCount } from 'rxjs/operators';
|
||||
import { createMonitoringStatsStream, AggregatedStat } from './monitoring_stats_stream';
|
||||
import { JsonValue } from 'src/plugins/kibana_utils/common';
|
||||
import { JsonValue } from '@kbn/common-utils';
|
||||
|
||||
beforeEach(() => {
|
||||
jest.resetAllMocks();
|
||||
|
|
|
@ -9,7 +9,7 @@ import { merge, of, Observable } from 'rxjs';
|
|||
import { map, scan } from 'rxjs/operators';
|
||||
import { set } from '@elastic/safer-lodash-set';
|
||||
import { Logger } from 'src/core/server';
|
||||
import { JsonObject } from 'src/plugins/kibana_utils/common';
|
||||
import { JsonObject } from '@kbn/common-utils';
|
||||
import { TaskStore } from '../task_store';
|
||||
import { TaskPollingLifecycle } from '../polling_lifecycle';
|
||||
import {
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import { Observable } from 'rxjs';
|
||||
import { JsonValue } from 'src/plugins/kibana_utils/common';
|
||||
import { JsonValue } from '@kbn/common-utils';
|
||||
|
||||
export interface AggregatedStat<Stat = JsonValue> {
|
||||
key: string;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import stats from 'stats-lite';
|
||||
import { JsonObject } from 'src/plugins/kibana_utils/common';
|
||||
import { JsonObject } from '@kbn/common-utils';
|
||||
import { isUndefined, countBy, mapValues } from 'lodash';
|
||||
|
||||
export interface AveragedStat extends JsonObject {
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
import { combineLatest, Observable } from 'rxjs';
|
||||
import { filter, startWith, map } from 'rxjs/operators';
|
||||
import { JsonObject, JsonValue } from 'src/plugins/kibana_utils/common';
|
||||
import { JsonObject, JsonValue } from '@kbn/common-utils';
|
||||
import { isNumber, mapValues } from 'lodash';
|
||||
import { AggregatedStatProvider, AggregatedStat } from './runtime_statistics_aggregator';
|
||||
import { TaskLifecycleEvent } from '../polling_lifecycle';
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
import { combineLatest, Observable, timer } from 'rxjs';
|
||||
import { mergeMap, map, filter, switchMap, catchError } from 'rxjs/operators';
|
||||
import { Logger } from 'src/core/server';
|
||||
import { JsonObject } from 'src/plugins/kibana_utils/common';
|
||||
import { JsonObject } from '@kbn/common-utils';
|
||||
import { keyBy, mapValues } from 'lodash';
|
||||
import { estypes } from '@elastic/elasticsearch';
|
||||
import { AggregatedStatProvider } from './runtime_statistics_aggregator';
|
||||
|
|
|
@ -16,7 +16,7 @@ import { Observable, Subject } from 'rxjs';
|
|||
import { tap, map } from 'rxjs/operators';
|
||||
import { throttleTime } from 'rxjs/operators';
|
||||
import { isString } from 'lodash';
|
||||
import { JsonValue } from 'src/plugins/kibana_utils/common';
|
||||
import { JsonValue } from '@kbn/common-utils';
|
||||
import { Logger, ServiceStatus, ServiceStatusLevels } from '../../../../../src/core/server';
|
||||
import {
|
||||
MonitoringStats,
|
||||
|
|
|
@ -8,10 +8,10 @@
|
|||
import { schema } from '@kbn/config-schema';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import Mustache from 'mustache';
|
||||
import { JsonObject } from '@kbn/common-utils';
|
||||
import { ActionGroupIdsOf } from '../../../../alerting/common';
|
||||
import { UptimeAlertTypeFactory } from './types';
|
||||
import { esKuery } from '../../../../../../src/plugins/data/server';
|
||||
import { JsonObject } from '../../../../../../src/plugins/kibana_utils/common';
|
||||
import {
|
||||
StatusCheckFilters,
|
||||
Ping,
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { JsonObject } from 'src/plugins/kibana_utils/public';
|
||||
import { JsonObject } from '@kbn/common-utils';
|
||||
import { QueryDslQueryContainer } from '@elastic/elasticsearch/api/types';
|
||||
import { asMutableArray } from '../../../common/utils/as_mutable_array';
|
||||
import { UMElasticsearchQueryFn } from '../adapters';
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
import expect from '@kbn/expect';
|
||||
import { merge, cloneDeep, isPlainObject } from 'lodash';
|
||||
import { JsonObject } from 'src/plugins/kibana_utils/common';
|
||||
import { JsonObject } from '@kbn/common-utils';
|
||||
import { FtrProviderContext } from '../../common/ftr_provider_context';
|
||||
import { registry } from '../../common/registry';
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import expect from '@kbn/expect';
|
||||
import { JsonObject } from 'src/plugins/kibana_utils/common';
|
||||
import { JsonObject } from '@kbn/common-utils';
|
||||
import { FtrProviderContext } from '../../common/ftr_provider_context';
|
||||
|
||||
// eslint-disable-next-line import/no-default-export
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import expect from '@kbn/expect';
|
||||
import { JsonObject } from 'src/plugins/kibana_utils/common';
|
||||
import { JsonObject } from '@kbn/common-utils';
|
||||
import { Annotation } from '../../../../plugins/observability/common/annotations';
|
||||
import { FtrProviderContext } from '../../common/ftr_provider_context';
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import expect from '@kbn/expect';
|
||||
import { JsonObject } from 'src/plugins/kibana_utils/common';
|
||||
import { JsonObject } from '@kbn/common-utils';
|
||||
import { eventsIndexPattern } from '../../../../plugins/security_solution/common/endpoint/constants';
|
||||
import {
|
||||
eventIDSafeVersion,
|
||||
|
|
|
@ -2620,6 +2620,10 @@
|
|||
version "0.0.0"
|
||||
uid ""
|
||||
|
||||
"@kbn/common-utils@link:bazel-bin/packages/kbn-common-utils":
|
||||
version "0.0.0"
|
||||
uid ""
|
||||
|
||||
"@kbn/config-schema@link:bazel-bin/packages/kbn-config-schema":
|
||||
version "0.0.0"
|
||||
uid ""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue