Skip to content

Commit 925e694

Browse files
committed
Merge branch 'master' into move_management_registry_to_new_platfom
2 parents 31305e0 + 5fee62b commit 925e694

File tree

4,805 files changed

+100012
-87141
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

4,805 files changed

+100012
-87141
lines changed

.eslintrc.js

Lines changed: 32 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -197,46 +197,6 @@ module.exports = {
197197
},
198198
},
199199

200-
/**
201-
* Prettier
202-
*/
203-
{
204-
files: [
205-
'.eslintrc.js',
206-
'packages/kbn-utility-types/**/*',
207-
'packages/kbn-eslint-plugin-eslint/**/*',
208-
'packages/kbn-config-schema/**/*',
209-
'packages/kbn-pm/**/*',
210-
'packages/kbn-es/**/*',
211-
'packages/elastic-datemath/**/*',
212-
'packages/kbn-i18n/**/*',
213-
'packages/kbn-dev-utils/**/*',
214-
'packages/kbn-plugin-helpers/**/*',
215-
'packages/kbn-plugin-generator/**/*',
216-
'packages/kbn-test-subj-selector/**/*',
217-
'packages/kbn-test/**/*',
218-
'packages/kbn-eslint-import-resolver-kibana/**/*',
219-
'src/legacy/server/saved_objects/**/*',
220-
'x-pack/legacy/plugins/apm/**/*',
221-
'x-pack/legacy/plugins/canvas/**/*',
222-
'**/*.{ts,tsx}',
223-
'src/legacy/core_plugins/metrics/**/*.js',
224-
],
225-
plugins: ['prettier'],
226-
rules: Object.assign(
227-
{
228-
'prettier/prettier': [
229-
'error',
230-
{
231-
endOfLine: 'auto',
232-
},
233-
],
234-
},
235-
require('eslint-config-prettier').rules,
236-
require('eslint-config-prettier/react').rules
237-
),
238-
},
239-
240200
/**
241201
* Files that require Apache 2.0 headers, settings
242202
* are overridden below for files that require Elastic
@@ -297,7 +257,8 @@ module.exports = {
297257
'src/legacy/**/*',
298258
'x-pack/**/*',
299259
'!x-pack/**/*.test.*',
300-
'src/plugins/**/(public|server)/**/*',
260+
'!x-pack/test/**/*',
261+
'(src|x-pack)/plugins/**/(public|server)/**/*',
301262
'src/core/(public|server)/**/*',
302263
],
303264
from: [
@@ -317,16 +278,35 @@ module.exports = {
317278
'!src/core/server/types',
318279
'!src/core/server/*.test.mocks.ts',
319280

320-
'src/plugins/**/public/**/*',
321-
'!src/plugins/**/public/index.{js,ts,tsx}',
322-
323-
'src/plugins/**/server/**/*',
324-
'!src/plugins/**/server/index.{js,ts,tsx}',
281+
'(src|x-pack)/plugins/**/(public|server)/**/*',
282+
'!(src|x-pack)/plugins/**/(public|server)/(index|mocks).{js,ts,tsx}',
325283
],
326284
allowSameFolder: true,
285+
errorMessage: 'Plugins may only import from top-level public and server modules.',
327286
},
328287
{
329-
target: ['src/core/**/*'],
288+
target: [
289+
'(src|x-pack)/plugins/**/*',
290+
'!(src|x-pack)/plugins/*/server/**/*',
291+
292+
'src/legacy/core_plugins/**/*',
293+
'!src/legacy/core_plugins/*/server/**/*',
294+
'!src/legacy/core_plugins/*/index.{js,ts,tsx}',
295+
296+
'x-pack/legacy/plugins/**/*',
297+
'!x-pack/legacy/plugins/*/server/**/*',
298+
'!x-pack/legacy/plugins/*/index.{js,ts,tsx}',
299+
],
300+
from: [
301+
'src/core/server',
302+
'src/core/server/**/*',
303+
'(src|x-pack)/plugins/*/server/**/*',
304+
],
305+
errorMessage:
306+
'Server modules cannot be imported into client modules or shared modules.',
307+
},
308+
{
309+
target: ['src/**/*'],
330310
from: ['x-pack/**/*'],
331311
errorMessage: 'OSS cannot import x-pack files.',
332312
},
@@ -340,6 +320,11 @@ module.exports = {
340320
],
341321
errorMessage: 'The core cannot depend on any plugins.',
342322
},
323+
{
324+
target: ['(src|x-pack)/plugins/*/public/**/*'],
325+
from: ['ui/**/*', 'uiExports/**/*'],
326+
errorMessage: 'Plugins cannot import legacy UI code.',
327+
},
343328
{
344329
from: ['src/legacy/ui/**/*', 'ui/**/*'],
345330
target: [

.github/CODEOWNERS

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,20 +80,19 @@
8080
/x-pack/plugins/licensing/ @elastic/kibana-platform
8181
/packages/kbn-config-schema/ @elastic/kibana-platform
8282
/src/legacy/server/config/ @elastic/kibana-platform
83-
/src/legacy/server/csp/ @elastic/kibana-platform
8483
/src/legacy/server/http/ @elastic/kibana-platform
8584
/src/legacy/server/i18n/ @elastic/kibana-platform
8685
/src/legacy/server/logging/ @elastic/kibana-platform
8786
/src/legacy/server/saved_objects/ @elastic/kibana-platform
8887
/src/legacy/server/status/ @elastic/kibana-platform
8988

9089
# Security
90+
/src/core/server/csp/ @elastic/kibana-security @elastic/kibana-platform
9191
/x-pack/legacy/plugins/security/ @elastic/kibana-security
9292
/x-pack/legacy/plugins/spaces/ @elastic/kibana-security
9393
/x-pack/plugins/spaces/ @elastic/kibana-security
9494
/x-pack/legacy/plugins/encrypted_saved_objects/ @elastic/kibana-security
9595
/x-pack/plugins/encrypted_saved_objects/ @elastic/kibana-security
96-
/src/legacy/server/csp/ @elastic/kibana-security
9796
/x-pack/plugins/security/ @elastic/kibana-security
9897
/x-pack/test/api_integration/apis/security/ @elastic/kibana-security
9998

.github/labeler.yml

Lines changed: 0 additions & 13 deletions
This file was deleted.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
on:
2+
pull_request:
3+
types: [labeled, unlabeled]
4+
5+
jobs:
6+
assign_to_project:
7+
runs-on: ubuntu-latest
8+
name: Assign a PR to project based on label
9+
steps:
10+
- name: Assign to project
11+
uses: elastic/github-actions/[email protected]
12+
id: project_assigner
13+
with:
14+
issue-mappings: '[{"label": "Team:AppAch", "projectName": "kibana-app-arch", "columnId": 6173897}]'
15+
ghToken: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
on:
2+
issues:
3+
types: [labeled, unlabeled]
4+
5+
jobs:
6+
assign_to_project:
7+
runs-on: ubuntu-latest
8+
name: Assign issue or PR to project based on label
9+
steps:
10+
- name: Assign to project
11+
uses: elastic/github-actions/[email protected]
12+
id: project_assigner
13+
with:
14+
issue-mappings: '[{"label": "Team:AppArch", "projectName": "kibana-app-arch", "columnId": 6173895}]'
15+
ghToken: ${{ secrets.GITHUB_TOKEN }}
16+
17+

Gruntfile.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
require('./src/setup_node_env');
2121

22-
module.exports = function (grunt) {
22+
module.exports = function(grunt) {
2323
// set the config once before calling load-grunt-config
2424
// and once during so that we have access to it via
2525
// grunt.config.get() within the config files
@@ -35,8 +35,8 @@ module.exports = function (grunt) {
3535
init: true,
3636
config: config,
3737
loadGruntTasks: {
38-
pattern: ['grunt-*', '@*/grunt-*', 'gruntify-*', '@*/gruntify-*']
39-
}
38+
pattern: ['grunt-*', '@*/grunt-*', 'gruntify-*', '@*/gruntify-*'],
39+
},
4040
});
4141

4242
// load task definitions

docs/development/core/public/kibana-plugin-public.appmountparameters.appbasepath.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ export class MyPlugin implements Plugin {
2222
setup({ application }) {
2323
application.register({
2424
id: 'my-app',
25-
async mount(context, params) {
25+
async mount(params) {
2626
const { renderApp } = await import('./application');
27-
return renderApp(context, params);
27+
return renderApp(params);
2828
},
2929
});
3030
}
@@ -38,7 +38,10 @@ import React from 'react';
3838
import ReactDOM from 'react-dom';
3939
import { BrowserRouter, Route } from 'react-router-dom';
4040

41-
export renderApp = (context, { appBasePath, element }) => {
41+
import { CoreStart, AppMountParams } from 'src/core/public';
42+
import { MyPluginDepsStart } from './plugin';
43+
44+
export renderApp = ({ appBasePath, element }: AppMountParams) => {
4245
ReactDOM.render(
4346
// pass `appBasePath` to `basename`
4447
<BrowserRouter basename={appBasePath}>

docs/development/core/public/kibana-plugin-public.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,13 @@ The plugin integrates with the core system via lifecycle events: `setup`<!-- -->
8989
| [SavedObjectsCreateOptions](./kibana-plugin-public.savedobjectscreateoptions.md) | |
9090
| [SavedObjectsFindOptions](./kibana-plugin-public.savedobjectsfindoptions.md) | |
9191
| [SavedObjectsFindResponsePublic](./kibana-plugin-public.savedobjectsfindresponsepublic.md) | Return type of the Saved Objects <code>find()</code> method.<!-- -->\*Note\*: this type is different between the Public and Server Saved Objects clients. |
92+
| [SavedObjectsImportConflictError](./kibana-plugin-public.savedobjectsimportconflicterror.md) | Represents a failure to import due to a conflict. |
93+
| [SavedObjectsImportError](./kibana-plugin-public.savedobjectsimporterror.md) | Represents a failure to import. |
94+
| [SavedObjectsImportMissingReferencesError](./kibana-plugin-public.savedobjectsimportmissingreferenceserror.md) | Represents a failure to import due to missing references. |
95+
| [SavedObjectsImportResponse](./kibana-plugin-public.savedobjectsimportresponse.md) | The response describing the result of an import. |
96+
| [SavedObjectsImportRetry](./kibana-plugin-public.savedobjectsimportretry.md) | Describes a retry operation for importing a saved object. |
97+
| [SavedObjectsImportUnknownError](./kibana-plugin-public.savedobjectsimportunknownerror.md) | Represents a failure to import due to an unknown reason. |
98+
| [SavedObjectsImportUnsupportedTypeError](./kibana-plugin-public.savedobjectsimportunsupportedtypeerror.md) | Represents a failure to import due to having an unsupported saved object type. |
9299
| [SavedObjectsMigrationVersion](./kibana-plugin-public.savedobjectsmigrationversion.md) | Information about the migrations that have been applied to this SavedObject. When Kibana starts up, KibanaMigrator detects outdated documents and migrates them based on this value. For each migration that has been applied, the plugin's name is used as a key and the latest migration version as the value. |
93100
| [SavedObjectsStart](./kibana-plugin-public.savedobjectsstart.md) | |
94101
| [SavedObjectsUpdateOptions](./kibana-plugin-public.savedobjectsupdateoptions.md) | |

docs/development/core/public/kibana-plugin-public.savedobjectsclient.find.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ Search for objects
99
<b>Signature:</b>
1010

1111
```typescript
12-
find: <T extends SavedObjectAttributes>(options: Pick<SavedObjectFindOptionsServer, "search" | "filter" | "type" | "page" | "fields" | "searchFields" | "defaultSearchOperator" | "hasReference" | "sortField" | "perPage">) => Promise<SavedObjectsFindResponsePublic<T>>;
12+
find: <T extends SavedObjectAttributes>(options: Pick<SavedObjectFindOptionsServer, "search" | "filter" | "type" | "page" | "perPage" | "sortField" | "fields" | "searchFields" | "hasReference" | "defaultSearchOperator">) => Promise<SavedObjectsFindResponsePublic<T>>;
1313
```

docs/development/core/public/kibana-plugin-public.savedobjectsclient.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export declare class SavedObjectsClient
2020
| [bulkGet](./kibana-plugin-public.savedobjectsclient.bulkget.md) | | <code>(objects?: {</code><br/><code> id: string;</code><br/><code> type: string;</code><br/><code> }[]) =&gt; Promise&lt;SavedObjectsBatchResponse&lt;SavedObjectAttributes&gt;&gt;</code> | Returns an array of objects by id |
2121
| [create](./kibana-plugin-public.savedobjectsclient.create.md) | | <code>&lt;T extends SavedObjectAttributes&gt;(type: string, attributes: T, options?: SavedObjectsCreateOptions) =&gt; Promise&lt;SimpleSavedObject&lt;T&gt;&gt;</code> | Persists an object |
2222
| [delete](./kibana-plugin-public.savedobjectsclient.delete.md) | | <code>(type: string, id: string) =&gt; Promise&lt;{}&gt;</code> | Deletes an object |
23-
| [find](./kibana-plugin-public.savedobjectsclient.find.md) | | <code>&lt;T extends SavedObjectAttributes&gt;(options: Pick&lt;SavedObjectFindOptionsServer, &quot;search&quot; &#124; &quot;filter&quot; &#124; &quot;type&quot; &#124; &quot;page&quot; &#124; &quot;fields&quot; &#124; &quot;searchFields&quot; &#124; &quot;defaultSearchOperator&quot; &#124; &quot;hasReference&quot; &#124; &quot;sortField&quot; &#124; &quot;perPage&quot;&gt;) =&gt; Promise&lt;SavedObjectsFindResponsePublic&lt;T&gt;&gt;</code> | Search for objects |
23+
| [find](./kibana-plugin-public.savedobjectsclient.find.md) | | <code>&lt;T extends SavedObjectAttributes&gt;(options: Pick&lt;SavedObjectFindOptionsServer, &quot;search&quot; &#124; &quot;filter&quot; &#124; &quot;type&quot; &#124; &quot;page&quot; &#124; &quot;perPage&quot; &#124; &quot;sortField&quot; &#124; &quot;fields&quot; &#124; &quot;searchFields&quot; &#124; &quot;hasReference&quot; &#124; &quot;defaultSearchOperator&quot;&gt;) =&gt; Promise&lt;SavedObjectsFindResponsePublic&lt;T&gt;&gt;</code> | Search for objects |
2424
| [get](./kibana-plugin-public.savedobjectsclient.get.md) | | <code>&lt;T extends SavedObjectAttributes&gt;(type: string, id: string) =&gt; Promise&lt;SimpleSavedObject&lt;T&gt;&gt;</code> | Fetches a single object |
2525

2626
## Methods

0 commit comments

Comments
 (0)