SKA: Move SharedUX packages under packages/core (#205608)

## Summary

This PR aims at relocating some of the Kibana modules (plugins and
packages) into a new folder structure, according to the _Sustainable
Kibana Architecture_ initiative.

> [!IMPORTANT]
> * We kindly ask you to:
> * Manually fix the errors in the error section below (if there are
any).
> * Search for the `packages[\/\\]` and `plugins[\/\\]` patterns in the
source code (Babel and Eslint config files), and update them
appropriately.
> * Manually review
`.buildkite/scripts/pipelines/pull_request/pipeline.ts` to ensure that
any CI pipeline customizations continue to be correctly applied after
the changed path names
> * Review all of the updated files, specially the `.ts` and `.js` files
listed in the sections below, as some of them contain relative paths
that have been updated.
> * Think of potential impact of the move, including tooling and
configuration files that can be pointing to the relocated modules. E.g.:
>     * customised eslint rules
>     * docs pointing to source code

> [!NOTE]
> * This PR has been auto-generated.
> * Any manual contributions will be lost if the 'relocate' script is
re-run.
> * Try to obtain the missing reviews / approvals before applying manual
fixes, and/or keep your changes in a .patch / git stash.
> * Please use
[#sustainable_kibana_architecture](https://elastic.slack.com/archives/C07TCKTA22E)
Slack channel for feedback.

Are you trying to rebase this PR to solve merge conflicts? Please follow
the steps describe
[here](https://elastic.slack.com/archives/C07TCKTA22E/p1734019532879269?thread_ts=1734019339.935419&cid=C07TCKTA22E).

#### 13 packages(s) are going to be relocated:

| Id | Target folder |
| -- | ------------- |
| `@kbn/core-chrome-browser-internal` |
`src/core/packages/chrome/browser-internal` |
| `@kbn/core-custom-branding-browser` |
`src/core/packages/custom-branding/browser` |
| `@kbn/core-custom-branding-browser-internal` |
`src/core/packages/custom-branding/browser-internal` |
| `@kbn/core-custom-branding-browser-mocks` |
`src/core/packages/custom-branding/browser-mocks` |
| `@kbn/core-custom-branding-common` |
`src/core/packages/custom-branding/common` |
| `@kbn/core-custom-branding-server` |
`src/core/packages/custom-branding/server` |
| `@kbn/core-custom-branding-server-internal` |
`src/core/packages/custom-branding/server-internal` |
| `@kbn/core-custom-branding-server-mocks` |
`src/core/packages/custom-branding/server-mocks` |
| `@kbn/core-ui-settings-browser` |
`src/core/packages/ui-settings/browser` |
| `@kbn/core-ui-settings-browser-internal` |
`src/core/packages/ui-settings/browser-internal` |
| `@kbn/core-ui-settings-common` |
`src/core/packages/ui-settings/common` |
| `@kbn/core-ui-settings-server` |
`src/core/packages/ui-settings/server` |
| `@kbn/core-ui-settings-server-internal` |
`src/core/packages/ui-settings/server-internal` |


<details >
<summary>Updated references</summary>

```
./docs/developer/architecture/core/patterns-scoped-services.asciidoc
./docs/developer/architecture/core/uisettings-service.asciidoc
./package.json
./packages/core/custom-branding/core-custom-branding-common/index.ts
./packages/kbn-ts-projects/config-paths.json
./src/core/packages/chrome/browser-internal/jest.config.js
./src/core/packages/custom-branding/browser-internal/jest.config.js
./src/core/packages/custom-branding/browser-mocks/jest.config.js
./src/core/packages/custom-branding/server-internal/jest.config.js
./src/core/packages/custom-branding/server-mocks/jest.config.js
./src/core/packages/ui-settings/browser-internal/jest.config.js
./src/core/packages/ui-settings/browser/jest.config.js
./src/core/packages/ui-settings/common/jest.config.js
./src/core/packages/ui-settings/server-internal/jest.config.js
./src/core/packages/ui-settings/server/jest.config.js
./src/platform/packages/private/kbn-repo-packages/package-map.json
./tsconfig.base.json
./x-pack/platform/plugins/private/transform/public/app/common/time_zone_utils.ts
./yarn.lock
.github/CODEOWNERS
```

</details><details >
<summary>Updated relative paths</summary>

```
src/core/packages/chrome/browser-internal/jest.config.js:12
src/core/packages/chrome/browser-internal/tsconfig.json:2
src/core/packages/custom-branding/browser-internal/jest.config.js:12
src/core/packages/custom-branding/browser-internal/tsconfig.json:2
src/core/packages/custom-branding/browser-mocks/jest.config.js:12
src/core/packages/custom-branding/browser-mocks/tsconfig.json:2
src/core/packages/custom-branding/browser/tsconfig.json:2
src/core/packages/custom-branding/common/tsconfig.json:2
src/core/packages/custom-branding/server-internal/jest.config.js:12
src/core/packages/custom-branding/server-internal/tsconfig.json:2
src/core/packages/custom-branding/server-mocks/jest.config.js:12
src/core/packages/custom-branding/server-mocks/tsconfig.json:2
src/core/packages/custom-branding/server/tsconfig.json:2
src/core/packages/ui-settings/browser-internal/jest.config.js:12
src/core/packages/ui-settings/browser-internal/tsconfig.json:2
src/core/packages/ui-settings/browser/jest.config.js:12
src/core/packages/ui-settings/browser/tsconfig.json:2
src/core/packages/ui-settings/common/jest.config.js:12
src/core/packages/ui-settings/common/tsconfig.json:2
src/core/packages/ui-settings/server-internal/jest.config.js:12
src/core/packages/ui-settings/server-internal/tsconfig.json:2
src/core/packages/ui-settings/server/jest.config.js:12
src/core/packages/ui-settings/server/tsconfig.json:2
```

</details>

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This commit is contained in:
Eyo O. Eyo 2025-01-07 16:15:56 +01:00 committed by GitHub
parent 2c70e8651e
commit 3bb50f7048
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
249 changed files with 132 additions and 132 deletions

26
.github/CODEOWNERS vendored
View file

@ -61,15 +61,7 @@ packages/core/base/core-base-server-mocks @elastic/kibana-core
packages/core/capabilities/core-capabilities-browser-mocks @elastic/kibana-core
packages/core/capabilities/core-capabilities-server-mocks @elastic/kibana-core
packages/core/chrome/core-chrome-browser @elastic/appex-sharedux
packages/core/chrome/core-chrome-browser-internal @elastic/appex-sharedux
packages/core/chrome/core-chrome-browser-mocks @elastic/appex-sharedux
packages/core/custom-branding/core-custom-branding-browser @elastic/appex-sharedux
packages/core/custom-branding/core-custom-branding-browser-internal @elastic/appex-sharedux
packages/core/custom-branding/core-custom-branding-browser-mocks @elastic/appex-sharedux
packages/core/custom-branding/core-custom-branding-common @elastic/appex-sharedux
packages/core/custom-branding/core-custom-branding-server @elastic/appex-sharedux
packages/core/custom-branding/core-custom-branding-server-internal @elastic/appex-sharedux
packages/core/custom-branding/core-custom-branding-server-mocks @elastic/appex-sharedux
packages/core/deprecations/core-deprecations-browser-mocks @elastic/kibana-core
packages/core/deprecations/core-deprecations-server-mocks @elastic/kibana-core
packages/core/doc-links/core-doc-links-browser-mocks @elastic/kibana-core
@ -113,12 +105,7 @@ packages/core/status/core-status-server-mocks @elastic/kibana-core
packages/core/test-helpers/core-test-helpers-kbn-server @elastic/kibana-core
packages/core/test-helpers/core-test-helpers-model-versions @elastic/kibana-core
packages/core/theme/core-theme-browser-mocks @elastic/kibana-core
packages/core/ui-settings/core-ui-settings-browser @elastic/appex-sharedux
packages/core/ui-settings/core-ui-settings-browser-internal @elastic/appex-sharedux
packages/core/ui-settings/core-ui-settings-browser-mocks @elastic/appex-sharedux
packages/core/ui-settings/core-ui-settings-common @elastic/appex-sharedux
packages/core/ui-settings/core-ui-settings-server @elastic/appex-sharedux
packages/core/ui-settings/core-ui-settings-server-internal @elastic/appex-sharedux
packages/core/ui-settings/core-ui-settings-server-mocks @elastic/appex-sharedux
packages/core/usage-data/core-usage-data-server-mocks @elastic/kibana-core
packages/core/user-settings/core-user-settings-server @elastic/kibana-security
@ -294,7 +281,15 @@ src/core/packages/capabilities/browser-internal @elastic/kibana-core
src/core/packages/capabilities/common @elastic/kibana-core
src/core/packages/capabilities/server @elastic/kibana-core
src/core/packages/capabilities/server-internal @elastic/kibana-core
src/core/packages/chrome/browser-internal @elastic/appex-sharedux
src/core/packages/config/server-internal @elastic/kibana-core
src/core/packages/custom-branding/browser @elastic/appex-sharedux
src/core/packages/custom-branding/browser-internal @elastic/appex-sharedux
src/core/packages/custom-branding/browser-mocks @elastic/appex-sharedux
src/core/packages/custom-branding/common @elastic/appex-sharedux
src/core/packages/custom-branding/server @elastic/appex-sharedux
src/core/packages/custom-branding/server-internal @elastic/appex-sharedux
src/core/packages/custom-branding/server-mocks @elastic/appex-sharedux
src/core/packages/deprecations/browser @elastic/kibana-core
src/core/packages/deprecations/browser-internal @elastic/kibana-core
src/core/packages/deprecations/common @elastic/kibana-core
@ -401,6 +396,11 @@ src/core/packages/test-helpers/so-type-serializer @elastic/kibana-core
src/core/packages/test-helpers/test-utils @elastic/kibana-core
src/core/packages/theme/browser @elastic/kibana-core
src/core/packages/theme/browser-internal @elastic/kibana-core
src/core/packages/ui-settings/browser @elastic/appex-sharedux
src/core/packages/ui-settings/browser-internal @elastic/appex-sharedux
src/core/packages/ui-settings/common @elastic/appex-sharedux
src/core/packages/ui-settings/server @elastic/appex-sharedux
src/core/packages/ui-settings/server-internal @elastic/appex-sharedux
src/core/packages/usage-data/base-server-internal @elastic/kibana-core
src/core/packages/usage-data/server @elastic/kibana-core
src/core/packages/usage-data/server-internal @elastic/kibana-core

View file

@ -20,7 +20,7 @@ The {kib-repo}/blob/8.9/src/core/packages/http/server/src/router/request_handler
* {kib-repo}/blob/8.9/src/core/packages/saved-objects/api-server/src/saved_objects_client.ts[`context.savedObjects.client`]
* {kib-repo}/blob/8.9/src/core/packages/elasticsearch/server/src/client/scoped_cluster_client.ts[`context.elasticsearch.client`]
* {kib-repo}/blob/8.9/packages/core/ui-settings/core-ui-settings-server/src/ui_settings_client.ts[`context.uiSettings.client`]
* {kib-repo}/blob/8.9/src/core/packages/ui-settings/server/src/ui_settings_client.ts[`context.uiSettings.client`]
==== Declare a custom scoped service

View file

@ -38,10 +38,10 @@ uiSettings:
[[client-side-usage]]
=== Client side usage
On the client, the `uiSettings` service is exposed directly from `core` and the {kib-repo}/blob/8.9/packages/core/ui-settings/core-ui-settings-server/src/ui_settings_client.ts[client]
On the client, the `uiSettings` service is exposed directly from `core` and the {kib-repo}/blob/8.9/src/core/packages/ui-settings/server/src/ui_settings_client.ts[client]
provides plugins access to the `config` entries stored in {es}.
In the interest of performance, `uiSettings` are cached. Any changes that require cache refreshes should register an instruction to reload the page when settings are configured in Advanced Settings using the `requiresPageReload` {kib-repo}/blob/8.9/packages/core/ui-settings/core-ui-settings-common/src/ui_settings.ts[parameter].
In the interest of performance, `uiSettings` are cached. Any changes that require cache refreshes should register an instruction to reload the page when settings are configured in Advanced Settings using the `requiresPageReload` {kib-repo}/blob/8.9/src/core/packages/ui-settings/common/src/ui_settings.ts[parameter].
[source,typescript]
----
@ -78,7 +78,7 @@ export class MyPlugin implements Plugin<MyPluginSetup, MyPluginStart> {
=== Server side usage
On the server, `uiSettings` are exposed directly from `core`.
The following example shows how to register a new `custom` setting with a default value of '42'. When registering a new setting, you must provide a schema against which validations are performed on read and write. All the other {kib-repo}/blob/8.9/packages/core/ui-settings/core-ui-settings-common/src/ui_settings.ts[parameters] are optional.
The following example shows how to register a new `custom` setting with a default value of '42'. When registering a new setting, you must provide a schema against which validations are performed on read and write. All the other {kib-repo}/blob/8.9/src/core/packages/ui-settings/common/src/ui_settings.ts[parameters] are optional.
[source,typescript]
----

View file

@ -264,15 +264,15 @@
"@kbn/core-capabilities-server": "link:src/core/packages/capabilities/server",
"@kbn/core-capabilities-server-internal": "link:src/core/packages/capabilities/server-internal",
"@kbn/core-chrome-browser": "link:packages/core/chrome/core-chrome-browser",
"@kbn/core-chrome-browser-internal": "link:packages/core/chrome/core-chrome-browser-internal",
"@kbn/core-chrome-browser-internal": "link:src/core/packages/chrome/browser-internal",
"@kbn/core-config-server-internal": "link:src/core/packages/config/server-internal",
"@kbn/core-custom-branding-browser": "link:packages/core/custom-branding/core-custom-branding-browser",
"@kbn/core-custom-branding-browser-internal": "link:packages/core/custom-branding/core-custom-branding-browser-internal",
"@kbn/core-custom-branding-browser-mocks": "link:packages/core/custom-branding/core-custom-branding-browser-mocks",
"@kbn/core-custom-branding-common": "link:packages/core/custom-branding/core-custom-branding-common",
"@kbn/core-custom-branding-server": "link:packages/core/custom-branding/core-custom-branding-server",
"@kbn/core-custom-branding-server-internal": "link:packages/core/custom-branding/core-custom-branding-server-internal",
"@kbn/core-custom-branding-server-mocks": "link:packages/core/custom-branding/core-custom-branding-server-mocks",
"@kbn/core-custom-branding-browser": "link:src/core/packages/custom-branding/browser",
"@kbn/core-custom-branding-browser-internal": "link:src/core/packages/custom-branding/browser-internal",
"@kbn/core-custom-branding-browser-mocks": "link:src/core/packages/custom-branding/browser-mocks",
"@kbn/core-custom-branding-common": "link:src/core/packages/custom-branding/common",
"@kbn/core-custom-branding-server": "link:src/core/packages/custom-branding/server",
"@kbn/core-custom-branding-server-internal": "link:src/core/packages/custom-branding/server-internal",
"@kbn/core-custom-branding-server-mocks": "link:src/core/packages/custom-branding/server-mocks",
"@kbn/core-deprecations-browser": "link:src/core/packages/deprecations/browser",
"@kbn/core-deprecations-browser-internal": "link:src/core/packages/deprecations/browser-internal",
"@kbn/core-deprecations-common": "link:src/core/packages/deprecations/common",
@ -395,11 +395,11 @@
"@kbn/core-test-helpers-test-utils": "link:src/core/packages/test-helpers/test-utils",
"@kbn/core-theme-browser": "link:src/core/packages/theme/browser",
"@kbn/core-theme-browser-internal": "link:src/core/packages/theme/browser-internal",
"@kbn/core-ui-settings-browser": "link:packages/core/ui-settings/core-ui-settings-browser",
"@kbn/core-ui-settings-browser-internal": "link:packages/core/ui-settings/core-ui-settings-browser-internal",
"@kbn/core-ui-settings-common": "link:packages/core/ui-settings/core-ui-settings-common",
"@kbn/core-ui-settings-server": "link:packages/core/ui-settings/core-ui-settings-server",
"@kbn/core-ui-settings-server-internal": "link:packages/core/ui-settings/core-ui-settings-server-internal",
"@kbn/core-ui-settings-browser": "link:src/core/packages/ui-settings/browser",
"@kbn/core-ui-settings-browser-internal": "link:src/core/packages/ui-settings/browser-internal",
"@kbn/core-ui-settings-common": "link:src/core/packages/ui-settings/common",
"@kbn/core-ui-settings-server": "link:src/core/packages/ui-settings/server",
"@kbn/core-ui-settings-server-internal": "link:src/core/packages/ui-settings/server-internal",
"@kbn/core-usage-data-base-server-internal": "link:src/core/packages/usage-data/base-server-internal",
"@kbn/core-usage-data-server": "link:src/core/packages/usage-data/server",
"@kbn/core-usage-data-server-internal": "link:src/core/packages/usage-data/server-internal",

View file

@ -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: ['<rootDir>/packages/core/custom-branding/core-custom-branding-browser-internal'],
};

View file

@ -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: ['<rootDir>/packages/core/custom-branding/core-custom-branding-browser-mocks'],
};

View file

@ -182,7 +182,7 @@ navigation.addSolutionNavigation({
#### Navigation tree API
> **Warning**
> The API reference is manually maintained and might be out of date. Please refer [to the source](https://github.com/elastic/kibana/blob/main/packages/core/chrome/core-chrome-browser/src/project_navigation.ts) for the most up-to-date information, until we have automated the API reference.
> The API reference is manually maintained and might be out of date. Please refer [to the source](https://github.com/elastic/kibana/blob/main/src/core/packages/chrome/browser/src/project_navigation.ts) for the most up-to-date information, until we have automated the API reference.
##### `NavigationTreeDefinition`

View file

@ -9,6 +9,6 @@
module.exports = {
preset: '@kbn/test',
rootDir: '../../../..',
roots: ['<rootDir>/packages/core/chrome/core-chrome-browser-internal'],
rootDir: '../../../../..',
roots: ['<rootDir>/src/core/packages/chrome/browser-internal'],
};

View file

@ -1,5 +1,5 @@
{
"extends": "../../../../tsconfig.base.json",
"extends": "../../../../../tsconfig.base.json",
"compilerOptions": {
"outDir": "target/types",
"types": [

View file

@ -9,6 +9,6 @@
module.exports = {
preset: '@kbn/test',
rootDir: '../../../..',
roots: ['<rootDir>/packages/core/ui-settings/core-ui-settings-browser-internal'],
rootDir: '../../../../../',
roots: ['<rootDir>/src/core/packages/custom-branding/browser-internal'],
};

View file

@ -1,5 +1,5 @@
{
"extends": "../../../../tsconfig.base.json",
"extends": "../../../../../tsconfig.base.json",
"compilerOptions": {
"outDir": "target/types",
"types": [

View file

@ -9,6 +9,6 @@
module.exports = {
preset: '@kbn/test',
rootDir: '../../../..',
roots: ['<rootDir>/packages/core/ui-settings/core-ui-settings-browser'],
rootDir: '../../../../..',
roots: ['<rootDir>/src/core/packages/custom-branding/browser-mocks'],
};

View file

@ -1,5 +1,5 @@
{
"extends": "../../../../tsconfig.base.json",
"extends": "../../../../../tsconfig.base.json",
"compilerOptions": {
"outDir": "target/types",
"types": [

View file

@ -1,5 +1,5 @@
{
"extends": "../../../../tsconfig.base.json",
"extends": "../../../../../tsconfig.base.json",
"compilerOptions": {
"outDir": "target/types",
"types": [

Some files were not shown because too many files have changed in this diff Show more