[7.x] Add lint rule to prevent server code being imported into… (#53019)

This commit is contained in:
Josh Dover 2019-12-16 16:46:07 -06:00 committed by GitHub
parent cf21b2dd15
commit 55f24fbacc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
117 changed files with 645 additions and 87 deletions

View file

@ -263,7 +263,8 @@ module.exports = {
'src/legacy/**/*',
'x-pack/**/*',
'!x-pack/**/*.test.*',
'src/plugins/**/(public|server)/**/*',
'!x-pack/test/**/*',
'(src|x-pack)/plugins/**/(public|server)/**/*',
'src/core/(public|server)/**/*',
],
from: [
@ -283,13 +284,32 @@ module.exports = {
'!src/core/server/types',
'!src/core/server/*.test.mocks.ts',
'src/plugins/**/public/**/*',
'!src/plugins/**/public/index.{js,ts,tsx}',
'src/plugins/**/server/**/*',
'!src/plugins/**/server/index.{js,ts,tsx}',
'(src|x-pack)/plugins/**/(public|server)/**/*',
'!(src|x-pack)/plugins/**/(public|server)/(index|mocks).{js,ts,tsx}',
],
allowSameFolder: true,
errorMessage: 'Plugins may only import from top-level public and server modules.',
},
{
target: [
'(src|x-pack)/plugins/**/*',
'!(src|x-pack)/plugins/*/server/**/*',
'src/legacy/core_plugins/**/*',
'!src/legacy/core_plugins/*/server/**/*',
'!src/legacy/core_plugins/*/index.{js,ts,tsx}',
'x-pack/legacy/plugins/**/*',
'!x-pack/legacy/plugins/*/server/**/*',
'!x-pack/legacy/plugins/*/index.{js,ts,tsx}',
],
from: [
'src/core/server',
'src/core/server/**/*',
'(src|x-pack)/plugins/*/server/**/*',
],
errorMessage:
'Server modules cannot be imported into client modules or shared modules.',
},
{
target: ['src/**/*'],
@ -306,6 +326,11 @@ module.exports = {
],
errorMessage: 'The core cannot depend on any plugins.',
},
{
target: ['(src|x-pack)/plugins/*/public/**/*'],
from: ['ui/**/*', 'uiExports/**/*'],
errorMessage: 'Plugins cannot import legacy UI code.',
},
{
from: ['src/legacy/ui/**/*', 'ui/**/*'],
target: [

View file

@ -89,6 +89,13 @@ The plugin integrates with the core system via lifecycle events: `setup`<!-- -->
| [SavedObjectsCreateOptions](./kibana-plugin-public.savedobjectscreateoptions.md) | |
| [SavedObjectsFindOptions](./kibana-plugin-public.savedobjectsfindoptions.md) | |
| [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. |
| [SavedObjectsImportConflictError](./kibana-plugin-public.savedobjectsimportconflicterror.md) | Represents a failure to import due to a conflict. |
| [SavedObjectsImportError](./kibana-plugin-public.savedobjectsimporterror.md) | Represents a failure to import. |
| [SavedObjectsImportMissingReferencesError](./kibana-plugin-public.savedobjectsimportmissingreferenceserror.md) | Represents a failure to import due to missing references. |
| [SavedObjectsImportResponse](./kibana-plugin-public.savedobjectsimportresponse.md) | The response describing the result of an import. |
| [SavedObjectsImportRetry](./kibana-plugin-public.savedobjectsimportretry.md) | Describes a retry operation for importing a saved object. |
| [SavedObjectsImportUnknownError](./kibana-plugin-public.savedobjectsimportunknownerror.md) | Represents a failure to import due to an unknown reason. |
| [SavedObjectsImportUnsupportedTypeError](./kibana-plugin-public.savedobjectsimportunsupportedtypeerror.md) | Represents a failure to import due to having an unsupported saved object type. |
| [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. |
| [SavedObjectsStart](./kibana-plugin-public.savedobjectsstart.md) | |
| [SavedObjectsUpdateOptions](./kibana-plugin-public.savedobjectsupdateoptions.md) | |

View file

@ -0,0 +1,20 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [SavedObjectsImportConflictError](./kibana-plugin-public.savedobjectsimportconflicterror.md)
## SavedObjectsImportConflictError interface
Represents a failure to import due to a conflict.
<b>Signature:</b>
```typescript
export interface SavedObjectsImportConflictError
```
## Properties
| Property | Type | Description |
| --- | --- | --- |
| [type](./kibana-plugin-public.savedobjectsimportconflicterror.type.md) | <code>'conflict'</code> | |

View file

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [SavedObjectsImportConflictError](./kibana-plugin-public.savedobjectsimportconflicterror.md) &gt; [type](./kibana-plugin-public.savedobjectsimportconflicterror.type.md)
## SavedObjectsImportConflictError.type property
<b>Signature:</b>
```typescript
type: 'conflict';
```

View file

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [SavedObjectsImportError](./kibana-plugin-public.savedobjectsimporterror.md) &gt; [error](./kibana-plugin-public.savedobjectsimporterror.error.md)
## SavedObjectsImportError.error property
<b>Signature:</b>
```typescript
error: SavedObjectsImportConflictError | SavedObjectsImportUnsupportedTypeError | SavedObjectsImportMissingReferencesError | SavedObjectsImportUnknownError;
```

View file

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [SavedObjectsImportError](./kibana-plugin-public.savedobjectsimporterror.md) &gt; [id](./kibana-plugin-public.savedobjectsimporterror.id.md)
## SavedObjectsImportError.id property
<b>Signature:</b>
```typescript
id: string;
```

View file

@ -0,0 +1,23 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [SavedObjectsImportError](./kibana-plugin-public.savedobjectsimporterror.md)
## SavedObjectsImportError interface
Represents a failure to import.
<b>Signature:</b>
```typescript
export interface SavedObjectsImportError
```
## Properties
| Property | Type | Description |
| --- | --- | --- |
| [error](./kibana-plugin-public.savedobjectsimporterror.error.md) | <code>SavedObjectsImportConflictError &#124; SavedObjectsImportUnsupportedTypeError &#124; SavedObjectsImportMissingReferencesError &#124; SavedObjectsImportUnknownError</code> | |
| [id](./kibana-plugin-public.savedobjectsimporterror.id.md) | <code>string</code> | |
| [title](./kibana-plugin-public.savedobjectsimporterror.title.md) | <code>string</code> | |
| [type](./kibana-plugin-public.savedobjectsimporterror.type.md) | <code>string</code> | |

View file

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [SavedObjectsImportError](./kibana-plugin-public.savedobjectsimporterror.md) &gt; [title](./kibana-plugin-public.savedobjectsimporterror.title.md)
## SavedObjectsImportError.title property
<b>Signature:</b>
```typescript
title?: string;
```

View file

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [SavedObjectsImportError](./kibana-plugin-public.savedobjectsimporterror.md) &gt; [type](./kibana-plugin-public.savedobjectsimporterror.type.md)
## SavedObjectsImportError.type property
<b>Signature:</b>
```typescript
type: string;
```

View file

@ -0,0 +1,14 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [SavedObjectsImportMissingReferencesError](./kibana-plugin-public.savedobjectsimportmissingreferenceserror.md) &gt; [blocking](./kibana-plugin-public.savedobjectsimportmissingreferenceserror.blocking.md)
## SavedObjectsImportMissingReferencesError.blocking property
<b>Signature:</b>
```typescript
blocking: Array<{
type: string;
id: string;
}>;
```

View file

@ -0,0 +1,22 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [SavedObjectsImportMissingReferencesError](./kibana-plugin-public.savedobjectsimportmissingreferenceserror.md)
## SavedObjectsImportMissingReferencesError interface
Represents a failure to import due to missing references.
<b>Signature:</b>
```typescript
export interface SavedObjectsImportMissingReferencesError
```
## Properties
| Property | Type | Description |
| --- | --- | --- |
| [blocking](./kibana-plugin-public.savedobjectsimportmissingreferenceserror.blocking.md) | <code>Array&lt;{</code><br/><code> type: string;</code><br/><code> id: string;</code><br/><code> }&gt;</code> | |
| [references](./kibana-plugin-public.savedobjectsimportmissingreferenceserror.references.md) | <code>Array&lt;{</code><br/><code> type: string;</code><br/><code> id: string;</code><br/><code> }&gt;</code> | |
| [type](./kibana-plugin-public.savedobjectsimportmissingreferenceserror.type.md) | <code>'missing_references'</code> | |

View file

@ -0,0 +1,14 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [SavedObjectsImportMissingReferencesError](./kibana-plugin-public.savedobjectsimportmissingreferenceserror.md) &gt; [references](./kibana-plugin-public.savedobjectsimportmissingreferenceserror.references.md)
## SavedObjectsImportMissingReferencesError.references property
<b>Signature:</b>
```typescript
references: Array<{
type: string;
id: string;
}>;
```

View file

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [SavedObjectsImportMissingReferencesError](./kibana-plugin-public.savedobjectsimportmissingreferenceserror.md) &gt; [type](./kibana-plugin-public.savedobjectsimportmissingreferenceserror.type.md)
## SavedObjectsImportMissingReferencesError.type property
<b>Signature:</b>
```typescript
type: 'missing_references';
```

View file

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [SavedObjectsImportResponse](./kibana-plugin-public.savedobjectsimportresponse.md) &gt; [errors](./kibana-plugin-public.savedobjectsimportresponse.errors.md)
## SavedObjectsImportResponse.errors property
<b>Signature:</b>
```typescript
errors?: SavedObjectsImportError[];
```

View file

@ -0,0 +1,22 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [SavedObjectsImportResponse](./kibana-plugin-public.savedobjectsimportresponse.md)
## SavedObjectsImportResponse interface
The response describing the result of an import.
<b>Signature:</b>
```typescript
export interface SavedObjectsImportResponse
```
## Properties
| Property | Type | Description |
| --- | --- | --- |
| [errors](./kibana-plugin-public.savedobjectsimportresponse.errors.md) | <code>SavedObjectsImportError[]</code> | |
| [success](./kibana-plugin-public.savedobjectsimportresponse.success.md) | <code>boolean</code> | |
| [successCount](./kibana-plugin-public.savedobjectsimportresponse.successcount.md) | <code>number</code> | |

View file

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [SavedObjectsImportResponse](./kibana-plugin-public.savedobjectsimportresponse.md) &gt; [success](./kibana-plugin-public.savedobjectsimportresponse.success.md)
## SavedObjectsImportResponse.success property
<b>Signature:</b>
```typescript
success: boolean;
```

View file

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [SavedObjectsImportResponse](./kibana-plugin-public.savedobjectsimportresponse.md) &gt; [successCount](./kibana-plugin-public.savedobjectsimportresponse.successcount.md)
## SavedObjectsImportResponse.successCount property
<b>Signature:</b>
```typescript
successCount: number;
```

View file

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [SavedObjectsImportRetry](./kibana-plugin-public.savedobjectsimportretry.md) &gt; [id](./kibana-plugin-public.savedobjectsimportretry.id.md)
## SavedObjectsImportRetry.id property
<b>Signature:</b>
```typescript
id: string;
```

View file

@ -0,0 +1,23 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [SavedObjectsImportRetry](./kibana-plugin-public.savedobjectsimportretry.md)
## SavedObjectsImportRetry interface
Describes a retry operation for importing a saved object.
<b>Signature:</b>
```typescript
export interface SavedObjectsImportRetry
```
## Properties
| Property | Type | Description |
| --- | --- | --- |
| [id](./kibana-plugin-public.savedobjectsimportretry.id.md) | <code>string</code> | |
| [overwrite](./kibana-plugin-public.savedobjectsimportretry.overwrite.md) | <code>boolean</code> | |
| [replaceReferences](./kibana-plugin-public.savedobjectsimportretry.replacereferences.md) | <code>Array&lt;{</code><br/><code> type: string;</code><br/><code> from: string;</code><br/><code> to: string;</code><br/><code> }&gt;</code> | |
| [type](./kibana-plugin-public.savedobjectsimportretry.type.md) | <code>string</code> | |

View file

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [SavedObjectsImportRetry](./kibana-plugin-public.savedobjectsimportretry.md) &gt; [overwrite](./kibana-plugin-public.savedobjectsimportretry.overwrite.md)
## SavedObjectsImportRetry.overwrite property
<b>Signature:</b>
```typescript
overwrite: boolean;
```

View file

@ -0,0 +1,15 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [SavedObjectsImportRetry](./kibana-plugin-public.savedobjectsimportretry.md) &gt; [replaceReferences](./kibana-plugin-public.savedobjectsimportretry.replacereferences.md)
## SavedObjectsImportRetry.replaceReferences property
<b>Signature:</b>
```typescript
replaceReferences: Array<{
type: string;
from: string;
to: string;
}>;
```

View file

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [SavedObjectsImportRetry](./kibana-plugin-public.savedobjectsimportretry.md) &gt; [type](./kibana-plugin-public.savedobjectsimportretry.type.md)
## SavedObjectsImportRetry.type property
<b>Signature:</b>
```typescript
type: string;
```

View file

@ -0,0 +1,22 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [SavedObjectsImportUnknownError](./kibana-plugin-public.savedobjectsimportunknownerror.md)
## SavedObjectsImportUnknownError interface
Represents a failure to import due to an unknown reason.
<b>Signature:</b>
```typescript
export interface SavedObjectsImportUnknownError
```
## Properties
| Property | Type | Description |
| --- | --- | --- |
| [message](./kibana-plugin-public.savedobjectsimportunknownerror.message.md) | <code>string</code> | |
| [statusCode](./kibana-plugin-public.savedobjectsimportunknownerror.statuscode.md) | <code>number</code> | |
| [type](./kibana-plugin-public.savedobjectsimportunknownerror.type.md) | <code>'unknown'</code> | |

View file

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [SavedObjectsImportUnknownError](./kibana-plugin-public.savedobjectsimportunknownerror.md) &gt; [message](./kibana-plugin-public.savedobjectsimportunknownerror.message.md)
## SavedObjectsImportUnknownError.message property
<b>Signature:</b>
```typescript
message: string;
```

View file

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [SavedObjectsImportUnknownError](./kibana-plugin-public.savedobjectsimportunknownerror.md) &gt; [statusCode](./kibana-plugin-public.savedobjectsimportunknownerror.statuscode.md)
## SavedObjectsImportUnknownError.statusCode property
<b>Signature:</b>
```typescript
statusCode: number;
```

View file

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [SavedObjectsImportUnknownError](./kibana-plugin-public.savedobjectsimportunknownerror.md) &gt; [type](./kibana-plugin-public.savedobjectsimportunknownerror.type.md)
## SavedObjectsImportUnknownError.type property
<b>Signature:</b>
```typescript
type: 'unknown';
```

View file

@ -0,0 +1,20 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [SavedObjectsImportUnsupportedTypeError](./kibana-plugin-public.savedobjectsimportunsupportedtypeerror.md)
## SavedObjectsImportUnsupportedTypeError interface
Represents a failure to import due to having an unsupported saved object type.
<b>Signature:</b>
```typescript
export interface SavedObjectsImportUnsupportedTypeError
```
## Properties
| Property | Type | Description |
| --- | --- | --- |
| [type](./kibana-plugin-public.savedobjectsimportunsupportedtypeerror.type.md) | <code>'unsupported_type'</code> | |

View file

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [SavedObjectsImportUnsupportedTypeError](./kibana-plugin-public.savedobjectsimportunsupportedtypeerror.md) &gt; [type](./kibana-plugin-public.savedobjectsimportunsupportedtypeerror.type.md)
## SavedObjectsImportUnsupportedTypeError.type property
<b>Signature:</b>
```typescript
type: 'unsupported_type';
```

View file

@ -112,6 +112,13 @@ export {
SavedObjectsClientContract,
SavedObjectsClient,
SimpleSavedObject,
SavedObjectsImportResponse,
SavedObjectsImportConflictError,
SavedObjectsImportUnsupportedTypeError,
SavedObjectsImportMissingReferencesError,
SavedObjectsImportUnknownError,
SavedObjectsImportError,
SavedObjectsImportRetry,
} from './saved_objects';
export {

View file

@ -939,6 +939,82 @@ export interface SavedObjectsFindResponsePublic<T extends SavedObjectAttributes
total: number;
}
// @public
export interface SavedObjectsImportConflictError {
// (undocumented)
type: 'conflict';
}
// @public
export interface SavedObjectsImportError {
// (undocumented)
error: SavedObjectsImportConflictError | SavedObjectsImportUnsupportedTypeError | SavedObjectsImportMissingReferencesError | SavedObjectsImportUnknownError;
// (undocumented)
id: string;
// (undocumented)
title?: string;
// (undocumented)
type: string;
}
// @public
export interface SavedObjectsImportMissingReferencesError {
// (undocumented)
blocking: Array<{
type: string;
id: string;
}>;
// (undocumented)
references: Array<{
type: string;
id: string;
}>;
// (undocumented)
type: 'missing_references';
}
// @public
export interface SavedObjectsImportResponse {
// (undocumented)
errors?: SavedObjectsImportError[];
// (undocumented)
success: boolean;
// (undocumented)
successCount: number;
}
// @public
export interface SavedObjectsImportRetry {
// (undocumented)
id: string;
// (undocumented)
overwrite: boolean;
// (undocumented)
replaceReferences: Array<{
type: string;
from: string;
to: string;
}>;
// (undocumented)
type: string;
}
// @public
export interface SavedObjectsImportUnknownError {
// (undocumented)
message: string;
// (undocumented)
statusCode: number;
// (undocumented)
type: 'unknown';
}
// @public
export interface SavedObjectsImportUnsupportedTypeError {
// (undocumented)
type: 'unsupported_type';
}
// @public
export interface SavedObjectsMigrationVersion {
// (undocumented)

View file

@ -40,4 +40,11 @@ export {
SavedObjectsBaseOptions,
SavedObjectsFindOptions,
SavedObjectsMigrationVersion,
SavedObjectsImportResponse,
SavedObjectsImportConflictError,
SavedObjectsImportUnsupportedTypeError,
SavedObjectsImportMissingReferencesError,
SavedObjectsImportUnknownError,
SavedObjectsImportError,
SavedObjectsImportRetry,
} from '../../server/types';

View file

@ -23,6 +23,16 @@ import { MigrationDefinition } from './migrations/core/document_migrator';
import { SavedObjectsSchemaDefinition } from './schema';
import { PropertyValidators } from './validation';
export {
SavedObjectsImportResponse,
SavedObjectsImportConflictError,
SavedObjectsImportUnsupportedTypeError,
SavedObjectsImportMissingReferencesError,
SavedObjectsImportUnknownError,
SavedObjectsImportError,
SavedObjectsImportRetry,
} from './import/types';
/**
* Information about the migrations that have been applied to this SavedObject.
* When Kibana starts up, KibanaMigrator detects outdated documents and

View file

@ -16,6 +16,8 @@
* specific language governing permissions and limitations
* under the License.
*/
// This file should be moved to dashboard/server/
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import { SavedObjectsMigrationLogger } from 'src/core/server';
import { inspect } from 'util';
import { DashboardDoc730ToLatest, DashboardDoc700To720 } from './types';

View file

@ -24,7 +24,7 @@ import {
SavedObjectsImportMissingReferencesError,
SavedObjectsImportUnknownError,
SavedObjectsImportError,
} from 'src/core/server';
} from 'src/core/public';
export interface ProcessedImportResponse {
failedImports: Array<{

View file

@ -17,7 +17,7 @@
* under the License.
*/
import { SavedObjectAttributes } from 'src/core/server';
import { SavedObjectAttributes } from 'src/core/public';
import { SavedObjectMetaData } from '../types';
import { EmbeddableInput, EmbeddableOutput, IEmbeddable } from './i_embeddable';
import { ErrorEmbeddable } from './error_embeddable';

View file

@ -44,7 +44,7 @@ import {
import { Direction } from '@elastic/eui/src/services/sort/sort_direction';
import { i18n } from '@kbn/i18n';
import { SavedObjectAttributes } from '../../../../core/server';
import { SavedObjectAttributes } from '../../../../core/public';
import { SimpleSavedObject, CoreStart } from '../../../../core/public';
import { useKibana } from '../context';

View file

@ -9,7 +9,7 @@ import { Legacy } from 'kibana';
import * as Rx from 'rxjs';
import { ActionsConfigType } from './types';
import { TaskManager } from '../../task_manager';
import { XPackMainPlugin } from '../../xpack_main/xpack_main';
import { XPackMainPlugin } from '../../xpack_main/server/xpack_main';
import KbnServer from '../../../../../src/legacy/server/kbn_server';
import { LegacySpacesPlugin as SpacesPluginStartContract } from '../../spaces';
import {

View file

@ -8,7 +8,7 @@ import Hapi from 'hapi';
import { Legacy } from 'kibana';
import { LegacySpacesPlugin as SpacesPluginStartContract } from '../../spaces';
import { TaskManager } from '../../task_manager';
import { XPackMainPlugin } from '../../xpack_main/xpack_main';
import { XPackMainPlugin } from '../../xpack_main/server/xpack_main';
import KbnServer from '../../../../../src/legacy/server/kbn_server';
import {
PluginSetupContract as EncryptedSavedObjectsSetupContract,

View file

@ -7,7 +7,7 @@
import { i18n } from '@kbn/i18n';
import { Server } from 'hapi';
import { resolve } from 'path';
import { APMPluginContract } from '../../../plugins/apm/server/plugin';
import { APMPluginContract } from '../../../plugins/apm/server';
import { LegacyPluginInitializer } from '../../../../src/legacy/types';
import mappings from './mappings.json';
import { makeApmUsageCollector } from './server/lib/apm_telemetry';

View file

@ -15,6 +15,7 @@ import React, { FunctionComponent, ReactNode } from 'react';
import { render, waitForElement } from '@testing-library/react';
import '@testing-library/jest-dom/extend-expect';
import { MemoryRouter } from 'react-router-dom';
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import { APMConfig } from '../../../../../plugins/apm/server';
import { LocationProvider } from '../context/LocationContext';
import { PromiseReturnType } from '../../typings/common';

View file

@ -7,7 +7,7 @@
import { RefObject } from 'react';
// @ts-ignore Unlinked Webpack Type
import ContainerStyle from 'types/interpreter';
import { SavedObject, SavedObjectAttributes } from 'src/core/server';
import { SavedObject, SavedObjectAttributes } from 'src/core/public';
import { ElementPosition, CanvasPage, CanvasWorkpad, RendererSpec } from '../types';

View file

@ -14,7 +14,7 @@ import { getConfigSchema } from './server/kibana.index';
import { savedObjectMappings } from './server/saved_objects';
import { plugin, InfraServerPluginDeps } from './server/new_platform_index';
import { InfraSetup } from '../../../plugins/infra/server';
import { APMPluginContract } from '../../../plugins/apm/server/plugin';
import { APMPluginContract } from '../../../plugins/apm/server';
const APP_ID = 'infra';
const logsSampleDataLinkLabel = i18n.translate('xpack.infra.sampleDataLinkLabel', {

View file

@ -7,8 +7,7 @@
import { useState, useCallback } from 'react';
import { npStart } from 'ui/new_platform';
import { SavedObjectsBatchResponse } from 'src/core/public';
import { SavedObjectAttributes } from 'src/core/server';
import { SavedObjectAttributes, SavedObjectsBatchResponse } from 'src/core/public';
export const useBulkGetSavedObject = (type: string) => {
const [data, setData] = useState<SavedObjectsBatchResponse<SavedObjectAttributes> | null>(null);

View file

@ -7,8 +7,11 @@
import { useState, useCallback } from 'react';
import { npStart } from 'ui/new_platform';
import { SavedObjectsCreateOptions, SimpleSavedObject } from 'src/core/public';
import { SavedObjectAttributes } from 'src/core/server';
import {
SavedObjectAttributes,
SavedObjectsCreateOptions,
SimpleSavedObject,
} from 'src/core/public';
export const useCreateSavedObject = (type: string) => {
const [data, setData] = useState<SimpleSavedObject<SavedObjectAttributes> | null>(null);

View file

@ -7,8 +7,7 @@
import { useState, useCallback } from 'react';
import { npStart } from 'ui/new_platform';
import { SavedObjectsBatchResponse } from 'src/core/public';
import { SavedObjectAttributes } from 'src/core/server';
import { SavedObjectAttributes, SavedObjectsBatchResponse } from 'src/core/public';
export const useFindSavedObject = <SavedObjectType extends SavedObjectAttributes>(type: string) => {
const [data, setData] = useState<SavedObjectsBatchResponse<SavedObjectType> | null>(null);

View file

@ -9,7 +9,7 @@ import { Lifecycle } from 'hapi';
import { ObjectType } from '@kbn/config-schema';
import { UsageCollectionSetup } from 'src/plugins/usage_collection/server';
import { RouteMethod, RouteConfig } from '../../../../../../../../src/core/server';
import { APMPluginContract } from '../../../../../../../plugins/apm/server/plugin';
import { APMPluginContract } from '../../../../../../../plugins/apm/server';
// NP_TODO: Compose real types from plugins we depend on, no "any"
export interface InfraServerPluginDeps {

View file

@ -15,7 +15,7 @@ import {
DeleteDocumentByQueryResponse,
} from 'elasticsearch';
import { ESSearchResponse } from '../../../apm/typings/elasticsearch';
import { XPackMainPlugin } from '../../../xpack_main/xpack_main';
import { XPackMainPlugin } from '../../../xpack_main/server/xpack_main';
import { RunContext } from '../../../task_manager';
import { getVisualizationCounts } from './visualization_counts';

View file

@ -5,7 +5,7 @@
*/
import { CoreSetup, CoreStart, Plugin } from 'src/core/public';
import { XPackMainPlugin } from '../../../xpack_main/xpack_main';
import { XPackMainPlugin } from '../../../xpack_main/server/xpack_main';
import { PLUGIN } from '../../common/constants';
import { Breadcrumb } from './application/breadcrumbs';

View file

@ -5,7 +5,7 @@
*/
import { IRouter } from 'src/core/server';
import { XPackMainPlugin } from '../../../xpack_main/xpack_main';
import { XPackMainPlugin } from '../../../xpack_main/server/xpack_main';
import { ElasticsearchPlugin } from '../../../../../../src/legacy/core_plugins/elasticsearch';
export interface Dependencies {

View file

@ -3,7 +3,7 @@
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import { SavedObjectAttributes } from 'src/core/server/types';
import { SavedObjectAttributes } from 'src/core/public';
import { Datafeed, Job } from '../../public/application/jobs/new_job/common/job_creator/configs';
export interface ModuleJob {

View file

@ -5,7 +5,7 @@
*/
import { Privileges, getDefaultPrivileges } from '../../../common/types/privileges';
import { XPackMainPlugin } from '../../../../../../legacy/plugins/xpack_main/xpack_main';
import { XPackMainPlugin } from '../../../../xpack_main/server/xpack_main';
import { callWithRequestType } from '../../../common/types/kibana';
import { isSecurityDisabled } from '../../lib/security_utils';
import { upgradeCheckProvider } from './upgrade';

View file

@ -4,6 +4,6 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { XPackMainPlugin } from '../../../../../legacy/plugins/xpack_main/xpack_main';
import { XPackMainPlugin } from '../../../xpack_main/server/xpack_main';
export function isSecurityDisabled(xpackMainPlugin: XPackMainPlugin): boolean;

View file

@ -12,7 +12,7 @@ import { Logger, PluginInitializerContext, CoreSetup } from 'src/core/server';
import { ElasticsearchPlugin } from 'src/legacy/core_plugins/elasticsearch';
import { UsageCollectionSetup } from 'src/plugins/usage_collection/server';
import { CloudSetup } from '../../../../../plugins/cloud/server';
import { XPackMainPlugin } from '../../../xpack_main/xpack_main';
import { XPackMainPlugin } from '../../../xpack_main/server/xpack_main';
import { addLinksToSampleDatasets } from '../lib/sample_data_sets';
import { checkLicense } from '../lib/check_license';
// @ts-ignore: could not find declaration file for module

View file

@ -10,7 +10,10 @@ import sinon from 'sinon';
import nodeCrypto from '@elastic/node-crypto';
import { CancellationToken } from '../../../../common/cancellation_token';
// Reporting uses an unconventional directory structure so the linter marks this as a violation
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import { FieldFormatsService } from '../../../../../../../../src/legacy/ui/field_formats/mixin/field_formats_service';
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import { StringFormat } from '../../../../../../../../src/plugins/data/server';
import { executeJobFactory } from '../execute_job';

View file

@ -7,6 +7,8 @@
import expect from '@kbn/expect';
import { FieldFormatsService } from '../../../../../../../../../src/legacy/ui/field_formats/mixin/field_formats_service';
// Reporting uses an unconventional directory structure so the linter marks this as a violation
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import { BytesFormat, NumberFormat } from '../../../../../../../../../src/plugins/data/server';
import { fieldFormatMapFactory } from '../field_format_map';

View file

@ -18,11 +18,15 @@ import {
import { getDataSource } from './get_data_source';
import { getFilters } from './get_filters';
import { JobParamsDiscoverCsv } from '../../../csv/types';
import {
esQuery,
esFilters,
IIndexPattern,
Query,
// Reporting uses an unconventional directory structure so the linter marks this as a violation, server files should
// be moved under reporting/server/
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
} from '../../../../../../../../src/plugins/data/server';
const getEsQueryConfig = async (config: any) => {

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { XPackMainPlugin } from '../../../xpack_main/xpack_main';
import { XPackMainPlugin } from '../../../xpack_main/server/xpack_main';
import { ExportTypesRegistry } from '../lib/export_types_registry';
/*

View file

@ -7,7 +7,7 @@
import { ResponseObject } from 'hapi';
import { EventEmitter } from 'events';
import { Legacy } from 'kibana';
import { XPackMainPlugin } from '../xpack_main/xpack_main';
import { XPackMainPlugin } from '../xpack_main/server/xpack_main';
import {
ElasticsearchPlugin,
CallCluster,

View file

@ -6,7 +6,7 @@
import { ServerRoute } from 'hapi';
import { ElasticsearchPlugin, Request } from 'src/legacy/core_plugins/elasticsearch';
import { XPackMainPlugin } from '../../../xpack_main/xpack_main';
import { XPackMainPlugin } from '../../../xpack_main/server/xpack_main';
export type RegisterRoute = (args: ServerRoute & { config: any }) => void;

View file

@ -9,8 +9,11 @@ import React from 'react';
import { mountWithIntl } from 'test_utils/enzyme_helpers';
import { UICapabilities } from 'ui/capabilities';
import { Space } from '../../../../../../spaces/common/model/space';
import { Feature } from '../../../../../../../../plugins/features/server';
import { Feature } from '../../../../../../../../plugins/features/public';
// These modules should be moved into a common directory
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import { Actions } from '../../../../../../../../plugins/security/server/authorization/actions';
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import { privilegesFactory } from '../../../../../../../../plugins/security/server/authorization/privileges';
import { RawKibanaPrivileges, Role } from '../../../../../common/model';
import { EditRolePage } from './edit_role_page';

View file

@ -23,7 +23,7 @@ import React, { ChangeEvent, Component, Fragment, HTMLProps } from 'react';
import { UICapabilities } from 'ui/capabilities';
import { toastNotifications } from 'ui/notify';
import { Space } from '../../../../../../spaces/common/model/space';
import { Feature } from '../../../../../../../../plugins/features/server';
import { Feature } from '../../../../../../../../plugins/features/public';
import {
KibanaPrivileges,
RawKibanaPrivileges,

View file

@ -17,7 +17,7 @@ import {
import { FormattedMessage, InjectedIntl } from '@kbn/i18n/react';
import _ from 'lodash';
import React, { Component } from 'react';
import { Feature } from '../../../../../../../../../../../plugins/features/server';
import { Feature } from '../../../../../../../../../../../plugins/features/public';
import { FeaturesPrivileges, KibanaPrivileges, Role } from '../../../../../../../../common/model';
import {
AllowedPrivilege,

View file

@ -8,7 +8,7 @@ import { InjectedIntl } from '@kbn/i18n/react';
import React, { Component } from 'react';
import { UICapabilities } from 'ui/capabilities';
import { Space } from '../../../../../../../../spaces/common/model/space';
import { Feature } from '../../../../../../../../../../plugins/features/server';
import { Feature } from '../../../../../../../../../../plugins/features/public';
import { KibanaPrivileges, Role } from '../../../../../../../common/model';
import { KibanaPrivilegeCalculatorFactory } from '../../../../../../lib/kibana_privilege_calculator';
import { RoleValidator } from '../../../lib/validate_role';

View file

@ -7,7 +7,7 @@
import { EuiButtonGroup, EuiButtonGroupProps, EuiComboBox, EuiSuperSelect } from '@elastic/eui';
import React from 'react';
import { mountWithIntl, shallowWithIntl } from 'test_utils/enzyme_helpers';
import { Feature } from '../../../../../../../../../../../plugins/features/server';
import { Feature } from '../../../../../../../../../../../plugins/features/public';
import { KibanaPrivileges, Role } from '../../../../../../../../common/model';
import { KibanaPrivilegeCalculatorFactory } from '../../../../../../../lib/kibana_privilege_calculator';
import { SimplePrivilegeSection } from './simple_privilege_section';

View file

@ -15,7 +15,7 @@ import {
import { FormattedMessage, InjectedIntl } from '@kbn/i18n/react';
import React, { Component, Fragment } from 'react';
import { Feature } from '../../../../../../../../../../../plugins/features/server';
import { Feature } from '../../../../../../../../../../../plugins/features/public';
import { KibanaPrivileges, Role, RoleKibanaPrivilege } from '../../../../../../../../common/model';
import { KibanaPrivilegeCalculatorFactory } from '../../../../../../../lib/kibana_privilege_calculator';
import { isGlobalPrivilegeDefinition } from '../../../../../../../lib/privilege_utils';

View file

@ -8,7 +8,7 @@ import { EuiButtonEmpty, EuiInMemoryTable } from '@elastic/eui';
import React from 'react';
import { mountWithIntl } from 'test_utils/enzyme_helpers';
import { Space } from '../../../../../../../../../spaces/common/model/space';
import { Feature } from '../../../../../../../../../../../plugins/features/server';
import { Feature } from '../../../../../../../../../../../plugins/features/public';
import { KibanaPrivileges, Role } from '../../../../../../../../common/model';
import { KibanaPrivilegeCalculatorFactory } from '../../../../../../..//lib/kibana_privilege_calculator';
import { PrivilegeMatrix } from './privilege_matrix';

View file

@ -24,7 +24,7 @@ import { FormattedMessage, InjectedIntl } from '@kbn/i18n/react';
import React, { Component, Fragment } from 'react';
import { Space } from '../../../../../../../../../spaces/common/model/space';
import { SpaceAvatar } from '../../../../../../../../../spaces/public/components';
import { Feature } from '../../../../../../../../../../../plugins/features/server';
import { Feature } from '../../../../../../../../../../../plugins/features/public';
import { FeaturesPrivileges, Role } from '../../../../../../../../common/model';
import { CalculatedPrivilege } from '../../../../../../../lib/kibana_privilege_calculator';
import { isGlobalPrivilegeDefinition } from '../../../../../../../lib/privilege_utils';

View file

@ -25,7 +25,7 @@ import {
import { FormattedMessage, InjectedIntl } from '@kbn/i18n/react';
import React, { Component, Fragment } from 'react';
import { Space } from '../../../../../../../../../spaces/common/model/space';
import { Feature } from '../../../../../../../../../../../plugins/features/server';
import { Feature } from '../../../../../../../../../../../plugins/features/public';
import { KibanaPrivileges, Role } from '../../../../../../../../common/model';
import {
AllowedPrivilege,

View file

@ -16,7 +16,7 @@ import _ from 'lodash';
import React, { Component, Fragment } from 'react';
import { UICapabilities } from 'ui/capabilities';
import { Space } from '../../../../../../../../../spaces/common/model/space';
import { Feature } from '../../../../../../../../../../../plugins/features/server';
import { Feature } from '../../../../../../../../../../../plugins/features/public';
import { KibanaPrivileges, Role } from '../../../../../../../../common/model';
import { KibanaPrivilegeCalculatorFactory } from '../../../../../../../lib/kibana_privilege_calculator';
import { isReservedRole } from '../../../../../../../lib/role_utils';

View file

@ -7,8 +7,8 @@
import { Legacy } from 'kibana';
import { resolve } from 'path';
import { PLUGIN } from './common/constants';
import { Plugin as SnapshotRestorePlugin } from './plugin';
import { createShim } from './shim';
import { Plugin as SnapshotRestorePlugin } from './server/plugin';
import { createShim } from './server/shim';
export function snapshotRestore(kibana: any) {
return new kibana.Plugin({

View file

@ -3,8 +3,8 @@
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import { API_BASE_PATH } from './common/constants';
import { registerRoutes } from './server/routes/api/register_routes';
import { API_BASE_PATH } from '../common/constants';
import { registerRoutes } from './routes/api/register_routes';
import { Core, Plugins } from './shim';
export class Plugin {

View file

@ -13,7 +13,7 @@ import {
// NOTE: now we import it from our "public" folder, but when the Authorisation lib
// will move to the "es_ui_shared" plugin, it will be imported from its "static" folder
import { Privileges } from '../../../public/app/lib/authorization';
import { Plugins } from '../../../shim';
import { Plugins } from '../../shim';
let xpackMainPlugin: any;

View file

@ -10,7 +10,7 @@ import {
} from '../../../../../server/lib/create_router/error_wrappers';
import { SlmPolicyEs, SlmPolicy, SlmPolicyPayload } from '../../../common/types';
import { deserializePolicy, serializePolicy } from '../../../common/lib';
import { Plugins } from '../../../shim';
import { Plugins } from '../../shim';
import { getManagedPolicyNames } from '../../lib';
let callWithInternalUser: any;

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { Router } from '../../../../../server/lib/create_router';
import { Plugins } from '../../../shim';
import { Plugins } from '../../shim';
import { registerAppRoutes } from './app';
import { registerRepositoriesRoutes } from './repositories';
import { registerSnapshotsRoutes } from './snapshots';

View file

@ -17,7 +17,7 @@ import {
SlmPolicyEs,
} from '../../../common/types';
import { Plugins } from '../../../shim';
import { Plugins } from '../../shim';
import {
deserializeRepositorySettings,
serializeRepositorySettings,

View file

@ -10,7 +10,7 @@ import {
} from '../../../../../server/lib/create_router/error_wrappers';
import { SnapshotDetails, SnapshotDetailsEs } from '../../../common/types';
import { deserializeSnapshotDetails } from '../../../common/lib';
import { Plugins } from '../../../shim';
import { Plugins } from '../../shim';
import { getManagedRepositoryName } from '../../lib';
let callWithInternalUser: any;

View file

@ -6,10 +6,10 @@
import { i18n } from '@kbn/i18n';
import { Legacy } from 'kibana';
import { createRouter, Router } from '../../server/lib/create_router';
import { registerLicenseChecker } from '../../server/lib/register_license_checker';
import { elasticsearchJsPlugin } from './server/client/elasticsearch_slm';
import { CloudSetup } from '../../../plugins/cloud/server';
import { createRouter, Router } from '../../../server/lib/create_router';
import { registerLicenseChecker } from '../../../server/lib/register_license_checker';
import { elasticsearchJsPlugin } from './client/elasticsearch_slm';
import { CloudSetup } from '../../../../plugins/cloud/server';
export interface Core {
http: {
createRouter(basePath: string): Router;

View file

@ -8,7 +8,7 @@ import { resolve } from 'path';
import KbnServer, { Server } from 'src/legacy/server/kbn_server';
import { Legacy } from 'kibana';
import { KibanaRequest } from '../../../../src/core/server';
import { SpacesServiceSetup } from '../../../plugins/spaces/server/spaces_service/spaces_service';
import { SpacesServiceSetup } from '../../../plugins/spaces/server';
import { SpacesPluginSetup } from '../../../plugins/spaces/server';
// @ts-ignore
import { AuditLogger } from '../../server/lib/audit_logger';

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { SavedObjectsImportRetry, SavedObjectsImportResponse } from 'src/core/server';
import { SavedObjectsImportRetry, SavedObjectsImportResponse } from 'src/core/public';
export interface CopyOptions {
includeRelated: boolean;

View file

@ -7,7 +7,7 @@
import { EuiLink } from '@elastic/eui';
import React from 'react';
import { mountWithIntl, shallowWithIntl } from 'test_utils/enzyme_helpers';
import { Feature } from '../../../../../../../../plugins/features/server';
import { Feature } from '../../../../../../../../plugins/features/public';
import { Space } from '../../../../../common/model/space';
import { SectionPanel } from '../section_panel';
import { EnabledFeatures } from './enabled_features';

View file

@ -8,7 +8,7 @@ import { EuiFlexGroup, EuiFlexItem, EuiLink, EuiSpacer, EuiText, EuiTitle } from
import { FormattedMessage, InjectedIntl } from '@kbn/i18n/react';
import React, { Component, Fragment, ReactNode } from 'react';
import { Capabilities } from 'src/core/public';
import { Feature } from '../../../../../../../../plugins/features/server';
import { Feature } from '../../../../../../../../plugins/features/public';
import { Space } from '../../../../../common/model/space';
import { getEnabledFeatures } from '../../lib/feature_utils';
import { SectionPanel } from '../section_panel';

View file

@ -8,7 +8,7 @@ import { EuiCheckbox, EuiIcon, EuiInMemoryTable, EuiSwitch, EuiText, IconType }
import { FormattedMessage, InjectedIntl } from '@kbn/i18n/react';
import _ from 'lodash';
import React, { ChangeEvent, Component } from 'react';
import { Feature } from '../../../../../../../../plugins/features/server';
import { Feature } from '../../../../../../../../plugins/features/public';
import { Space } from '../../../../../common/model/space';
import { ToggleAllFeatures } from './toggle_all_features';

View file

@ -21,7 +21,7 @@ import { Breadcrumb } from 'ui/chrome';
import { kfetch } from 'ui/kfetch';
import { toastNotifications } from 'ui/notify';
import { Capabilities } from 'src/core/public';
import { Feature } from '../../../../../../../plugins/features/server';
import { Feature } from '../../../../../../../plugins/features/public';
import { isReservedSpace } from '../../../../common';
import { Space } from '../../../../common/model/space';
import { SpacesManager } from '../../../lib';

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { Feature } from '../../../../../../../plugins/features/server';
import { Feature } from '../../../../../../../plugins/features/public';
import { getEnabledFeatures } from './feature_utils';
const buildFeatures = () =>

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { Feature } from '../../../../../../../plugins/features/server';
import { Feature } from '../../../../../../../plugins/features/public';
import { Space } from '../../../../common/model/space';

View file

@ -22,7 +22,7 @@ import { FormattedMessage, InjectedIntl, injectI18n } from '@kbn/i18n/react';
import { kfetch } from 'ui/kfetch';
import { toastNotifications } from 'ui/notify';
import { Capabilities } from 'src/core/public';
import { Feature } from '../../../../../../../plugins/features/server';
import { Feature } from '../../../../../../../plugins/features/public';
import { isReservedSpace } from '../../../../common';
import { DEFAULT_SPACE_ID } from '../../../../common/constants';
import { Space } from '../../../../common/model/space';

View file

@ -4,6 +4,9 @@
* you may not use this file except in compliance with the Elastic License.
*/
// Task manager uses an unconventional directory structure so the linter marks this as a violation, server files should
// be moved under task_manager/server/
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import { SavedObject } from 'src/core/server';
export const migrations = {

View file

@ -24,6 +24,7 @@ import {
// be moved under task_manager/server/
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import { savedObjectsClientMock } from 'src/core/server/mocks';
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import { SavedObjectsSerializer, SavedObjectsSchema } from 'src/core/server';
import { mockLogger } from './test_utils';
import { asErr, asOk } from './lib/result_type';

View file

@ -7,6 +7,9 @@ import { Subject, Observable, Subscription } from 'rxjs';
import { filter } from 'rxjs/operators';
import { performance } from 'perf_hooks';
// Task manager uses an unconventional directory structure so the linter marks this as a violation, server files should
// be moved under task_manager/server/
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import { SavedObjectsClientContract, SavedObjectsSerializer } from 'src/core/server';
import { pipe } from 'fp-ts/lib/pipeable';

View file

@ -12,7 +12,10 @@ import { TaskEvent, asTaskRunEvent, asTaskMarkRunningEvent } from './task_events
import { ConcreteTaskInstance, TaskStatus } from './task';
import { TaskManagerRunner } from './task_runner';
import { mockLogger } from './test_utils';
import { SavedObjectsErrorHelpers } from '../../../../src/core/server/saved_objects/service/lib/errors';
// Task manager uses an unconventional directory structure so the linter marks this as a violation, server files should
// be moved under task_manager/server/
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import { SavedObjectsErrorHelpers } from '../../../../src/core/server';
let fakeTimer: sinon.SinonFakeTimers;

View file

@ -17,7 +17,11 @@ import {
TaskLifecycleResult,
} from './task';
import { FetchOpts, StoreOpts, OwnershipClaimingOpts, TaskStore } from './task_store';
// Task manager uses an unconventional directory structure so the linter marks this as a violation, server files should
// be moved under task_manager/server/
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import { savedObjectsClientMock } from 'src/core/server/mocks';
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import { SavedObjectsSerializer, SavedObjectsSchema, SavedObjectAttributes } from 'src/core/server';
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import { SavedObjectsErrorHelpers } from '../../../../src/core/server/saved_objects/service/lib/errors';

View file

@ -16,6 +16,9 @@ import {
SavedObjectAttributes,
SavedObjectsSerializer,
SavedObjectsRawDoc,
// Task manager uses an unconventional directory structure so the linter marks this as a violation, server files should
// be moved under task_manager/server/
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
} from 'src/core/server';
import { asOk, asErr } from './lib/result_type';

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { SavedObject, SavedObjectAttributes } from 'src/core/server';
import { SavedObject, SavedObjectAttributes } from 'src/core/public';
export enum ReindexStep {
// Enum values are spaced out by 10 to give us room to insert steps in between.

View file

@ -6,7 +6,7 @@
import { Legacy } from 'kibana';
import { IRouter } from 'src/core/server';
import { ElasticsearchPlugin } from 'src/legacy/core_plugins/elasticsearch';
import { XPackMainPlugin } from '../../../xpack_main/xpack_main';
import { XPackMainPlugin } from '../../../xpack_main/server/xpack_main';
export interface ServerShim {
plugins: {

View file

@ -5,7 +5,7 @@
*/
import { IRouter, ElasticsearchServiceSetup, IClusterClient } from 'src/core/server';
import { XPackMainPlugin } from '../../../xpack_main/xpack_main';
import { XPackMainPlugin } from '../../../xpack_main/server/xpack_main';
export interface ServerShim {
route: any;

View file

@ -9,7 +9,7 @@ import { BehaviorSubject } from 'rxjs';
import expect from '@kbn/expect';
import sinon from 'sinon';
import { XPackInfo } from '../xpack_info';
import { licensingMock } from '../../../../../../plugins/licensing/server/licensing.mocks';
import { licensingMock } from '../../../../../../plugins/licensing/server/mocks';
function createLicense(license = {}, features = {}) {
return licensingMock.createLicense({

View file

@ -5,9 +5,9 @@
*/
import KbnServer from 'src/legacy/server/kbn_server';
import { Feature, FeatureWithAllOrReadPrivileges } from '../../../plugins/features/server';
import { XPackInfo, XPackInfoOptions } from './server/lib/xpack_info';
export { XPackFeature } from './server/lib/xpack_info';
import { Feature, FeatureWithAllOrReadPrivileges } from '../../../../plugins/features/server';
import { XPackInfo, XPackInfoOptions } from './lib/xpack_info';
export { XPackFeature } from './lib/xpack_info';
export interface XPackMainPlugin {
info: XPackInfo;

View file

@ -48,4 +48,4 @@ export type APMConfig = ReturnType<typeof mergeConfigs>;
export const plugin = (initContext: PluginInitializerContext) => new APMPlugin(initContext);
export { APMPlugin } from './plugin';
export { APMPlugin, APMPluginContract } from './plugin';

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