Skip to content

Commit a473946

Browse files
cleanup
1 parent 279c622 commit a473946

File tree

24 files changed

+164
-450
lines changed

24 files changed

+164
-450
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,10 @@
1+
/*
2+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3+
* or more contributor license agreements. Licensed under the Elastic License
4+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
5+
* in compliance with, at your election, the Elastic License 2.0 or the Server
6+
* Side Public License, v 1.
7+
*/
8+
19
export const PLUGIN_ID = 'deprecations';
210
export const PLUGIN_NAME = 'deprecations';

src/plugins/deprecations/kibana.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "1.0.0",
44
"kibanaVersion": "kibana",
55
"server": true,
6-
"ui": true,
7-
"requiredPlugins": ["navigation"],
6+
"ui": false,
7+
"requiredPlugins": [],
88
"optionalPlugins": []
99
}

src/plugins/deprecations/public/application.tsx

Lines changed: 0 additions & 31 deletions
This file was deleted.

src/plugins/deprecations/public/components/app.tsx

Lines changed: 0 additions & 124 deletions
This file was deleted.

src/plugins/deprecations/public/index.scss

Whitespace-only changes.

src/plugins/deprecations/public/index.ts

Lines changed: 0 additions & 10 deletions
This file was deleted.

src/plugins/deprecations/public/plugin.ts

Lines changed: 0 additions & 45 deletions
This file was deleted.

src/plugins/deprecations/public/types.ts

Lines changed: 0 additions & 11 deletions
This file was deleted.

src/plugins/deprecations/server/deprecations.ts

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,34 +6,24 @@
66
* Side Public License, v 1.
77
*/
88

9-
interface DeprecationInfo {
10-
message: string;
11-
documentationUrl: string;
12-
level: 'critical' | 'warning';
13-
correctiveAction?: () => void;
14-
}
15-
16-
interface PluginDeprecation {
17-
pluginId: string;
18-
getDeprecations: () => Promise<DeprecationInfo>;
19-
}
9+
import { DeprecationInfo, DeprecationContext } from './types';
2010

2111
export class Deprecations {
22-
private readonly deprecations: { [key: string]: PluginDeprecation } = {};
12+
private readonly deprecations: { [key: string]: DeprecationContext } = {};
2313

24-
public registerDeprecations = (deprecation: PluginDeprecation) => {
14+
public registerDeprecations = (deprecation: DeprecationContext) => {
2515
if (this.deprecations[deprecation.pluginId]) {
2616
throw new Error(`Plugin "${deprecation.pluginId}" is duplicated.`);
2717
}
2818

2919
this.deprecations[deprecation.pluginId] = deprecation;
3020
};
3121

32-
public getDeprecationsByPluginId = (pluginId: string) => {
22+
public getDeprecationInfoByPluginId = (pluginId: string) => {
3323
return this.deprecations[pluginId];
3424
};
3525

36-
public getDeprecations = () => {
26+
public getDeprecationInfo = () => {
3727
return this.deprecations;
3828
};
3929
}

src/plugins/deprecations/server/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,7 @@
99
import { PluginInitializerContext } from 'src/core/server';
1010
import { DeprecationsPlugin } from './plugin';
1111

12+
export { DeprecationDependencies, DeprecationInfo, DeprecationContext } from './types';
13+
1214
export const plugin = (initializerContext: PluginInitializerContext) =>
1315
new DeprecationsPlugin(initializerContext);

0 commit comments

Comments
 (0)