Skip to content

Commit

Permalink
SKA: Move SharedUX packages under packages/core (#205608)
Browse files Browse the repository at this point in the history
## 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 <[email protected]>
Co-authored-by: Elastic Machine <[email protected]>
  • Loading branch information
3 people authored Jan 7, 2025
1 parent 2c70e86 commit 3bb50f7
Show file tree
Hide file tree
Showing 249 changed files with 132 additions and 132 deletions.
26 changes: 13 additions & 13 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions docs/developer/architecture/core/uisettings-service.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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]
----
Expand Down Expand Up @@ -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]
----
Expand Down
26 changes: 13 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion packages/shared-ux/chrome/solution_navigation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
};
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../../../tsconfig.base.json",
"extends": "../../../../../tsconfig.base.json",
"compilerOptions": {
"outDir": "target/types",
"types": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
};
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../../../tsconfig.base.json",
"extends": "../../../../../tsconfig.base.json",
"compilerOptions": {
"outDir": "target/types",
"types": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
};
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../../../tsconfig.base.json",
"extends": "../../../../../tsconfig.base.json",
"compilerOptions": {
"outDir": "target/types",
"types": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../../../tsconfig.base.json",
"extends": "../../../../../tsconfig.base.json",
"compilerOptions": {
"outDir": "target/types",
"types": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export interface CustomBranding {
pageTitle?: string;
/**
* Custom replacement for Elastic Mark
* @link packages/core/chrome/core-chrome-browser-internal/src/ui/header/elastic_mark.tsx
* @link src/core/packages/chrome/browser-internal/src/ui/header/elastic_mark.tsx
*/
customizedLogo?: string;
/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../../../tsconfig.base.json",
"extends": "../../../../../tsconfig.base.json",
"compilerOptions": {
"outDir": "target/types",
"types": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@

module.exports = {
preset: '@kbn/test/jest_node',
rootDir: '../../../..',
roots: ['<rootDir>/packages/core/ui-settings/core-ui-settings-server-internal'],
rootDir: '../../../../../',
roots: ['<rootDir>/src/core/packages/custom-branding/server-internal'],
};
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../../../tsconfig.base.json",
"extends": "../../../../../tsconfig.base.json",
"compilerOptions": {
"outDir": "target/types",
"types": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@

module.exports = {
preset: '@kbn/test/jest_node',
rootDir: '../../../..',
roots: ['<rootDir>/packages/core/ui-settings/core-ui-settings-server'],
rootDir: '../../../../..',
roots: ['<rootDir>/src/core/packages/custom-branding/server-mocks'],
};
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../../../tsconfig.base.json",
"extends": "../../../../../tsconfig.base.json",
"compilerOptions": {
"outDir": "target/types",
"types": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../../../tsconfig.base.json",
"extends": "../../../../../tsconfig.base.json",
"compilerOptions": {
"outDir": "target/types",
"types": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@

module.exports = {
preset: '@kbn/test',
rootDir: '../../../..',
roots: ['<rootDir>/packages/core/ui-settings/core-ui-settings-common'],
rootDir: '../../../../..',
roots: ['<rootDir>/src/core/packages/ui-settings/browser-internal'],
};
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ You can use \`IUiSettingsClient.get("${key}", defaultValue)\`, which will just r

isDeclared(key: string) {
return (
// @ts-ignore
// @ts-expect-error
(key !== '__proto__' || key !== 'constructor' || key !== 'prototype') && key in this.cache
);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../../../tsconfig.base.json",
"extends": "../../../../../tsconfig.base.json",
"compilerOptions": {
"outDir": "target/types",
"types": [
Expand Down
14 changes: 14 additions & 0 deletions src/core/packages/ui-settings/browser/jest.config.js
Original file line number Diff line number Diff line change
@@ -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',
rootDir: '../../../../..',
roots: ['<rootDir>/src/core/packages/ui-settings/browser'],
};
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../../../tsconfig.base.json",
"extends": "../../../../../tsconfig.base.json",
"compilerOptions": {
"outDir": "target/types",
"types": [
Expand Down
14 changes: 14 additions & 0 deletions src/core/packages/ui-settings/common/jest.config.js
Original file line number Diff line number Diff line change
@@ -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',
rootDir: '../../../../..',
roots: ['<rootDir>/src/core/packages/ui-settings/common'],
};
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../../../tsconfig.base.json",
"extends": "../../../../../tsconfig.base.json",
"compilerOptions": {
"outDir": "target/types",
"types": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@

module.exports = {
preset: '@kbn/test/jest_node',
rootDir: '../../../..',
roots: ['<rootDir>/packages/core/custom-branding/core-custom-branding-server-mocks'],
rootDir: '../../../../..',
roots: ['<rootDir>/src/core/packages/ui-settings/server-internal'],
};
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../../../tsconfig.base.json",
"extends": "../../../../../tsconfig.base.json",
"compilerOptions": {
"outDir": "target/types",
"types": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@

module.exports = {
preset: '@kbn/test/jest_node',
rootDir: '../../../../',
roots: ['<rootDir>/packages/core/custom-branding/core-custom-branding-server-internal'],
rootDir: '../../../../..',
roots: ['<rootDir>/src/core/packages/ui-settings/server'],
};
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../../../tsconfig.base.json",
"extends": "../../../../../tsconfig.base.json",
"compilerOptions": {
"outDir": "target/types",
"types": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ A `FormRow` represents a single UiSetting, and is responsible for rendering the
## Notes

- This implementation was extracted from the `advancedSettings` plugin.
- The type for a `UiSettingMetadata` is limited due to the permissive nature of the [`UiSettingsParam` type](packages/core/ui-settings/core-ui-settings-common/src/ui_settings.ts).
- The type for a `UiSettingMetadata` is limited due to the permissive nature of the [`UiSettingsParam` type](src/core/packages/ui-settings/common/src/ui_settings.ts).
- The source includes notations of several bugs which will surface if the assumptions about default settings from Kibana change.

## Testing
Expand Down
Loading

0 comments on commit 3bb50f7

Please sign in to comment.