From fc45a01b7ec3080adeff993193c418d2f3639361 Mon Sep 17 00:00:00 2001 From: Dzmitry Lemechko Date: Mon, 23 Mar 2026 12:02:23 +0100 Subject: [PATCH 1/2] move kbn-client into its own package (#258963) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary Extracts the Kibana tooling HTTP client (`KbnClient` and related helpers) from `@kbn/test` into a dedicated `@kbn/kbn-client` package. `@kbn/test` continues to re-export the same symbols so existing `import { … } from '@kbn/test'` call sites keep working. ### Why - Smaller, clearer dependency graph for tools that only need a Kibana HTTP client (e.g. `Scout`, `Cypress` helpers, `evals`) without pulling in the full FTR/Jest/Mocha surface of `@kbn/test`. - Single public entry for client APIs instead of deep imports like `@kbn/test/src/kbn_client/...`, which aligns with package boundaries and makes types like UiSettingValues and ReqOptions part of a stable export surface. - Easier next steps to peel off other focused pieces (e.g. SAML session management) on top of `@kbn/kbn-client` instead of growing `@kbn/test` further. ### Notes - New package is `devOnly` like @kbn/test. - Jest/unit tests for the client live under `@kbn/kbn-client`. --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit c701e38da601a1981589cce98ad76bc03e316852) # Conflicts: # .github/CODEOWNERS # src/platform/packages/shared/kbn-kbn-client/src/kbn_client/kbn_client_requester_error.test.ts # x-pack/platform/packages/shared/kbn-evals/moon.yml # x-pack/platform/packages/shared/kbn-evals/src/utils/evaluations_kbn_client.test.ts # x-pack/platform/packages/shared/kbn-evals/src/utils/evaluations_kbn_client.ts # x-pack/platform/packages/shared/kbn-evals/src/utils/kbn_client_with_retries.ts # x-pack/platform/packages/shared/kbn-evals/tsconfig.json --- .github/CODEOWNERS | 1 + package.json | 1 + .../shared/kbn-cypress-test-helper/moon.yml | 1 + .../src/services/stack_services.ts | 2 +- .../kbn-cypress-test-helper/tsconfig.json | 1 + .../kbn_client => kbn-kbn-client}/index.ts | 3 +- .../shared/kbn-kbn-client/jest.config.js | 14 +++++ .../shared/kbn-kbn-client/kibana.jsonc | 11 ++++ .../packages/shared/kbn-kbn-client/moon.yml | 58 +++++++++++++++++++ .../shared/kbn-kbn-client/package.json | 6 ++ .../import_export/parse_archive.test.ts | 0 .../kbn_client/import_export/parse_archive.ts | 0 .../kbn-kbn-client/src/kbn_client/index.ts | 15 +++++ .../src/kbn_client/kbn_client.ts | 0 .../kbn_client/kbn_client_import_export.ts | 0 .../src/kbn_client/kbn_client_plugins.ts | 0 .../kbn_client/kbn_client_requester.test.ts | 0 .../src/kbn_client/kbn_client_requester.ts | 0 .../kbn_client/kbn_client_requester_error.ts | 0 .../kbn_client/kbn_client_saved_objects.ts | 0 .../src/kbn_client/kbn_client_spaces.ts | 0 .../src/kbn_client/kbn_client_status.ts | 0 .../src/kbn_client/kbn_client_ui_settings.ts | 0 .../src/kbn_client/kbn_client_version.ts | 0 .../shared/kbn-kbn-client/tsconfig.json | 23 ++++++++ .../packages/shared/kbn-scout/moon.yml | 1 + .../kbn-scout/src/common/services/clients.ts | 3 +- .../kbn-scout/src/common/services/index.ts | 2 +- .../fixtures/scope/worker/core_fixtures.ts | 6 +- .../scope/worker/scout_space/index.ts | 2 +- .../scope/worker/scout_space/parallel.ts | 2 +- .../scope/worker/ui_settings/index.ts | 2 +- .../scope/worker/ui_settings/single_thread.ts | 2 +- .../packages/shared/kbn-scout/tsconfig.json | 1 + .../packages/shared/kbn-test/index.ts | 4 +- .../packages/shared/kbn-test/moon.yml | 2 +- .../kbn-test/src/auth/session_manager.test.ts | 8 +-- .../kbn-test/src/auth/session_manager.ts | 2 +- .../lib/dedicated_task_runner.ts | 2 +- .../shared/kbn-test/src/kbn_archiver_cli.ts | 2 +- .../packages/shared/kbn-test/tsconfig.json | 2 +- tsconfig.base.json | 2 + .../packages/shared/kbn-evals/moon.yml | 1 + .../src/utils/http_handler_from_kbn_client.ts | 6 +- .../packages/shared/kbn-evals/tsconfig.json | 1 + .../plugins/security_solution/moon.yml | 1 + .../create_and_enroll_endpoint_host_ci.ts | 2 +- .../public/management/cypress/tsconfig.json | 1 + .../scripts/endpoint/common/stack_services.ts | 5 +- .../plugins/security_solution/tsconfig.json | 1 + .../data_views/data_views.ts | 2 +- x-pack/solutions/security/test/moon.yml | 1 + x-pack/solutions/security/test/tsconfig.json | 1 + yarn.lock | 4 ++ 54 files changed, 176 insertions(+), 31 deletions(-) rename src/platform/packages/shared/{kbn-test/src/kbn_client => kbn-kbn-client}/index.ts (85%) create mode 100644 src/platform/packages/shared/kbn-kbn-client/jest.config.js create mode 100644 src/platform/packages/shared/kbn-kbn-client/kibana.jsonc create mode 100644 src/platform/packages/shared/kbn-kbn-client/moon.yml create mode 100644 src/platform/packages/shared/kbn-kbn-client/package.json rename src/platform/packages/shared/{kbn-test => kbn-kbn-client}/src/kbn_client/import_export/parse_archive.test.ts (100%) rename src/platform/packages/shared/{kbn-test => kbn-kbn-client}/src/kbn_client/import_export/parse_archive.ts (100%) create mode 100644 src/platform/packages/shared/kbn-kbn-client/src/kbn_client/index.ts rename src/platform/packages/shared/{kbn-test => kbn-kbn-client}/src/kbn_client/kbn_client.ts (100%) rename src/platform/packages/shared/{kbn-test => kbn-kbn-client}/src/kbn_client/kbn_client_import_export.ts (100%) rename src/platform/packages/shared/{kbn-test => kbn-kbn-client}/src/kbn_client/kbn_client_plugins.ts (100%) rename src/platform/packages/shared/{kbn-test => kbn-kbn-client}/src/kbn_client/kbn_client_requester.test.ts (100%) rename src/platform/packages/shared/{kbn-test => kbn-kbn-client}/src/kbn_client/kbn_client_requester.ts (100%) rename src/platform/packages/shared/{kbn-test => kbn-kbn-client}/src/kbn_client/kbn_client_requester_error.ts (100%) rename src/platform/packages/shared/{kbn-test => kbn-kbn-client}/src/kbn_client/kbn_client_saved_objects.ts (100%) rename src/platform/packages/shared/{kbn-test => kbn-kbn-client}/src/kbn_client/kbn_client_spaces.ts (100%) rename src/platform/packages/shared/{kbn-test => kbn-kbn-client}/src/kbn_client/kbn_client_status.ts (100%) rename src/platform/packages/shared/{kbn-test => kbn-kbn-client}/src/kbn_client/kbn_client_ui_settings.ts (100%) rename src/platform/packages/shared/{kbn-test => kbn-kbn-client}/src/kbn_client/kbn_client_version.ts (100%) create mode 100644 src/platform/packages/shared/kbn-kbn-client/tsconfig.json diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index a6eac2e4fb64d..25ee336bf9b3d 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -527,6 +527,7 @@ src/platform/packages/shared/kbn-interpreter @elastic/kibana-visualizations src/platform/packages/shared/kbn-io-ts-utils @elastic/obs-knowledge-team src/platform/packages/shared/kbn-jest-benchmarks @elastic/observability-ui src/platform/packages/shared/kbn-lazy-object @elastic/kibana-operations +src/platform/packages/shared/kbn-kbn-client @elastic/kibana-operations @elastic/appex-qa src/platform/packages/shared/kbn-lens-common @elastic/kibana-visualizations src/platform/packages/shared/kbn-lens-common-2 @elastic/kibana-visualizations src/platform/packages/shared/kbn-lens-embeddable-utils @elastic/kibana-visualizations diff --git a/package.json b/package.json index 27026e94461c8..c31608cac6f6b 100644 --- a/package.json +++ b/package.json @@ -1647,6 +1647,7 @@ "@kbn/jest-serializers": "link:src/platform/packages/private/kbn-jest-serializers", "@kbn/journeys": "link:src/platform/packages/private/kbn-journeys", "@kbn/json-ast": "link:packages/kbn-json-ast", + "@kbn/kbn-client": "link:src/platform/packages/shared/kbn-kbn-client", "@kbn/kbn-genai-cli": "link:x-pack/solutions/observability/packages/kbn-genai-cli", "@kbn/kibana-manifest-schema": "link:packages/kbn-kibana-manifest-schema", "@kbn/lazy-object": "link:src/platform/packages/shared/kbn-lazy-object", diff --git a/src/platform/packages/shared/kbn-cypress-test-helper/moon.yml b/src/platform/packages/shared/kbn-cypress-test-helper/moon.yml index ef3c92a239ceb..8c94b4df6b0e0 100644 --- a/src/platform/packages/shared/kbn-cypress-test-helper/moon.yml +++ b/src/platform/packages/shared/kbn-cypress-test-helper/moon.yml @@ -22,6 +22,7 @@ dependsOn: - '@kbn/security-plugin' - '@kbn/tooling-log' - '@kbn/repo-info' + - '@kbn/kbn-client' - '@kbn/test' - '@kbn/dev-cli-runner' - '@kbn/core-status-common' diff --git a/src/platform/packages/shared/kbn-cypress-test-helper/src/services/stack_services.ts b/src/platform/packages/shared/kbn-cypress-test-helper/src/services/stack_services.ts index 33c5f87f5898d..10ec0f10bcdb8 100644 --- a/src/platform/packages/shared/kbn-cypress-test-helper/src/services/stack_services.ts +++ b/src/platform/packages/shared/kbn-cypress-test-helper/src/services/stack_services.ts @@ -12,7 +12,7 @@ import type { ToolingLog } from '@kbn/tooling-log'; import type { KbnClientOptions } from '@kbn/test'; import { KbnClient } from '@kbn/test'; import pRetry from 'p-retry'; -import type { ReqOptions } from '@kbn/test/src/kbn_client/kbn_client_requester'; +import type { ReqOptions } from '@kbn/kbn-client'; import { type AxiosResponse } from 'axios'; import type { ClientOptions } from '@elastic/elasticsearch/lib/client'; import fs from 'fs'; diff --git a/src/platform/packages/shared/kbn-cypress-test-helper/tsconfig.json b/src/platform/packages/shared/kbn-cypress-test-helper/tsconfig.json index f7845726592d4..4be6856ddc7cc 100644 --- a/src/platform/packages/shared/kbn-cypress-test-helper/tsconfig.json +++ b/src/platform/packages/shared/kbn-cypress-test-helper/tsconfig.json @@ -24,6 +24,7 @@ "@kbn/security-plugin", "@kbn/tooling-log", "@kbn/repo-info", + "@kbn/kbn-client", "@kbn/test", "@kbn/dev-cli-runner", "@kbn/core-status-common", diff --git a/src/platform/packages/shared/kbn-test/src/kbn_client/index.ts b/src/platform/packages/shared/kbn-kbn-client/index.ts similarity index 85% rename from src/platform/packages/shared/kbn-test/src/kbn_client/index.ts rename to src/platform/packages/shared/kbn-kbn-client/index.ts index 6d8de4814e668..c0a1ae91880f6 100644 --- a/src/platform/packages/shared/kbn-test/src/kbn_client/index.ts +++ b/src/platform/packages/shared/kbn-kbn-client/index.ts @@ -7,5 +7,4 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * from './kbn_client'; -export { uriencode } from './kbn_client_requester'; +export * from './src/kbn_client'; diff --git a/src/platform/packages/shared/kbn-kbn-client/jest.config.js b/src/platform/packages/shared/kbn-kbn-client/jest.config.js new file mode 100644 index 0000000000000..049674b27a640 --- /dev/null +++ b/src/platform/packages/shared/kbn-kbn-client/jest.config.js @@ -0,0 +1,14 @@ +/* + * 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/jest_node', + rootDir: '../../../../..', + roots: ['/src/platform/packages/shared/kbn-kbn-client'], +}; diff --git a/src/platform/packages/shared/kbn-kbn-client/kibana.jsonc b/src/platform/packages/shared/kbn-kbn-client/kibana.jsonc new file mode 100644 index 0000000000000..ae85c5440409c --- /dev/null +++ b/src/platform/packages/shared/kbn-kbn-client/kibana.jsonc @@ -0,0 +1,11 @@ +{ + "type": "shared-common", + "id": "@kbn/kbn-client", + "owner": [ + "@elastic/kibana-operations", + "@elastic/appex-qa" + ], + "group": "platform", + "visibility": "shared", + "devOnly": true +} diff --git a/src/platform/packages/shared/kbn-kbn-client/moon.yml b/src/platform/packages/shared/kbn-kbn-client/moon.yml new file mode 100644 index 0000000000000..44861c5104957 --- /dev/null +++ b/src/platform/packages/shared/kbn-kbn-client/moon.yml @@ -0,0 +1,58 @@ +# This file is generated by the @kbn/moon package. Any manual edits will be erased! +# To extend this, write your extensions/overrides to 'moon.extend.yml' +# then regenerate this file with: 'node scripts/regenerate_moon_projects.js --update --filter @kbn/kbn-client' + +$schema: https://moonrepo.dev/schemas/project.json +id: '@kbn/kbn-client' +layer: unknown +owners: + defaultOwner: '@elastic/kibana-operations' +toolchains: + default: node +language: typescript +project: + title: '@kbn/kbn-client' + description: Moon project for @kbn/kbn-client + channel: '' + owner: '@elastic/kibana-operations' + sourceRoot: src/platform/packages/shared/kbn-kbn-client +dependsOn: + - '@kbn/core-saved-objects-api-server' + - '@kbn/dev-cli-errors' + - '@kbn/dev-utils' + - '@kbn/repo-info' + - '@kbn/tooling-log' +tags: + - shared-common + - package + - dev + - group-platform + - shared + - jest-unit-tests +fileGroups: + src: + - '**/*.ts' + - '!target/**/*' +tasks: + jest: + command: node + args: + - '--no-experimental-require-module' + - $workspaceRoot/scripts/jest + - '--config' + - $projectRoot/jest.config.js + options: + runFromWorkspaceRoot: true + inputs: + - '@group(src)' + jestCI: + command: node + args: + - '--no-experimental-require-module' + - $workspaceRoot/scripts/jest + - '--config' + - $projectRoot/jest.config.js + options: + runFromWorkspaceRoot: true + inputs: + - '@group(src)' diff --git a/src/platform/packages/shared/kbn-kbn-client/package.json b/src/platform/packages/shared/kbn-kbn-client/package.json new file mode 100644 index 0000000000000..110fb118d2f2e --- /dev/null +++ b/src/platform/packages/shared/kbn-kbn-client/package.json @@ -0,0 +1,6 @@ +{ + "name": "@kbn/kbn-client", + "private": true, + "version": "1.0.0", + "license": "Elastic License 2.0 OR AGPL-3.0-only OR SSPL-1.0" +} diff --git a/src/platform/packages/shared/kbn-test/src/kbn_client/import_export/parse_archive.test.ts b/src/platform/packages/shared/kbn-kbn-client/src/kbn_client/import_export/parse_archive.test.ts similarity index 100% rename from src/platform/packages/shared/kbn-test/src/kbn_client/import_export/parse_archive.test.ts rename to src/platform/packages/shared/kbn-kbn-client/src/kbn_client/import_export/parse_archive.test.ts diff --git a/src/platform/packages/shared/kbn-test/src/kbn_client/import_export/parse_archive.ts b/src/platform/packages/shared/kbn-kbn-client/src/kbn_client/import_export/parse_archive.ts similarity index 100% rename from src/platform/packages/shared/kbn-test/src/kbn_client/import_export/parse_archive.ts rename to src/platform/packages/shared/kbn-kbn-client/src/kbn_client/import_export/parse_archive.ts diff --git a/src/platform/packages/shared/kbn-kbn-client/src/kbn_client/index.ts b/src/platform/packages/shared/kbn-kbn-client/src/kbn_client/index.ts new file mode 100644 index 0000000000000..b230b5c040b61 --- /dev/null +++ b/src/platform/packages/shared/kbn-kbn-client/src/kbn_client/index.ts @@ -0,0 +1,15 @@ +/* + * 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 * from './kbn_client'; +export { uriencode } from './kbn_client_requester'; +export type { ReqOptions } from './kbn_client_requester'; +export { KbnClientRequesterError } from './kbn_client_requester_error'; +export { KbnClientSavedObjects } from './kbn_client_saved_objects'; +export type { UiSettingValues } from './kbn_client_ui_settings'; diff --git a/src/platform/packages/shared/kbn-test/src/kbn_client/kbn_client.ts b/src/platform/packages/shared/kbn-kbn-client/src/kbn_client/kbn_client.ts similarity index 100% rename from src/platform/packages/shared/kbn-test/src/kbn_client/kbn_client.ts rename to src/platform/packages/shared/kbn-kbn-client/src/kbn_client/kbn_client.ts diff --git a/src/platform/packages/shared/kbn-test/src/kbn_client/kbn_client_import_export.ts b/src/platform/packages/shared/kbn-kbn-client/src/kbn_client/kbn_client_import_export.ts similarity index 100% rename from src/platform/packages/shared/kbn-test/src/kbn_client/kbn_client_import_export.ts rename to src/platform/packages/shared/kbn-kbn-client/src/kbn_client/kbn_client_import_export.ts diff --git a/src/platform/packages/shared/kbn-test/src/kbn_client/kbn_client_plugins.ts b/src/platform/packages/shared/kbn-kbn-client/src/kbn_client/kbn_client_plugins.ts similarity index 100% rename from src/platform/packages/shared/kbn-test/src/kbn_client/kbn_client_plugins.ts rename to src/platform/packages/shared/kbn-kbn-client/src/kbn_client/kbn_client_plugins.ts diff --git a/src/platform/packages/shared/kbn-test/src/kbn_client/kbn_client_requester.test.ts b/src/platform/packages/shared/kbn-kbn-client/src/kbn_client/kbn_client_requester.test.ts similarity index 100% rename from src/platform/packages/shared/kbn-test/src/kbn_client/kbn_client_requester.test.ts rename to src/platform/packages/shared/kbn-kbn-client/src/kbn_client/kbn_client_requester.test.ts diff --git a/src/platform/packages/shared/kbn-test/src/kbn_client/kbn_client_requester.ts b/src/platform/packages/shared/kbn-kbn-client/src/kbn_client/kbn_client_requester.ts similarity index 100% rename from src/platform/packages/shared/kbn-test/src/kbn_client/kbn_client_requester.ts rename to src/platform/packages/shared/kbn-kbn-client/src/kbn_client/kbn_client_requester.ts diff --git a/src/platform/packages/shared/kbn-test/src/kbn_client/kbn_client_requester_error.ts b/src/platform/packages/shared/kbn-kbn-client/src/kbn_client/kbn_client_requester_error.ts similarity index 100% rename from src/platform/packages/shared/kbn-test/src/kbn_client/kbn_client_requester_error.ts rename to src/platform/packages/shared/kbn-kbn-client/src/kbn_client/kbn_client_requester_error.ts diff --git a/src/platform/packages/shared/kbn-test/src/kbn_client/kbn_client_saved_objects.ts b/src/platform/packages/shared/kbn-kbn-client/src/kbn_client/kbn_client_saved_objects.ts similarity index 100% rename from src/platform/packages/shared/kbn-test/src/kbn_client/kbn_client_saved_objects.ts rename to src/platform/packages/shared/kbn-kbn-client/src/kbn_client/kbn_client_saved_objects.ts diff --git a/src/platform/packages/shared/kbn-test/src/kbn_client/kbn_client_spaces.ts b/src/platform/packages/shared/kbn-kbn-client/src/kbn_client/kbn_client_spaces.ts similarity index 100% rename from src/platform/packages/shared/kbn-test/src/kbn_client/kbn_client_spaces.ts rename to src/platform/packages/shared/kbn-kbn-client/src/kbn_client/kbn_client_spaces.ts diff --git a/src/platform/packages/shared/kbn-test/src/kbn_client/kbn_client_status.ts b/src/platform/packages/shared/kbn-kbn-client/src/kbn_client/kbn_client_status.ts similarity index 100% rename from src/platform/packages/shared/kbn-test/src/kbn_client/kbn_client_status.ts rename to src/platform/packages/shared/kbn-kbn-client/src/kbn_client/kbn_client_status.ts diff --git a/src/platform/packages/shared/kbn-test/src/kbn_client/kbn_client_ui_settings.ts b/src/platform/packages/shared/kbn-kbn-client/src/kbn_client/kbn_client_ui_settings.ts similarity index 100% rename from src/platform/packages/shared/kbn-test/src/kbn_client/kbn_client_ui_settings.ts rename to src/platform/packages/shared/kbn-kbn-client/src/kbn_client/kbn_client_ui_settings.ts diff --git a/src/platform/packages/shared/kbn-test/src/kbn_client/kbn_client_version.ts b/src/platform/packages/shared/kbn-kbn-client/src/kbn_client/kbn_client_version.ts similarity index 100% rename from src/platform/packages/shared/kbn-test/src/kbn_client/kbn_client_version.ts rename to src/platform/packages/shared/kbn-kbn-client/src/kbn_client/kbn_client_version.ts diff --git a/src/platform/packages/shared/kbn-kbn-client/tsconfig.json b/src/platform/packages/shared/kbn-kbn-client/tsconfig.json new file mode 100644 index 0000000000000..6fa2cb0fee686 --- /dev/null +++ b/src/platform/packages/shared/kbn-kbn-client/tsconfig.json @@ -0,0 +1,23 @@ +{ + "extends": "@kbn/tsconfig-base/tsconfig.json", + "compilerOptions": { + "outDir": "target/types", + "types": [ + "jest", + "node" + ] + }, + "include": [ + "**/*.ts" + ], + "exclude": [ + "target/**/*" + ], + "kbn_references": [ + "@kbn/core-saved-objects-api-server", + "@kbn/dev-cli-errors", + "@kbn/dev-utils", + "@kbn/repo-info", + "@kbn/tooling-log" + ] +} diff --git a/src/platform/packages/shared/kbn-scout/moon.yml b/src/platform/packages/shared/kbn-scout/moon.yml index 3c105650fc713..89effb4898c40 100644 --- a/src/platform/packages/shared/kbn-scout/moon.yml +++ b/src/platform/packages/shared/kbn-scout/moon.yml @@ -26,6 +26,7 @@ dependsOn: - '@kbn/repo-packages' - '@kbn/es' - '@kbn/dev-proc-runner' + - '@kbn/kbn-client' - '@kbn/test' - '@kbn/es-archiver' - '@kbn/dev-utils' diff --git a/src/platform/packages/shared/kbn-scout/src/common/services/clients.ts b/src/platform/packages/shared/kbn-scout/src/common/services/clients.ts index 0565dc185c8d6..d1a3170237e1f 100644 --- a/src/platform/packages/shared/kbn-scout/src/common/services/clients.ts +++ b/src/platform/packages/shared/kbn-scout/src/common/services/clients.ts @@ -7,7 +7,8 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -import { createEsClientForTesting, KbnClient } from '@kbn/test'; +import { KbnClient } from '@kbn/kbn-client'; +import { createEsClientForTesting } from '@kbn/test'; import type { ScoutLogger } from './logger'; import type { ScoutTestConfig, EsClient } from '../../types'; diff --git a/src/platform/packages/shared/kbn-scout/src/common/services/index.ts b/src/platform/packages/shared/kbn-scout/src/common/services/index.ts index 77f5067dcecd4..f46743eb17d1d 100644 --- a/src/platform/packages/shared/kbn-scout/src/common/services/index.ts +++ b/src/platform/packages/shared/kbn-scout/src/common/services/index.ts @@ -16,7 +16,7 @@ export { createSamlSessionManager } from './saml_auth'; export type { KibanaUrl } from './kibana_url'; export type { SamlSessionManager } from '@kbn/test'; export { ScoutLogger } from './logger'; -export type { KbnClient } from '@kbn/test'; +export type { KbnClient } from '@kbn/kbn-client'; export type { Client as EsClient } from '@elastic/elasticsearch'; export { createCustomRole, diff --git a/src/platform/packages/shared/kbn-scout/src/playwright/fixtures/scope/worker/core_fixtures.ts b/src/platform/packages/shared/kbn-scout/src/playwright/fixtures/scope/worker/core_fixtures.ts index e79d6e2b0ed00..f1d9a85562f7f 100644 --- a/src/platform/packages/shared/kbn-scout/src/playwright/fixtures/scope/worker/core_fixtures.ts +++ b/src/platform/packages/shared/kbn-scout/src/playwright/fixtures/scope/worker/core_fixtures.ts @@ -8,7 +8,8 @@ */ import { test as base } from '@playwright/test'; -import type { KbnClient, SamlSessionManager } from '@kbn/test'; +import type { KbnClient } from '@kbn/kbn-client'; +import type { SamlSessionManager } from '@kbn/test'; import type { Client } from '@elastic/elasticsearch'; import type { KibanaUrl, @@ -30,7 +31,8 @@ import type { ScoutTestOptions } from '../../../types'; import type { ScoutTestConfig } from '.'; // re-export to import types from '@kbn-scout' -export type { KbnClient, SamlSessionManager } from '@kbn/test'; +export type { KbnClient } from '@kbn/kbn-client'; +export type { SamlSessionManager } from '@kbn/test'; export type { Client as EsClient } from '@elastic/elasticsearch'; export type { KibanaUrl } from '../../../../common/services/kibana_url'; export type { ScoutTestConfig } from '../../../../types'; diff --git a/src/platform/packages/shared/kbn-scout/src/playwright/fixtures/scope/worker/scout_space/index.ts b/src/platform/packages/shared/kbn-scout/src/playwright/fixtures/scope/worker/scout_space/index.ts index 95de0797ecb96..b95e21d4b19c6 100644 --- a/src/platform/packages/shared/kbn-scout/src/playwright/fixtures/scope/worker/scout_space/index.ts +++ b/src/platform/packages/shared/kbn-scout/src/playwright/fixtures/scope/worker/scout_space/index.ts @@ -7,7 +7,7 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -import type { UiSettingValues } from '@kbn/test/src/kbn_client/kbn_client_ui_settings'; +import type { UiSettingValues } from '@kbn/kbn-client'; export interface ImportSavedObjects { type: string; diff --git a/src/platform/packages/shared/kbn-scout/src/playwright/fixtures/scope/worker/scout_space/parallel.ts b/src/platform/packages/shared/kbn-scout/src/playwright/fixtures/scope/worker/scout_space/parallel.ts index 7e3575877a237..5448146c95a98 100644 --- a/src/platform/packages/shared/kbn-scout/src/playwright/fixtures/scope/worker/scout_space/parallel.ts +++ b/src/platform/packages/shared/kbn-scout/src/playwright/fixtures/scope/worker/scout_space/parallel.ts @@ -7,7 +7,7 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -import type { UiSettingValues } from '@kbn/test/src/kbn_client/kbn_client_ui_settings'; +import type { UiSettingValues } from '@kbn/kbn-client'; import { formatTime, isValidUTCDate } from '../../../../utils'; import { coreWorkerFixtures } from '..'; import type { ImportSavedObjects, ScoutSpaceParallelFixture } from '.'; diff --git a/src/platform/packages/shared/kbn-scout/src/playwright/fixtures/scope/worker/ui_settings/index.ts b/src/platform/packages/shared/kbn-scout/src/playwright/fixtures/scope/worker/ui_settings/index.ts index 48c6d99d6266d..a8ecffe6a20b0 100644 --- a/src/platform/packages/shared/kbn-scout/src/playwright/fixtures/scope/worker/ui_settings/index.ts +++ b/src/platform/packages/shared/kbn-scout/src/playwright/fixtures/scope/worker/ui_settings/index.ts @@ -7,7 +7,7 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -import type { UiSettingValues } from '@kbn/test/src/kbn_client/kbn_client_ui_settings'; +import type { UiSettingValues } from '@kbn/kbn-client'; export interface UiSettingsFixture { /** diff --git a/src/platform/packages/shared/kbn-scout/src/playwright/fixtures/scope/worker/ui_settings/single_thread.ts b/src/platform/packages/shared/kbn-scout/src/playwright/fixtures/scope/worker/ui_settings/single_thread.ts index 887a5bc0106a8..9a1ff674f374e 100644 --- a/src/platform/packages/shared/kbn-scout/src/playwright/fixtures/scope/worker/ui_settings/single_thread.ts +++ b/src/platform/packages/shared/kbn-scout/src/playwright/fixtures/scope/worker/ui_settings/single_thread.ts @@ -7,7 +7,7 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -import type { UiSettingValues } from '@kbn/test/src/kbn_client/kbn_client_ui_settings'; +import type { UiSettingValues } from '@kbn/kbn-client'; import { isValidUTCDate, formatTime } from '../../../../utils'; import { coreWorkerFixtures } from '../core_fixtures'; import type { UiSettingsFixture } from '.'; diff --git a/src/platform/packages/shared/kbn-scout/tsconfig.json b/src/platform/packages/shared/kbn-scout/tsconfig.json index 66f6d2a938ca0..d36b752505d57 100644 --- a/src/platform/packages/shared/kbn-scout/tsconfig.json +++ b/src/platform/packages/shared/kbn-scout/tsconfig.json @@ -22,6 +22,7 @@ "@kbn/repo-packages", "@kbn/es", "@kbn/dev-proc-runner", + "@kbn/kbn-client", "@kbn/test", "@kbn/es-archiver", "@kbn/dev-utils", diff --git a/src/platform/packages/shared/kbn-test/index.ts b/src/platform/packages/shared/kbn-test/index.ts index 75b7d30b7f31f..796124c6df1da 100644 --- a/src/platform/packages/shared/kbn-test/index.ts +++ b/src/platform/packages/shared/kbn-test/index.ts @@ -7,8 +7,6 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export { KbnClientRequesterError } from './src/kbn_client/kbn_client_requester_error'; - // @internal export { startServersCli, startServers } from './src/functional_tests/start_servers'; @@ -76,7 +74,7 @@ export { runJestAll } from './src/jest/run_all'; export * from './src/kbn_archiver_cli'; -export * from './src/kbn_client'; +export * from '@kbn/kbn-client'; export * from './src/find_test_plugin_paths'; diff --git a/src/platform/packages/shared/kbn-test/moon.yml b/src/platform/packages/shared/kbn-test/moon.yml index c396f9a9abd4b..a543f929203f4 100644 --- a/src/platform/packages/shared/kbn-test/moon.yml +++ b/src/platform/packages/shared/kbn-test/moon.yml @@ -18,6 +18,7 @@ project: metadata: sourceRoot: src/platform/packages/shared/kbn-test dependsOn: + - '@kbn/kbn-client' - '@kbn/dev-utils' - '@kbn/std' - '@kbn/tooling-log' @@ -33,7 +34,6 @@ dependsOn: - '@kbn/stdio-dev-helpers' - '@kbn/babel-register' - '@kbn/repo-packages' - - '@kbn/core-saved-objects-api-server' - '@kbn/mock-idp-utils' - '@kbn/code-owners' - '@kbn/scout-reporting' diff --git a/src/platform/packages/shared/kbn-test/src/auth/session_manager.test.ts b/src/platform/packages/shared/kbn-test/src/auth/session_manager.test.ts index 0749ffa8d5cf0..bc876295027df 100644 --- a/src/platform/packages/shared/kbn-test/src/auth/session_manager.test.ts +++ b/src/platform/packages/shared/kbn-test/src/auth/session_manager.test.ts @@ -36,7 +36,7 @@ const readCloudUsersFromFileMock = jest.spyOn(helper, 'readCloudUsersFromFile'); const getTestToken = () => 'kbn_cookie_' + crypto.randomBytes(16).toString('hex'); -jest.mock('../kbn_client/kbn_client', () => { +jest.mock('@kbn/kbn-client', () => { return { KbnClient: jest.fn(), }; @@ -53,7 +53,7 @@ describe('SamlSessionManager', () => { beforeEach(() => { jest.resetAllMocks(); jest - .requireMock('../kbn_client/kbn_client') + .requireMock('@kbn/kbn-client') .KbnClient.mockImplementation(() => ({ version: { get } })); get.mockImplementation(() => Promise.resolve('8.12.0')); @@ -267,7 +267,7 @@ describe('SamlSessionManager', () => { beforeEach(() => { jest.resetAllMocks(); jest - .requireMock('../kbn_client/kbn_client') + .requireMock('@kbn/kbn-client') .KbnClient.mockImplementation(() => ({ version: { get } })); get.mockImplementationOnce(() => Promise.resolve('8.12.0')); @@ -293,7 +293,7 @@ describe('SamlSessionManager', () => { beforeEach(() => { jest.resetAllMocks(); jest - .requireMock('../kbn_client/kbn_client') + .requireMock('@kbn/kbn-client') .KbnClient.mockImplementation(() => ({ version: { get } })); get.mockImplementationOnce(() => Promise.resolve('8.12.0')); diff --git a/src/platform/packages/shared/kbn-test/src/auth/session_manager.ts b/src/platform/packages/shared/kbn-test/src/auth/session_manager.ts index bd9c1834588ea..cb7899cbe6039 100644 --- a/src/platform/packages/shared/kbn-test/src/auth/session_manager.ts +++ b/src/platform/packages/shared/kbn-test/src/auth/session_manager.ts @@ -11,7 +11,7 @@ import type { ToolingLog } from '@kbn/tooling-log'; import Url from 'url'; import type { ServerlessProjectType } from '@kbn/es'; import { createHash } from 'crypto'; -import { KbnClient } from '../kbn_client'; +import { KbnClient } from '@kbn/kbn-client'; import { isValidHostname, readCloudUsersFromFile } from './helper'; import type { Session } from './saml_auth'; import { createCloudSAMLSession, createLocalSAMLSession, getSecurityProfile } from './saml_auth'; diff --git a/src/platform/packages/shared/kbn-test/src/functional_test_runner/lib/dedicated_task_runner.ts b/src/platform/packages/shared/kbn-test/src/functional_test_runner/lib/dedicated_task_runner.ts index ed21abe873b25..17874d22353fe 100644 --- a/src/platform/packages/shared/kbn-test/src/functional_test_runner/lib/dedicated_task_runner.ts +++ b/src/platform/packages/shared/kbn-test/src/functional_test_runner/lib/dedicated_task_runner.ts @@ -12,7 +12,7 @@ import Url from 'url'; import type { ToolingLog } from '@kbn/tooling-log'; import Supertest from 'supertest'; -import { KbnClient } from '../../kbn_client'; +import { KbnClient } from '@kbn/kbn-client'; import type { Config } from './config'; import { getKibanaCliArg } from '../../functional_tests/lib/kibana_cli_args'; diff --git a/src/platform/packages/shared/kbn-test/src/kbn_archiver_cli.ts b/src/platform/packages/shared/kbn-test/src/kbn_archiver_cli.ts index d57b199587169..5030759ea4715 100644 --- a/src/platform/packages/shared/kbn-test/src/kbn_archiver_cli.ts +++ b/src/platform/packages/shared/kbn-test/src/kbn_archiver_cli.ts @@ -13,7 +13,7 @@ import Url from 'url'; import type { Flags } from '@kbn/dev-cli-runner'; import { RunWithCommands } from '@kbn/dev-cli-runner'; import { createFlagError } from '@kbn/dev-cli-errors'; -import { KbnClient } from './kbn_client'; +import { KbnClient } from '@kbn/kbn-client'; import { readConfigFile, EsVersion } from './functional_test_runner'; diff --git a/src/platform/packages/shared/kbn-test/tsconfig.json b/src/platform/packages/shared/kbn-test/tsconfig.json index 63b21012ea27c..c97fd9111397d 100644 --- a/src/platform/packages/shared/kbn-test/tsconfig.json +++ b/src/platform/packages/shared/kbn-test/tsconfig.json @@ -19,6 +19,7 @@ "target/**/*", ], "kbn_references": [ + "@kbn/kbn-client", "@kbn/dev-utils", "@kbn/std", "@kbn/tooling-log", @@ -34,7 +35,6 @@ "@kbn/stdio-dev-helpers", "@kbn/babel-register", "@kbn/repo-packages", - "@kbn/core-saved-objects-api-server", "@kbn/mock-idp-utils", "@kbn/code-owners", "@kbn/scout-reporting", diff --git a/tsconfig.base.json b/tsconfig.base.json index 27dc35b2565b4..f20750c53d33b 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -1298,6 +1298,8 @@ "@kbn/json-ast/*": ["packages/kbn-json-ast/*"], "@kbn/json-schemas": ["x-pack/platform/packages/private/ml/json_schemas"], "@kbn/json-schemas/*": ["x-pack/platform/packages/private/ml/json_schemas/*"], + "@kbn/kbn-client": ["src/platform/packages/shared/kbn-kbn-client"], + "@kbn/kbn-client/*": ["src/platform/packages/shared/kbn-kbn-client/*"], "@kbn/kbn-genai-cli": ["x-pack/solutions/observability/packages/kbn-genai-cli"], "@kbn/kbn-genai-cli/*": ["x-pack/solutions/observability/packages/kbn-genai-cli/*"], "@kbn/kbn-health-gateway-status-plugin": ["src/platform/test/health_gateway/plugins/status"], diff --git a/x-pack/platform/packages/shared/kbn-evals/moon.yml b/x-pack/platform/packages/shared/kbn-evals/moon.yml index 4275a7a991462..b4ed533427189 100644 --- a/x-pack/platform/packages/shared/kbn-evals/moon.yml +++ b/x-pack/platform/packages/shared/kbn-evals/moon.yml @@ -31,6 +31,7 @@ dependsOn: - '@kbn/apm-config-loader' - '@kbn/repo-info' - '@kbn/std' + - '@kbn/kbn-client' - '@kbn/test' - '@kbn/inference-prompt-utils' - '@kbn/tracing-utils' diff --git a/x-pack/platform/packages/shared/kbn-evals/src/utils/http_handler_from_kbn_client.ts b/x-pack/platform/packages/shared/kbn-evals/src/utils/http_handler_from_kbn_client.ts index 4965fe8757e8c..159ed38dc7f56 100644 --- a/x-pack/platform/packages/shared/kbn-evals/src/utils/http_handler_from_kbn_client.ts +++ b/x-pack/platform/packages/shared/kbn-evals/src/utils/http_handler_from_kbn_client.ts @@ -5,8 +5,8 @@ * 2.0. */ import type { HttpFetchOptions, HttpFetchOptionsWithPath, HttpHandler } from '@kbn/core/public'; -import type { KbnClient } from '@kbn/test'; -import { KbnClientRequesterError } from '@kbn/test'; +import type { KbnClient } from '@kbn/kbn-client'; +import { KbnClientRequesterError } from '@kbn/kbn-client'; import type { ToolingLog } from '@kbn/tooling-log'; // redefine args type to make it easier to handle in a type-safe way @@ -19,7 +19,7 @@ type HttpHandlerArgs = /** * Creates a function that matches the HttpHandler interface from Core's - * API, using the KbnClient from @kbn/test + * API, using the KbnClient from @kbn/kbn-client */ export function httpHandlerFromKbnClient({ kbnClient, diff --git a/x-pack/platform/packages/shared/kbn-evals/tsconfig.json b/x-pack/platform/packages/shared/kbn-evals/tsconfig.json index e6509f877aeaf..ed46f7a280a47 100644 --- a/x-pack/platform/packages/shared/kbn-evals/tsconfig.json +++ b/x-pack/platform/packages/shared/kbn-evals/tsconfig.json @@ -28,6 +28,7 @@ "@kbn/apm-config-loader", "@kbn/repo-info", "@kbn/std", + "@kbn/kbn-client", "@kbn/test", "@kbn/inference-prompt-utils", "@kbn/tracing-utils", diff --git a/x-pack/solutions/security/plugins/security_solution/moon.yml b/x-pack/solutions/security/plugins/security_solution/moon.yml index 8e26cc58a7c55..e859c7c9245d7 100644 --- a/x-pack/solutions/security/plugins/security_solution/moon.yml +++ b/x-pack/solutions/security/plugins/security_solution/moon.yml @@ -53,6 +53,7 @@ dependsOn: - '@kbn/securitysolution-list-utils' - '@kbn/securitysolution-io-ts-list-types' - '@kbn/securitysolution-io-ts-alerting-types' + - '@kbn/kbn-client' - '@kbn/test' - '@kbn/std' - '@kbn/rule-data-utils' diff --git a/x-pack/solutions/security/plugins/security_solution/public/management/cypress/support/create_and_enroll_endpoint_host_ci.ts b/x-pack/solutions/security/plugins/security_solution/public/management/cypress/support/create_and_enroll_endpoint_host_ci.ts index c4110ad2b3e0e..96171de6f00cf 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/management/cypress/support/create_and_enroll_endpoint_host_ci.ts +++ b/x-pack/solutions/security/plugins/security_solution/public/management/cypress/support/create_and_enroll_endpoint_host_ci.ts @@ -8,7 +8,7 @@ import type { Client } from '@elastic/elasticsearch'; import type { ToolingLog } from '@kbn/tooling-log'; -import type { KbnClient } from '@kbn/test/src/kbn_client'; +import type { KbnClient } from '@kbn/kbn-client'; import { kibanaPackageJson } from '@kbn/repo-info'; import { isServerlessKibanaFlavor } from '../../../../common/endpoint/utils/kibana_status'; import { fetchFleetLatestAvailableAgentVersion } from '../../../../common/endpoint/utils/fetch_fleet_version'; diff --git a/x-pack/solutions/security/plugins/security_solution/public/management/cypress/tsconfig.json b/x-pack/solutions/security/plugins/security_solution/public/management/cypress/tsconfig.json index 301410f2500ce..0d18c6dccb791 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/management/cypress/tsconfig.json +++ b/x-pack/solutions/security/plugins/security_solution/public/management/cypress/tsconfig.json @@ -21,6 +21,7 @@ "@kbn/cypress-config", "@kbn/test-subj-selector", "@kbn/cases-plugin", + "@kbn/kbn-client", "@kbn/test", "@kbn/repo-info", "@kbn/tooling-log", diff --git a/x-pack/solutions/security/plugins/security_solution/scripts/endpoint/common/stack_services.ts b/x-pack/solutions/security/plugins/security_solution/scripts/endpoint/common/stack_services.ts index 9511127f85cdc..35a72aa13d06d 100644 --- a/x-pack/solutions/security/plugins/security_solution/scripts/endpoint/common/stack_services.ts +++ b/x-pack/solutions/security/plugins/security_solution/scripts/endpoint/common/stack_services.ts @@ -7,10 +7,9 @@ import { Client, HttpConnection } from '@elastic/elasticsearch'; import type { ToolingLog } from '@kbn/tooling-log'; -import type { KbnClientOptions } from '@kbn/test'; -import { KbnClient } from '@kbn/test'; +import type { KbnClientOptions, ReqOptions } from '@kbn/kbn-client'; +import { KbnClient } from '@kbn/kbn-client'; import pRetry from 'p-retry'; -import type { ReqOptions } from '@kbn/test/src/kbn_client/kbn_client_requester'; import { type AxiosResponse } from 'axios'; import type { ClientOptions } from '@elastic/elasticsearch/lib/client'; import fs from 'fs'; diff --git a/x-pack/solutions/security/plugins/security_solution/tsconfig.json b/x-pack/solutions/security/plugins/security_solution/tsconfig.json index 5a80cf2a16239..d70156b2619da 100644 --- a/x-pack/solutions/security/plugins/security_solution/tsconfig.json +++ b/x-pack/solutions/security/plugins/security_solution/tsconfig.json @@ -54,6 +54,7 @@ "@kbn/securitysolution-list-utils", "@kbn/securitysolution-io-ts-list-types", "@kbn/securitysolution-io-ts-alerting-types", + "@kbn/kbn-client", "@kbn/test", "@kbn/std", "@kbn/rule-data-utils", diff --git a/x-pack/solutions/security/test/cloud_security_posture_functional/data_views/data_views.ts b/x-pack/solutions/security/test/cloud_security_posture_functional/data_views/data_views.ts index 6b79827b8ac46..9d3b382c78582 100644 --- a/x-pack/solutions/security/test/cloud_security_posture_functional/data_views/data_views.ts +++ b/x-pack/solutions/security/test/cloud_security_posture_functional/data_views/data_views.ts @@ -16,7 +16,7 @@ import { CDR_VULNERABILITIES_DATA_VIEW_ID_PREFIX_OLD_VERSIONS, CDR_VULNERABILITIES_DATA_VIEW_ID_PREFIX_LEGACY_VERSIONS, } from '@kbn/cloud-security-posture-common'; -import type { KbnClientSavedObjects } from '@kbn/test/src/kbn_client/kbn_client_saved_objects'; +import type { KbnClientSavedObjects } from '@kbn/kbn-client'; import { CLOUD_SECURITY_PLUGIN_VERSION } from '@kbn/cloud-security-posture-common'; import type { FtrProviderContext } from '../ftr_provider_context'; diff --git a/x-pack/solutions/security/test/moon.yml b/x-pack/solutions/security/test/moon.yml index 39222f84db625..0c1d4fc1c11f4 100644 --- a/x-pack/solutions/security/test/moon.yml +++ b/x-pack/solutions/security/test/moon.yml @@ -54,6 +54,7 @@ dependsOn: - '@kbn/cloud-security-posture-graph' - '@kbn/kubernetes-security-plugin' - '@kbn/securitysolution-list-constants' + - '@kbn/kbn-client' tags: - test-helper - package diff --git a/x-pack/solutions/security/test/tsconfig.json b/x-pack/solutions/security/test/tsconfig.json index c750801b804fb..766894201d67c 100644 --- a/x-pack/solutions/security/test/tsconfig.json +++ b/x-pack/solutions/security/test/tsconfig.json @@ -65,5 +65,6 @@ "@kbn/cloud-security-posture-graph", "@kbn/kubernetes-security-plugin", "@kbn/securitysolution-list-constants", + "@kbn/kbn-client", ] } diff --git a/yarn.lock b/yarn.lock index 3b34186f10d1c..739de49d20de5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6885,6 +6885,10 @@ version "0.0.0" uid "" +"@kbn/kbn-client@link:src/platform/packages/shared/kbn-kbn-client": + version "0.0.0" + uid "" + "@kbn/kbn-genai-cli@link:x-pack/solutions/observability/packages/kbn-genai-cli": version "0.0.0" uid "" From 25dbf914eecb0877d0e568a198601e7a20e7c1e7 Mon Sep 17 00:00:00 2001 From: Dzmitry Lemechko Date: Tue, 24 Mar 2026 14:23:57 +0100 Subject: [PATCH 2/2] fix moon.yml --- .../packages/shared/kbn-kbn-client/moon.yml | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/src/platform/packages/shared/kbn-kbn-client/moon.yml b/src/platform/packages/shared/kbn-kbn-client/moon.yml index 44861c5104957..8e1c6343e1a77 100644 --- a/src/platform/packages/shared/kbn-kbn-client/moon.yml +++ b/src/platform/packages/shared/kbn-kbn-client/moon.yml @@ -4,18 +4,19 @@ $schema: https://moonrepo.dev/schemas/project.json id: '@kbn/kbn-client' -layer: unknown +type: unknown owners: defaultOwner: '@elastic/kibana-operations' -toolchains: +toolchain: default: node language: typescript project: - title: '@kbn/kbn-client' + name: '@kbn/kbn-client' description: Moon project for @kbn/kbn-client channel: '' owner: '@elastic/kibana-operations' - sourceRoot: src/platform/packages/shared/kbn-kbn-client + metadata: + sourceRoot: src/platform/packages/shared/kbn-kbn-client dependsOn: - '@kbn/core-saved-objects-api-server' - '@kbn/dev-cli-errors' @@ -35,24 +36,14 @@ fileGroups: - '!target/**/*' tasks: jest: - command: node args: - - '--no-experimental-require-module' - - $workspaceRoot/scripts/jest - '--config' - $projectRoot/jest.config.js - options: - runFromWorkspaceRoot: true inputs: - '@group(src)' jestCI: - command: node args: - - '--no-experimental-require-module' - - $workspaceRoot/scripts/jest - '--config' - $projectRoot/jest.config.js - options: - runFromWorkspaceRoot: true inputs: - '@group(src)'