Skip to content

Commit

Permalink
Relocate @kbn/core inside src/core/packages/core
Browse files Browse the repository at this point in the history
  • Loading branch information
gsoldevila committed Dec 20, 2024
1 parent fecc6d5 commit d0b6a5e
Show file tree
Hide file tree
Showing 310 changed files with 549 additions and 543 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -euo pipefail
source .buildkite/scripts/common/util.sh

echo --- Check SO definition changes
cmd="node scripts/jest_integration -u src/core/server/integration_tests/ci_checks"
cmd="node scripts/jest_integration -u src/core/packages/core/server/integration_tests/ci_checks"

eval "$cmd"
check_for_changed_files "$cmd" true
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -1915,7 +1915,7 @@ module.exports = {
{
files: [
// core-team owned code
'src/core/**',
'src/core/packages/core/**',
'x-pack/plugins/features/**',
'x-pack/plugins/licensing/**',
'x-pack/plugins/global_search/**',
Expand Down
6 changes: 3 additions & 3 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -1822,7 +1822,7 @@ packages/kbn-monaco/src/esql @elastic/kibana-esql
/x-pack/test_serverless/api_integration/test_suites/**/telemetry/ @elastic/kibana-core
/x-pack/test/functional/es_archives/cases/migrations/8.8.0 @elastic/response-ops

#CC# /src/core/server/csp/ @elastic/kibana-core
#CC# /src/core/packages/core/server/csp/ @elastic/kibana-core
#CC# /src/plugins/saved_objects/ @elastic/kibana-core
#CC# /x-pack/plugins/cloud/ @elastic/kibana-core
#CC# /x-pack/plugins/features/ @elastic/kibana-core
Expand All @@ -1848,7 +1848,7 @@ x-pack/plugins/cloud_integrations/cloud_full_story/server/config.ts @elastic/kib

# Kibana Localization
/src/dev/i18n_tools/ @elastic/kibana-localization @elastic/kibana-core
/src/core/public/i18n/ @elastic/kibana-localization @elastic/kibana-core
/src/core/packages/core/public/i18n/ @elastic/kibana-localization @elastic/kibana-core
#CC# /x-pack/platform/plugins/private/translations/ @elastic/kibana-localization @elastic/kibana-core

# Kibana Platform Security
Expand Down Expand Up @@ -1887,7 +1887,7 @@ x-pack/plugins/cloud_integrations/cloud_full_story/server/config.ts @elastic/kib
/.github/workflows/codeql.yml @elastic/kibana-security
/.github/workflows/codeql-stats.yml @elastic/kibana-security
/src/dev/eslint/security_eslint_rule_tests.ts @elastic/kibana-security
/src/core/server/integration_tests/config/check_dynamic_config.test.ts @elastic/kibana-security
/src/core/packages/core/server/integration_tests/config/check_dynamic_config.test.ts @elastic/kibana-security
/src/plugins/telemetry/server/config/telemetry_labels.ts @elastic/kibana-security
/packages/kbn-std/src/is_internal_url.test.ts @elastic/kibana-core @elastic/kibana-security
/packages/kbn-std/src/is_internal_url.ts @elastic/kibana-core @elastic/kibana-security
Expand Down
2 changes: 1 addition & 1 deletion STYLEGUIDE.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ Doing so ensures the styles are never separated or lost on import and allows
for better modularization (smaller individual plugin asset footprint).
All SASS (.scss) files will automatically build with the [EUI](https://elastic.github.io/eui/#/guidelines/sass)
& Kibana invisibles (SASS variables, mixins, functions) from the [`globals_[theme].scss` file](src/core/public/styles/core_app/_globals_v8light.scss).
& Kibana invisibles (SASS variables, mixins, functions) from the [`globals_[theme].scss` file](src/core/packages/core/public/styles/core_app/_globals_v8light.scss).
While the styles for this component will only be loaded if the component exists on the page,
the styles **will** be global and so it is recommended to use a three letter prefix on your
Expand Down
2 changes: 1 addition & 1 deletion dev_docs/getting_started/hello_world_plugin.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ And add the following to it:
],
"exclude": [],
"references": [
{ "path": "../../src/core/tsconfig.json" }
{ "path": "../../src/core/packages/core/tsconfig.json" }
]
}
```
Expand Down
2 changes: 1 addition & 1 deletion dev_docs/key_concepts/anatomy_of_a_plugin.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ If you are developing in TypeScript (which we recommend), you will need to add a
],
"exclude": [],
// If you import another plugin's types, point to their `tsconfig.json` file.
"references": [{ "path": "../../src/core/tsconfig.json" }]
"references": [{ "path": "../../src/core/packages/core/tsconfig.json" }]
}
```

Expand Down
4 changes: 2 additions & 2 deletions dev_docs/tutorials/advanced_settings.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ To change or remove a `uiSetting`, you must migrate the whole `config` Saved Obj

For example, in 7.9.0, `siem` as renamed to `securitySolution`, and in 8.0.0, `theme:version` was removed:

**src/core/server/ui_settings/saved_objects/migrations.ts**
**src/core/packages/core/server/ui_settings/saved_objects/migrations.ts**

```ts
import { SavedObjectUnsanitizedDoc, SavedObjectSanitizedDoc } from '@kbn/core/server';
Expand Down Expand Up @@ -271,4 +271,4 @@ first upgraded. Note that you might need to add an extra attribute to verify tha
applied again in the future.

For example, we needed to transform the `defaultIndex` attribute, and we added an extra `isDefaultIndexMigrated` attribute for this purpose.
See `src/core/server/ui_settings/saved_objects/transforms.ts` and [#13339](https://github.com/elastic/kibana/pull/133339) for an example.
See `src/core/packages/core/server/ui_settings/saved_objects/transforms.ts` and [#13339](https://github.com/elastic/kibana/pull/133339) for an example.
12 changes: 6 additions & 6 deletions dev_docs/tutorials/saved_objects.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The folder should contain a file per type, named after the snake_case name of th
**src/plugins/my_plugin/server/saved_objects/dashboard_visualization.ts**

```ts
import { SavedObjectsType } from 'src/core/server';
import { SavedObjectsType } from 'src/core/packages/core/server';

export const dashboardVisualization: SavedObjectsType = {
name: 'dashboard_visualization', [1]
Expand Down Expand Up @@ -79,7 +79,7 @@ For example, the mappings defined by the dashboard_visualization Saved Object ty
**src/plugins/my_plugin/server/saved_objects/dashboard_visualization.ts**

```ts
import { SavedObjectsType } from 'src/core/server';
import { SavedObjectsType } from 'src/core/packages/core/server';

export const dashboardVisualization: SavedObjectsType = {
name: 'dashboard_visualization',
Expand Down Expand Up @@ -126,8 +126,8 @@ Do not use field mappings like you would use data types for the columns of a SQL
SQL index. Only specify field mappings for the fields you wish to search on or query. By specifying `dynamic: false`
in any level of your mappings, Elasticsearch will accept and store any other fields even if they are not specified in your mappings.

Never use `enabled: false` or `index: false` in your mappings. Elasticsearch does not support toggling these mapping options, so if
your plugin ever needs to query the data, you will not be able to do so. Since these fields cannot be queried, they would require
Never use `enabled: false` or `index: false` in your mappings. Elasticsearch does not support toggling these mapping options, so if
your plugin ever needs to query the data, you will not be able to do so. Since these fields cannot be queried, they would require
migrating to a new field and making associated code changes. Instead, use `dynamic: false` which provides the same flexibility while
maintaining the future ability to query fields if necessary.

Expand Down Expand Up @@ -233,7 +233,7 @@ The first version must be numbered as version 1, incrementing by one for each ne

```ts
import { schema } from '@kbn/config-schema';
import { SavedObjectsType } from 'src/core/server';
import { SavedObjectsType } from 'src/core/packages/core/server';


const schemaV1 = schema.object({ title: schema.string({ maxLength: 50, minLength: 1 }) });
Expand Down Expand Up @@ -339,7 +339,7 @@ For complete control over your HTTP APIs and custom handling, declare your type
The other option that allows you to build your own HTTP APIs and still use the client as-is is to declare your type as hidden from the global saved objects HTTP APIs as `hiddenFromHttpApis: true`

```ts
import { SavedObjectsType } from 'src/core/server';
import { SavedObjectsType } from 'src/core/packages/core/server';

export const foo: SavedObjectsType = {
name: 'foo',
Expand Down
2 changes: 1 addition & 1 deletion dev_docs/tutorials/screenshotting/screenshotting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Here is an example of how you can take a screenshot of a Kibana URL.

```typescript
import { lastValueFrom } from 'rxjs';
import type { CoreSetup, Plugin } from 'src/core/server';
import type { CoreSetup, Plugin } from 'src/core/packages/core/server';
import type { ScreenshottingStart } from 'x-pack/plugins/screenshotting/server';


Expand Down
Loading

0 comments on commit d0b6a5e

Please sign in to comment.