From ab0375f56fb9af1548631bf07e7c3fc4c06dc012 Mon Sep 17 00:00:00 2001 From: Gerard Soldevila Date: Mon, 18 Nov 2024 14:34:54 +0100 Subject: [PATCH] Kibana Sustainable Architecture: Expose `StatusResponse` in core-status-common (#200524) ## Summary - Exposes the interfaces that define the format of the response of the `/api/status` endpoint. - Moves them from `@kbn/core-status-common-internal` to `@kbn/core-status-common`. - Removes the former package, as it no longer contains anything. - Fixes some of the illegal dependencies uncovered by https://github.com/elastic/kibana/pull/199630. --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> --- .github/CODEOWNERS | 1 - package.json | 1 - .../status/components/status_table.test.tsx | 2 +- .../status/components/version_header.test.tsx | 2 +- .../src/status/components/version_header.tsx | 2 +- .../src/status/lib/load_status.test.ts | 2 +- .../src/status/lib/load_status.ts | 4 ++-- .../src/status/lib/status_level.test.ts | 2 +- .../core-apps-browser-internal/tsconfig.json | 1 - .../core-status-common-internal/README.md | 3 --- .../core-status-common-internal/index.ts | 17 -------------- .../jest.config.js | 14 ------------ .../core-status-common-internal/kibana.jsonc | 5 ----- .../core-status-common-internal/package.json | 7 ------ .../core-status-common-internal/src/index.ts | 17 -------------- .../core-status-common-internal/tsconfig.json | 22 ------------------- .../core/status/core-status-common/index.ts | 13 +++++++++-- .../status/core-status-common/jest.config.js | 2 +- .../status/core-status-common/src/index.ts | 12 ---------- .../src/status.ts | 3 ++- .../status/core-status-common/tsconfig.json | 4 +++- .../src/routes/status.ts | 2 +- .../src/routes/status_response_schemas.ts | 6 ++--- .../core-status-server-internal/tsconfig.json | 1 - packages/kbn-manifest/index.ts | 2 +- .../public/progress_indicator.tsx | 2 +- src/plugins/interactive_setup/tsconfig.json | 2 +- tsconfig.base.json | 2 -- .../common/endpoint/utils/kibana_status.ts | 6 ++--- .../plugins/security_solution/tsconfig.json | 2 +- yarn.lock | 4 ---- 31 files changed, 35 insertions(+), 130 deletions(-) delete mode 100644 packages/core/status/core-status-common-internal/README.md delete mode 100644 packages/core/status/core-status-common-internal/index.ts delete mode 100644 packages/core/status/core-status-common-internal/jest.config.js delete mode 100644 packages/core/status/core-status-common-internal/kibana.jsonc delete mode 100644 packages/core/status/core-status-common-internal/package.json delete mode 100644 packages/core/status/core-status-common-internal/src/index.ts delete mode 100644 packages/core/status/core-status-common-internal/tsconfig.json delete mode 100644 packages/core/status/core-status-common/src/index.ts rename packages/core/status/{core-status-common-internal => core-status-common}/src/status.ts (92%) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index ae55ea6b37108..c2450338f3e45 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -225,7 +225,6 @@ packages/core/security/core-security-server @elastic/kibana-core packages/core/security/core-security-server-internal @elastic/kibana-core packages/core/security/core-security-server-mocks @elastic/kibana-core packages/core/status/core-status-common @elastic/kibana-core -packages/core/status/core-status-common-internal @elastic/kibana-core packages/core/status/core-status-server @elastic/kibana-core packages/core/status/core-status-server-internal @elastic/kibana-core packages/core/status/core-status-server-mocks @elastic/kibana-core diff --git a/package.json b/package.json index acb1a118284ed..1114f3a94ca6e 100644 --- a/package.json +++ b/package.json @@ -384,7 +384,6 @@ "@kbn/core-security-server-internal": "link:packages/core/security/core-security-server-internal", "@kbn/core-security-server-mocks": "link:packages/core/security/core-security-server-mocks", "@kbn/core-status-common": "link:packages/core/status/core-status-common", - "@kbn/core-status-common-internal": "link:packages/core/status/core-status-common-internal", "@kbn/core-status-server": "link:packages/core/status/core-status-server", "@kbn/core-status-server-internal": "link:packages/core/status/core-status-server-internal", "@kbn/core-test-helpers-deprecations-getters": "link:packages/core/test-helpers/core-test-helpers-deprecations-getters", diff --git a/packages/core/apps/core-apps-browser-internal/src/status/components/status_table.test.tsx b/packages/core/apps/core-apps-browser-internal/src/status/components/status_table.test.tsx index 38d69311d741e..b9949a6decf44 100644 --- a/packages/core/apps/core-apps-browser-internal/src/status/components/status_table.test.tsx +++ b/packages/core/apps/core-apps-browser-internal/src/status/components/status_table.test.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { shallow } from 'enzyme'; -import type { StatusInfoServiceStatus as ServiceStatus } from '@kbn/core-status-common-internal'; +import type { StatusInfoServiceStatus as ServiceStatus } from '@kbn/core-status-common'; import { StatusTable } from './status_table'; const state = { diff --git a/packages/core/apps/core-apps-browser-internal/src/status/components/version_header.test.tsx b/packages/core/apps/core-apps-browser-internal/src/status/components/version_header.test.tsx index 62e48467ae51f..6180860df780d 100644 --- a/packages/core/apps/core-apps-browser-internal/src/status/components/version_header.test.tsx +++ b/packages/core/apps/core-apps-browser-internal/src/status/components/version_header.test.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { mountWithIntl, findTestSubject } from '@kbn/test-jest-helpers'; -import type { ServerVersion } from '@kbn/core-status-common-internal'; +import type { ServerVersion } from '@kbn/core-status-common'; import { VersionHeader } from './version_header'; const buildServerVersion = (parts: Partial = {}): ServerVersion => ({ diff --git a/packages/core/apps/core-apps-browser-internal/src/status/components/version_header.tsx b/packages/core/apps/core-apps-browser-internal/src/status/components/version_header.tsx index 0dc64a3cb7db0..15c1f9d07a273 100644 --- a/packages/core/apps/core-apps-browser-internal/src/status/components/version_header.tsx +++ b/packages/core/apps/core-apps-browser-internal/src/status/components/version_header.tsx @@ -10,7 +10,7 @@ import React, { FC } from 'react'; import { EuiFlexGroup, EuiFlexItem, EuiPanel, EuiText } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; -import type { ServerVersion } from '@kbn/core-status-common-internal'; +import type { ServerVersion } from '@kbn/core-status-common'; interface VersionHeaderProps { version: ServerVersion; diff --git a/packages/core/apps/core-apps-browser-internal/src/status/lib/load_status.test.ts b/packages/core/apps/core-apps-browser-internal/src/status/lib/load_status.test.ts index a63c5011dcaf8..c37db930de789 100644 --- a/packages/core/apps/core-apps-browser-internal/src/status/lib/load_status.test.ts +++ b/packages/core/apps/core-apps-browser-internal/src/status/lib/load_status.test.ts @@ -8,7 +8,7 @@ */ import { httpServiceMock } from '@kbn/core-http-browser-mocks'; -import type { StatusResponse } from '@kbn/core-status-common-internal'; +import type { StatusResponse } from '@kbn/core-status-common'; import { notificationServiceMock } from '@kbn/core-notifications-browser-mocks'; import { mocked } from '@kbn/core-metrics-collectors-server-mocks'; import { loadStatus } from './load_status'; diff --git a/packages/core/apps/core-apps-browser-internal/src/status/lib/load_status.ts b/packages/core/apps/core-apps-browser-internal/src/status/lib/load_status.ts index f89e2196d2122..e8519030c3fdf 100644 --- a/packages/core/apps/core-apps-browser-internal/src/status/lib/load_status.ts +++ b/packages/core/apps/core-apps-browser-internal/src/status/lib/load_status.ts @@ -11,11 +11,11 @@ import numeral from '@elastic/numeral'; import { i18n } from '@kbn/i18n'; import type { HttpSetup } from '@kbn/core-http-browser'; import type { NotificationsSetup } from '@kbn/core-notifications-browser'; -import type { ServiceStatusLevelId } from '@kbn/core-status-common'; import type { + ServiceStatusLevelId, StatusResponse, StatusInfoServiceStatus as ServiceStatus, -} from '@kbn/core-status-common-internal'; +} from '@kbn/core-status-common'; import type { DataType } from './format_number'; interface MetricMeta { diff --git a/packages/core/apps/core-apps-browser-internal/src/status/lib/status_level.test.ts b/packages/core/apps/core-apps-browser-internal/src/status/lib/status_level.test.ts index 3d393bd8e4719..290845c4bdd08 100644 --- a/packages/core/apps/core-apps-browser-internal/src/status/lib/status_level.test.ts +++ b/packages/core/apps/core-apps-browser-internal/src/status/lib/status_level.test.ts @@ -7,7 +7,7 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -import type { StatusInfoServiceStatus as ServiceStatus } from '@kbn/core-status-common-internal'; +import type { StatusInfoServiceStatus as ServiceStatus } from '@kbn/core-status-common'; import { getLevelSortValue, groupByLevel, getHighestStatus } from './status_level'; import { FormattedStatus, StatusState } from './load_status'; diff --git a/packages/core/apps/core-apps-browser-internal/tsconfig.json b/packages/core/apps/core-apps-browser-internal/tsconfig.json index a18bb3421a1f4..9902b12732760 100644 --- a/packages/core/apps/core-apps-browser-internal/tsconfig.json +++ b/packages/core/apps/core-apps-browser-internal/tsconfig.json @@ -24,7 +24,6 @@ "@kbn/core-application-browser", "@kbn/core-application-browser-internal", "@kbn/core-mount-utils-browser-internal", - "@kbn/core-status-common-internal", "@kbn/core-http-browser-internal", "@kbn/core-application-browser-mocks", "@kbn/core-notifications-browser-mocks", diff --git a/packages/core/status/core-status-common-internal/README.md b/packages/core/status/core-status-common-internal/README.md deleted file mode 100644 index f4e4af7fd3b3a..0000000000000 --- a/packages/core/status/core-status-common-internal/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# @kbn/core-status-common-internal - -This package contains the common internal types for Core's `status` domain. diff --git a/packages/core/status/core-status-common-internal/index.ts b/packages/core/status/core-status-common-internal/index.ts deleted file mode 100644 index f6a7a29056145..0000000000000 --- a/packages/core/status/core-status-common-internal/index.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* - * 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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -export type { - StatusInfoCoreStatus, - StatusInfoServiceStatus, - StatusInfo, - StatusResponse, - ServerVersion, - ServerMetrics, -} from './src'; diff --git a/packages/core/status/core-status-common-internal/jest.config.js b/packages/core/status/core-status-common-internal/jest.config.js deleted file mode 100644 index bc848cd656199..0000000000000 --- a/packages/core/status/core-status-common-internal/jest.config.js +++ /dev/null @@ -1,14 +0,0 @@ -/* - * 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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -module.exports = { - preset: '@kbn/test', - rootDir: '../../../..', - roots: ['/packages/core/status/core-status-common-internal'], -}; diff --git a/packages/core/status/core-status-common-internal/kibana.jsonc b/packages/core/status/core-status-common-internal/kibana.jsonc deleted file mode 100644 index 20ce17ae3cefa..0000000000000 --- a/packages/core/status/core-status-common-internal/kibana.jsonc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "type": "shared-common", - "id": "@kbn/core-status-common-internal", - "owner": "@elastic/kibana-core" -} diff --git a/packages/core/status/core-status-common-internal/package.json b/packages/core/status/core-status-common-internal/package.json deleted file mode 100644 index d2c456b6dc96a..0000000000000 --- a/packages/core/status/core-status-common-internal/package.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "@kbn/core-status-common-internal", - "private": true, - "version": "1.0.0", - "author": "Kibana Core", - "license": "Elastic License 2.0 OR AGPL-3.0-only OR SSPL-1.0" -} \ No newline at end of file diff --git a/packages/core/status/core-status-common-internal/src/index.ts b/packages/core/status/core-status-common-internal/src/index.ts deleted file mode 100644 index 60c51dcf47632..0000000000000 --- a/packages/core/status/core-status-common-internal/src/index.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* - * 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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -export type { - StatusInfo, - StatusInfoCoreStatus, - StatusInfoServiceStatus, - StatusResponse, - ServerVersion, - ServerMetrics, -} from './status'; diff --git a/packages/core/status/core-status-common-internal/tsconfig.json b/packages/core/status/core-status-common-internal/tsconfig.json deleted file mode 100644 index 7d31fa090eb0f..0000000000000 --- a/packages/core/status/core-status-common-internal/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "extends": "../../../../tsconfig.base.json", - "compilerOptions": { - "outDir": "target/types", - "types": [ - "jest", - "node" - ] - }, - "include": [ - "**/*.ts", - "**/*.tsx", - ], - "kbn_references": [ - "@kbn/core-status-common", - "@kbn/core-metrics-server", - "@kbn/config" - ], - "exclude": [ - "target/**/*", - ] -} diff --git a/packages/core/status/core-status-common/index.ts b/packages/core/status/core-status-common/index.ts index 50eb85608522e..1aae83558016a 100644 --- a/packages/core/status/core-status-common/index.ts +++ b/packages/core/status/core-status-common/index.ts @@ -7,5 +7,14 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export { ServiceStatusLevels } from './src'; -export type { ServiceStatus, ServiceStatusLevel, ServiceStatusLevelId, CoreStatus } from './src'; +export { ServiceStatusLevels } from './src/service_status'; +export type { CoreStatus } from './src/core_status'; +export type { ServiceStatus, ServiceStatusLevel, ServiceStatusLevelId } from './src/service_status'; +export type { + StatusInfo, + StatusInfoCoreStatus, + StatusInfoServiceStatus, + StatusResponse, + ServerVersion, + ServerMetrics, +} from './src/status'; diff --git a/packages/core/status/core-status-common/jest.config.js b/packages/core/status/core-status-common/jest.config.js index bc848cd656199..48ce844bb7d3f 100644 --- a/packages/core/status/core-status-common/jest.config.js +++ b/packages/core/status/core-status-common/jest.config.js @@ -10,5 +10,5 @@ module.exports = { preset: '@kbn/test', rootDir: '../../../..', - roots: ['/packages/core/status/core-status-common-internal'], + roots: ['/packages/core/status/core-status-common'], }; diff --git a/packages/core/status/core-status-common/src/index.ts b/packages/core/status/core-status-common/src/index.ts deleted file mode 100644 index 7cfcc7dbf79a8..0000000000000 --- a/packages/core/status/core-status-common/src/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* - * 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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -export { ServiceStatusLevels } from './service_status'; -export type { ServiceStatus, ServiceStatusLevel, ServiceStatusLevelId } from './service_status'; -export type { CoreStatus } from './core_status'; diff --git a/packages/core/status/core-status-common-internal/src/status.ts b/packages/core/status/core-status-common/src/status.ts similarity index 92% rename from packages/core/status/core-status-common-internal/src/status.ts rename to packages/core/status/core-status-common/src/status.ts index 370d2c9ac6e5d..7c981c56ceeb3 100644 --- a/packages/core/status/core-status-common-internal/src/status.ts +++ b/packages/core/status/core-status-common/src/status.ts @@ -8,8 +8,9 @@ */ import type { BuildFlavor } from '@kbn/config'; -import type { ServiceStatusLevelId, ServiceStatus, CoreStatus } from '@kbn/core-status-common'; import type { OpsMetrics } from '@kbn/core-metrics-server'; +import type { ServiceStatusLevelId, ServiceStatus } from './service_status'; +import type { CoreStatus } from './core_status'; export interface StatusInfoServiceStatus extends Omit { level: ServiceStatusLevelId; diff --git a/packages/core/status/core-status-common/tsconfig.json b/packages/core/status/core-status-common/tsconfig.json index a63f70f93043d..3b61a574a06bb 100644 --- a/packages/core/status/core-status-common/tsconfig.json +++ b/packages/core/status/core-status-common/tsconfig.json @@ -12,7 +12,9 @@ "**/*.tsx", ], "kbn_references": [ - "@kbn/std" + "@kbn/std", + "@kbn/config", + "@kbn/core-metrics-server" ], "exclude": [ "target/**/*", diff --git a/packages/core/status/core-status-server-internal/src/routes/status.ts b/packages/core/status/core-status-server-internal/src/routes/status.ts index 87e0e6e745a92..bafda87c2b08d 100644 --- a/packages/core/status/core-status-server-internal/src/routes/status.ts +++ b/packages/core/status/core-status-server-internal/src/routes/status.ts @@ -15,7 +15,7 @@ import type { IRouter } from '@kbn/core-http-server'; import type { MetricsServiceSetup } from '@kbn/core-metrics-server'; import type { CoreIncrementUsageCounter } from '@kbn/core-usage-data-server'; import { type ServiceStatus, type CoreStatus, ServiceStatusLevels } from '@kbn/core-status-common'; -import { StatusResponse } from '@kbn/core-status-common-internal'; +import type { StatusResponse } from '@kbn/core-status-common'; import { calculateLegacyStatus, type LegacyStatusInfo } from '../legacy_status'; import { statusResponse, type RedactedStatusHttpBody } from './status_response_schemas'; diff --git a/packages/core/status/core-status-server-internal/src/routes/status_response_schemas.ts b/packages/core/status/core-status-server-internal/src/routes/status_response_schemas.ts index a2dcbcf7d21b6..68cebab4392e0 100644 --- a/packages/core/status/core-status-server-internal/src/routes/status_response_schemas.ts +++ b/packages/core/status/core-status-server-internal/src/routes/status_response_schemas.ts @@ -9,15 +9,15 @@ import { schema, type Type, type TypeOf } from '@kbn/config-schema'; import type { BuildFlavor } from '@kbn/config'; -import type { ServiceStatusLevelId, ServiceStatus } from '@kbn/core-status-common'; - import type { + ServiceStatusLevelId, + ServiceStatus, StatusResponse, StatusInfoCoreStatus, ServerMetrics, StatusInfo, ServerVersion, -} from '@kbn/core-status-common-internal'; +} from '@kbn/core-status-common'; const serviceStatusLevelId: () => Type = () => schema.oneOf( diff --git a/packages/core/status/core-status-server-internal/tsconfig.json b/packages/core/status/core-status-server-internal/tsconfig.json index bda646809e414..5ca46556cac33 100644 --- a/packages/core/status/core-status-server-internal/tsconfig.json +++ b/packages/core/status/core-status-server-internal/tsconfig.json @@ -29,7 +29,6 @@ "@kbn/core-saved-objects-server-internal", "@kbn/core-status-server", "@kbn/core-status-common", - "@kbn/core-status-common-internal", "@kbn/core-usage-data-base-server-internal", "@kbn/core-base-server-mocks", "@kbn/core-environment-server-mocks", diff --git a/packages/kbn-manifest/index.ts b/packages/kbn-manifest/index.ts index 5fc4727a1a72d..ce890742ea61f 100644 --- a/packages/kbn-manifest/index.ts +++ b/packages/kbn-manifest/index.ts @@ -37,7 +37,7 @@ export const runKbnManifestCli = () => { --list all List all the manifests --package [packageId] Select a package to update. --plugin [pluginId] Select a plugin to update. - --set [property] [value] Set the desired "[property]": "[value]" + --set [property]=[value] Set the desired "[property]": "[value]" --unset [property] Removes the desired "[property]: value" from the manifest `, }, diff --git a/src/plugins/interactive_setup/public/progress_indicator.tsx b/src/plugins/interactive_setup/public/progress_indicator.tsx index 6bb87a792e809..be094f9ef7e8d 100644 --- a/src/plugins/interactive_setup/public/progress_indicator.tsx +++ b/src/plugins/interactive_setup/public/progress_indicator.tsx @@ -15,7 +15,7 @@ import useAsyncFn from 'react-use/lib/useAsyncFn'; import useTimeoutFn from 'react-use/lib/useTimeoutFn'; import type { IHttpFetchError } from '@kbn/core-http-browser'; -import type { StatusResponse } from '@kbn/core-status-common-internal'; +import type { StatusResponse } from '@kbn/core-status-common'; import { i18n } from '@kbn/i18n'; import { useKibana } from './use_kibana'; diff --git a/src/plugins/interactive_setup/tsconfig.json b/src/plugins/interactive_setup/tsconfig.json index 51fff541980cc..048143fd464e0 100644 --- a/src/plugins/interactive_setup/tsconfig.json +++ b/src/plugins/interactive_setup/tsconfig.json @@ -14,7 +14,7 @@ "@kbn/i18n", "@kbn/ui-theme", "@kbn/core-http-browser", - "@kbn/core-status-common-internal", + "@kbn/core-status-common", "@kbn/safer-lodash-set", "@kbn/test-jest-helpers", "@kbn/config-schema", diff --git a/tsconfig.base.json b/tsconfig.base.json index 223b2d5a58ca2..f6aaa2ee0ac7f 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -606,8 +606,6 @@ "@kbn/core-security-server-mocks/*": ["packages/core/security/core-security-server-mocks/*"], "@kbn/core-status-common": ["packages/core/status/core-status-common"], "@kbn/core-status-common/*": ["packages/core/status/core-status-common/*"], - "@kbn/core-status-common-internal": ["packages/core/status/core-status-common-internal"], - "@kbn/core-status-common-internal/*": ["packages/core/status/core-status-common-internal/*"], "@kbn/core-status-server": ["packages/core/status/core-status-server"], "@kbn/core-status-server/*": ["packages/core/status/core-status-server/*"], "@kbn/core-status-server-internal": ["packages/core/status/core-status-server-internal"], diff --git a/x-pack/plugins/security_solution/common/endpoint/utils/kibana_status.ts b/x-pack/plugins/security_solution/common/endpoint/utils/kibana_status.ts index 78147439eedd9..f1fcac6e758c0 100644 --- a/x-pack/plugins/security_solution/common/endpoint/utils/kibana_status.ts +++ b/x-pack/plugins/security_solution/common/endpoint/utils/kibana_status.ts @@ -7,7 +7,7 @@ import { KbnClient } from '@kbn/test'; import type { Client } from '@elastic/elasticsearch'; -import type { StatusResponse } from '@kbn/core-status-common-internal'; +import type { StatusResponse } from '@kbn/core-status-common'; import { catchAxiosErrorFormatAndThrow } from '../format_axios_error'; export const fetchKibanaStatus = async (kbnClient: KbnClient): Promise => { @@ -15,11 +15,11 @@ export const fetchKibanaStatus = async (kbnClient: KbnClient): Promise({ method: 'GET', path: '/api/status', }) - .then((response) => response.data as StatusResponse) + .then(({ data }) => data) .catch(catchAxiosErrorFormatAndThrow); }; /** diff --git a/x-pack/plugins/security_solution/tsconfig.json b/x-pack/plugins/security_solution/tsconfig.json index c0b84c2b70a84..cbd992ea78d8b 100644 --- a/x-pack/plugins/security_solution/tsconfig.json +++ b/x-pack/plugins/security_solution/tsconfig.json @@ -126,7 +126,7 @@ "@kbn/dev-cli-errors", "@kbn/dev-utils", "@kbn/tooling-log", - "@kbn/core-status-common-internal", + "@kbn/core-status-common", "@kbn/repo-info", "@kbn/storybook", "@kbn/controls-plugin", diff --git a/yarn.lock b/yarn.lock index b69c7755172e4..c2add93693fe7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4458,10 +4458,6 @@ version "0.0.0" uid "" -"@kbn/core-status-common-internal@link:packages/core/status/core-status-common-internal": - version "0.0.0" - uid "" - "@kbn/core-status-common@link:packages/core/status/core-status-common": version "0.0.0" uid ""