diff --git a/src/core/MIGRATION.md b/src/core/MIGRATION.md index 6989c2159dce3f..0dcc8d55d31a48 100644 --- a/src/core/MIGRATION.md +++ b/src/core/MIGRATION.md @@ -1139,7 +1139,7 @@ import { setup, start } from '../core_plugins/visualizations/public/legacy'; | `ui/embeddable` | `embeddables` | still in progress | | `ui/filter_manager` | `data.filter` | -- | | `ui/index_patterns` | `data.indexPatterns` | still in progress | -| `ui/registry/feature_catalogue | `feature_catalogue.register` | Must add `feature_catalogue` as a dependency in your kibana.json. | +| `ui/registry/feature_catalogue` | `home.featureCatalogue.register` | Must add `home` as a dependency in your kibana.json. | | `ui/registry/vis_types` | `visualizations.types` | -- | | `ui/vis` | `visualizations.types` | -- | | `ui/share` | `share` | `showShareContextMenu` is now called `toggleShareContextMenu`, `ShareContextMenuExtensionsRegistryProvider` is now called `register` | @@ -1182,7 +1182,7 @@ This table shows where these uiExports have moved to in the New Platform. In mos | `fieldFormatEditors` | | | | `fieldFormats` | | | | `hacks` | n/a | Just run the code in your plugin's `start` method. | -| `home` | [`plugins.feature_catalogue.register`](./src/plugins/feature_catalogue) | Must add `feature_catalogue` as a dependency in your kibana.json. | +| `home` | [`plugins.home.featureCatalogue.register`](./src/plugins/home/public/feature_catalogue) | Must add `home` as a dependency in your kibana.json. | | `indexManagement` | | Should be an API on the indexManagement plugin. | | `injectDefaultVars` | n/a | Plugins will only be able to "whitelist" config values for the frontend. See [#41990](https://github.com/elastic/kibana/issues/41990) | | `inspectorViews` | | Should be an API on the data (?) plugin. | diff --git a/src/legacy/core_plugins/console/np_ready/public/legacy.ts b/src/legacy/core_plugins/console/np_ready/public/legacy.ts index 463aac74da944e..b610cf7e6a3bbd 100644 --- a/src/legacy/core_plugins/console/np_ready/public/legacy.ts +++ b/src/legacy/core_plugins/console/np_ready/public/legacy.ts @@ -30,7 +30,7 @@ import { I18nContext } from 'ui/i18n'; export interface XPluginSet { devTools: DevToolsSetup; - feature_catalogue: FeatureCatalogueSetup; + home: HomePublicPluginSetup; __LEGACY: { I18nContext: any; }; @@ -38,7 +38,7 @@ export interface XPluginSet { import { plugin } from '.'; import { DevToolsSetup } from '../../../../../plugins/dev_tools/public'; -import { FeatureCatalogueSetup } from '../../../../../plugins/feature_catalogue/public'; +import { HomePublicPluginSetup } from '../../../../../plugins/home/public'; const pluginInstance = plugin({} as any); diff --git a/src/legacy/core_plugins/console/np_ready/public/plugin.ts b/src/legacy/core_plugins/console/np_ready/public/plugin.ts index 301b85b6e7395d..4050f20a4fb078 100644 --- a/src/legacy/core_plugins/console/np_ready/public/plugin.ts +++ b/src/legacy/core_plugins/console/np_ready/public/plugin.ts @@ -32,10 +32,10 @@ export class ConsoleUIPlugin implements Plugin { const { __LEGACY: { I18nContext }, devTools, - feature_catalogue, + home, } = pluginSet; - feature_catalogue.register({ + home.featureCatalogue.register({ id: 'console', title: i18n.translate('console.devToolsTitle', { defaultMessage: 'Console', diff --git a/src/legacy/core_plugins/kibana/public/home/index.ts b/src/legacy/core_plugins/kibana/public/home/index.ts index 4ebf719b86233a..b1c03507c9a2d7 100644 --- a/src/legacy/core_plugins/kibana/public/home/index.ts +++ b/src/legacy/core_plugins/kibana/public/home/index.ts @@ -64,11 +64,11 @@ let copiedLegacyCatalogue = false; const Private = injector.get('Private'); // Merge legacy registry with new registry (Private(FeatureCatalogueRegistryProvider as any) as any).inTitleOrder.map( - npSetup.plugins.feature_catalogue.register + npSetup.plugins.home.featureCatalogue.register ); copiedLegacyCatalogue = true; } - return npStart.plugins.feature_catalogue.get(); + return npStart.plugins.home.featureCatalogue.get(); }, getAngularDependencies, localApplicationService, diff --git a/src/legacy/core_plugins/kibana/public/home/kibana_services.ts b/src/legacy/core_plugins/kibana/public/home/kibana_services.ts index 6189204ee4cfc9..5ef6e019db0424 100644 --- a/src/legacy/core_plugins/kibana/public/home/kibana_services.ts +++ b/src/legacy/core_plugins/kibana/public/home/kibana_services.ts @@ -29,7 +29,7 @@ import { UiSettingsState, } from 'kibana/public'; import { UiStatsMetricType } from '@kbn/analytics'; -import { FeatureCatalogueEntry } from '../../../../../plugins/feature_catalogue/public'; +import { FeatureCatalogueEntry } from '../../../../../plugins/home/public'; export interface HomeKibanaServices { indexPatternService: any; diff --git a/src/legacy/core_plugins/kibana/public/home/plugin.ts b/src/legacy/core_plugins/kibana/public/home/plugin.ts index 2a2ea371d7f3bd..18e101fc58d51e 100644 --- a/src/legacy/core_plugins/kibana/public/home/plugin.ts +++ b/src/legacy/core_plugins/kibana/public/home/plugin.ts @@ -23,7 +23,7 @@ import { UiStatsMetricType } from '@kbn/analytics'; import { DataStart } from '../../../data/public'; import { LocalApplicationService } from '../local_application_service'; import { setServices } from './kibana_services'; -import { FeatureCatalogueEntry } from '../../../../../plugins/feature_catalogue/public'; +import { FeatureCatalogueEntry } from '../../../../../plugins/home/public'; export interface LegacyAngularInjectedDependencies { telemetryOptInProvider: any; diff --git a/src/legacy/ui/public/new_platform/new_platform.ts b/src/legacy/ui/public/new_platform/new_platform.ts index 6e71d368778956..1db360749c7141 100644 --- a/src/legacy/ui/public/new_platform/new_platform.ts +++ b/src/legacy/ui/public/new_platform/new_platform.ts @@ -29,17 +29,14 @@ import { } from '../../../../plugins/inspector/public'; import { EuiUtilsStart } from '../../../../plugins/eui_utils/public'; import { DevToolsSetup, DevToolsStart } from '../../../../plugins/dev_tools/public'; -import { - FeatureCatalogueSetup, - FeatureCatalogueStart, -} from '../../../../plugins/feature_catalogue/public'; +import { HomePublicPluginSetup, HomePublicPluginStart } from '../../../../plugins/home/public'; import { SharePluginSetup, SharePluginStart } from '../../../../plugins/share/public'; export interface PluginsSetup { data: ReturnType; embeddable: EmbeddableSetup; expressions: ReturnType; - feature_catalogue: FeatureCatalogueSetup; + home: HomePublicPluginSetup; inspector: InspectorSetup; uiActions: IUiActionsSetup; share: SharePluginSetup; @@ -51,7 +48,7 @@ export interface PluginsStart { embeddable: EmbeddableStart; eui_utils: EuiUtilsStart; expressions: ReturnType; - feature_catalogue: FeatureCatalogueStart; + home: HomePublicPluginStart; inspector: InspectorStart; uiActions: IUiActionsStart; share: SharePluginStart; diff --git a/src/legacy/ui/public/registry/feature_catalogue.js b/src/legacy/ui/public/registry/feature_catalogue.js index 8905a15106953f..475705ff39e48d 100644 --- a/src/legacy/ui/public/registry/feature_catalogue.js +++ b/src/legacy/ui/public/registry/feature_catalogue.js @@ -19,7 +19,7 @@ import { uiRegistry } from './_registry'; import { capabilities } from '../capabilities'; -export { FeatureCatalogueCategory } from '../../../../plugins/feature_catalogue/public'; +export { FeatureCatalogueCategory } from '../../../../plugins/home/public'; export const FeatureCatalogueRegistryProvider = uiRegistry({ name: 'featureCatalogue', diff --git a/src/plugins/feature_catalogue/kibana.json b/src/plugins/feature_catalogue/kibana.json deleted file mode 100644 index 3f39c9361f0476..00000000000000 --- a/src/plugins/feature_catalogue/kibana.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "id": "feature_catalogue", - "version": "kibana", - "server": false, - "ui": true -} diff --git a/src/plugins/feature_catalogue/README.md b/src/plugins/home/README.md similarity index 52% rename from src/plugins/feature_catalogue/README.md rename to src/plugins/home/README.md index 68584e7ed2ce13..74e12a799b1b76 100644 --- a/src/plugins/feature_catalogue/README.md +++ b/src/plugins/home/README.md @@ -1,4 +1,7 @@ -# Feature catalogue plugin +# home plugin +Moves the legacy `ui/registry/feature_catalogue` module for registering "features" that should be shown in the home page's feature catalogue to a service within a "home" plugin. The feature catalogue refered to here should not be confused with the "feature" plugin for registering features used to derive UI capabilities for feature controls. + +# Feature catalogue (public service) Replaces the legacy `ui/registry/feature_catalogue` module for registering "features" that should be showed in the home page's feature catalogue. This should not be confused with the "feature" plugin for registering features used to derive @@ -9,15 +12,15 @@ UI capabilities for feature controls. ```ts // For legacy plugins import { npSetup } from 'ui/new_platform'; -npSetup.plugins.feature_catalogue.register(/* same details here */); +npSetup.plugins.home.featureCatalogue.register(/* same details here */); -// For new plugins: first add 'feature_catalogue` to the list of `optionalPlugins` +// For new plugins: first add 'home` to the list of `optionalPlugins` // in your kibana.json file. Then access the plugin directly in `setup`: class MyPlugin { setup(core, plugins) { - if (plugins.feature_catalogue) { - plugins.feature_catalogue.register(/* same details here. */); + if (plugins.home) { + plugins.home.featureCatalgoue.register(/* same details here. */); } } } diff --git a/src/plugins/home/kibana.json b/src/plugins/home/kibana.json index 8d2d79560f854a..a5c65e3efa597c 100644 --- a/src/plugins/home/kibana.json +++ b/src/plugins/home/kibana.json @@ -2,5 +2,5 @@ "id": "home", "version": "kibana", "server": true, - "ui": false + "ui": true } diff --git a/src/plugins/feature_catalogue/public/index.ts b/src/plugins/home/public/index.ts similarity index 79% rename from src/plugins/feature_catalogue/public/index.ts rename to src/plugins/home/public/index.ts index dd241a317c4a6a..25e94c20c347b8 100644 --- a/src/plugins/feature_catalogue/public/index.ts +++ b/src/plugins/home/public/index.ts @@ -17,8 +17,13 @@ * under the License. */ -export { FeatureCatalogueSetup, FeatureCatalogueStart } from './plugin'; +export { + FeatureCatalogueSetup, + FeatureCatalogueStart, + HomePublicPluginSetup, + HomePublicPluginStart, +} from './plugin'; export { FeatureCatalogueEntry, FeatureCatalogueCategory } from './services'; -import { FeatureCataloguePlugin } from './plugin'; +import { HomePublicPlugin } from './plugin'; -export const plugin = () => new FeatureCataloguePlugin(); +export const plugin = () => new HomePublicPlugin(); diff --git a/src/plugins/feature_catalogue/public/plugin.test.mocks.ts b/src/plugins/home/public/plugin.test.mocks.ts similarity index 95% rename from src/plugins/feature_catalogue/public/plugin.test.mocks.ts rename to src/plugins/home/public/plugin.test.mocks.ts index c0da6a179204b6..a48ea8f7951366 100644 --- a/src/plugins/feature_catalogue/public/plugin.test.mocks.ts +++ b/src/plugins/home/public/plugin.test.mocks.ts @@ -17,7 +17,7 @@ * under the License. */ -import { featureCatalogueRegistryMock } from './services/feature_catalogue_registry.mock'; +import { featureCatalogueRegistryMock } from './services/feature_catalogue/feature_catalogue_registry.mock'; export const registryMock = featureCatalogueRegistryMock.create(); jest.doMock('./services', () => ({ diff --git a/src/plugins/feature_catalogue/public/plugin.test.ts b/src/plugins/home/public/plugin.test.ts similarity index 79% rename from src/plugins/feature_catalogue/public/plugin.test.ts rename to src/plugins/home/public/plugin.test.ts index 8bbbb973b459ee..fad6e8cf47bfec 100644 --- a/src/plugins/feature_catalogue/public/plugin.test.ts +++ b/src/plugins/home/public/plugin.test.ts @@ -18,9 +18,9 @@ */ import { registryMock } from './plugin.test.mocks'; -import { FeatureCataloguePlugin } from './plugin'; +import { HomePublicPlugin } from './plugin'; -describe('FeatureCataloguePlugin', () => { +describe('HomePublicPlugin', () => { beforeEach(() => { registryMock.setup.mockClear(); registryMock.start.mockClear(); @@ -28,22 +28,22 @@ describe('FeatureCataloguePlugin', () => { describe('setup', () => { test('wires up and returns registry', async () => { - const setup = await new FeatureCataloguePlugin().setup(); - expect(registryMock.setup).toHaveBeenCalledWith(); - expect(setup.register).toBeDefined(); + const setup = await new HomePublicPlugin().setup(); + expect(setup).toHaveProperty('featureCatalogue'); + expect(setup.featureCatalogue).toHaveProperty('register'); }); }); describe('start', () => { test('wires up and returns registry', async () => { - const service = new FeatureCataloguePlugin(); + const service = new HomePublicPlugin(); await service.setup(); const core = { application: { capabilities: { catalogue: {} } } } as any; const start = await service.start(core); expect(registryMock.start).toHaveBeenCalledWith({ capabilities: core.application.capabilities, }); - expect(start.get).toBeDefined(); + expect(start.featureCatalogue.get).toBeDefined(); }); }); }); diff --git a/src/plugins/feature_catalogue/public/plugin.ts b/src/plugins/home/public/plugin.ts similarity index 71% rename from src/plugins/feature_catalogue/public/plugin.ts rename to src/plugins/home/public/plugin.ts index 46a70baff488af..40f2047ef00166 100644 --- a/src/plugins/feature_catalogue/public/plugin.ts +++ b/src/plugins/home/public/plugin.ts @@ -24,21 +24,22 @@ import { FeatureCatalogueRegistryStart, } from './services'; -export class FeatureCataloguePlugin - implements Plugin { +export class HomePublicPlugin implements Plugin { private readonly featuresCatalogueRegistry = new FeatureCatalogueRegistry(); public async setup() { return { - ...this.featuresCatalogueRegistry.setup(), + featureCatalogue: { ...this.featuresCatalogueRegistry.setup() }, }; } public async start(core: CoreStart) { return { - ...this.featuresCatalogueRegistry.start({ - capabilities: core.application.capabilities, - }), + featureCatalogue: { + ...this.featuresCatalogueRegistry.start({ + capabilities: core.application.capabilities, + }), + }, }; } } @@ -48,3 +49,13 @@ export type FeatureCatalogueSetup = FeatureCatalogueRegistrySetup; /** @public */ export type FeatureCatalogueStart = FeatureCatalogueRegistryStart; + +/** @public */ +export interface HomePublicPluginSetup { + featureCatalogue: FeatureCatalogueSetup; +} + +/** @public */ +export interface HomePublicPluginStart { + featureCatalogue: FeatureCatalogueStart; +} diff --git a/src/plugins/feature_catalogue/public/services/feature_catalogue_registry.mock.ts b/src/plugins/home/public/services/feature_catalogue/feature_catalogue_registry.mock.ts similarity index 100% rename from src/plugins/feature_catalogue/public/services/feature_catalogue_registry.mock.ts rename to src/plugins/home/public/services/feature_catalogue/feature_catalogue_registry.mock.ts diff --git a/src/plugins/feature_catalogue/public/services/feature_catalogue_registry.test.ts b/src/plugins/home/public/services/feature_catalogue/feature_catalogue_registry.test.ts similarity index 100% rename from src/plugins/feature_catalogue/public/services/feature_catalogue_registry.test.ts rename to src/plugins/home/public/services/feature_catalogue/feature_catalogue_registry.test.ts diff --git a/src/plugins/feature_catalogue/public/services/feature_catalogue_registry.ts b/src/plugins/home/public/services/feature_catalogue/feature_catalogue_registry.ts similarity index 100% rename from src/plugins/feature_catalogue/public/services/feature_catalogue_registry.ts rename to src/plugins/home/public/services/feature_catalogue/feature_catalogue_registry.ts diff --git a/src/plugins/home/public/services/feature_catalogue/index.ts b/src/plugins/home/public/services/feature_catalogue/index.ts new file mode 100644 index 00000000000000..eae01271e8559a --- /dev/null +++ b/src/plugins/home/public/services/feature_catalogue/index.ts @@ -0,0 +1,26 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +export { + FeatureCatalogueCategory, + FeatureCatalogueEntry, + FeatureCatalogueRegistry, + FeatureCatalogueRegistrySetup, + FeatureCatalogueRegistryStart, +} from './feature_catalogue_registry'; diff --git a/src/plugins/feature_catalogue/public/services/index.ts b/src/plugins/home/public/services/index.ts similarity index 94% rename from src/plugins/feature_catalogue/public/services/index.ts rename to src/plugins/home/public/services/index.ts index 17433264f5a428..3621b0912393a3 100644 --- a/src/plugins/feature_catalogue/public/services/index.ts +++ b/src/plugins/home/public/services/index.ts @@ -17,4 +17,4 @@ * under the License. */ -export * from './feature_catalogue_registry'; +export * from './feature_catalogue'; diff --git a/src/plugins/home/server/index.ts b/src/plugins/home/server/index.ts index 178a77dc85ca94..be4e20ab63d3c8 100644 --- a/src/plugins/home/server/index.ts +++ b/src/plugins/home/server/index.ts @@ -17,8 +17,8 @@ * under the License. */ -export { HomePluginSetup, HomePluginStart } from './plugin'; +export { HomeServerPluginSetup, HomeServerPluginStart } from './plugin'; export { TutorialProvider } from './services'; -import { HomePlugin } from './plugin'; +import { HomeServerPlugin } from './plugin'; -export const plugin = () => new HomePlugin(); +export const plugin = () => new HomeServerPlugin(); diff --git a/src/plugins/home/server/plugin.test.mocks.ts b/src/plugins/home/server/plugin.test.mocks.ts index df63b467d86562..a5640de579b151 100644 --- a/src/plugins/home/server/plugin.test.mocks.ts +++ b/src/plugins/home/server/plugin.test.mocks.ts @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import { tutorialsRegistryMock } from './services/tutorials_registry.mock'; +import { tutorialsRegistryMock } from './services/tutorials/tutorials_registry.mock'; export const registryMock = tutorialsRegistryMock.create(); jest.doMock('./services', () => ({ diff --git a/src/plugins/home/server/plugin.test.ts b/src/plugins/home/server/plugin.test.ts index e86a2d807109f5..eec6501436bf40 100644 --- a/src/plugins/home/server/plugin.test.ts +++ b/src/plugins/home/server/plugin.test.ts @@ -18,13 +18,13 @@ */ import { registryMock } from './plugin.test.mocks'; -import { HomePlugin } from './plugin'; +import { HomeServerPlugin } from './plugin'; import { coreMock } from '../../../core/server/mocks'; import { CoreSetup } from '../../../core/server'; type MockedKeys = { [P in keyof T]: jest.Mocked }; -describe('HomePlugin', () => { +describe('HomeServerPlugin', () => { beforeEach(() => { registryMock.setup.mockClear(); registryMock.start.mockClear(); @@ -34,7 +34,7 @@ describe('HomePlugin', () => { const mockCoreSetup: MockedKeys = coreMock.createSetup(); test('wires up and returns registerTutorial and addScopedTutorialContextFactory', () => { - const setup = new HomePlugin().setup(mockCoreSetup); + const setup = new HomeServerPlugin().setup(mockCoreSetup); expect(setup).toHaveProperty('tutorials'); expect(setup.tutorials).toHaveProperty('registerTutorial'); expect(setup.tutorials).toHaveProperty('addScopedTutorialContextFactory'); @@ -43,7 +43,7 @@ describe('HomePlugin', () => { describe('start', () => { test('is defined', () => { - const start = new HomePlugin().start(); + const start = new HomeServerPlugin().start(); expect(start).toBeDefined(); expect(start).toHaveProperty('tutorials'); }); diff --git a/src/plugins/home/server/plugin.ts b/src/plugins/home/server/plugin.ts index d5a3f235f8490e..89dda8205ce028 100644 --- a/src/plugins/home/server/plugin.ts +++ b/src/plugins/home/server/plugin.ts @@ -19,7 +19,7 @@ import { CoreSetup, Plugin } from 'src/core/server'; import { TutorialsRegistry, TutorialsRegistrySetup, TutorialsRegistryStart } from './services'; -export class HomePlugin implements Plugin { +export class HomeServerPlugin implements Plugin { private readonly tutorialsRegistry = new TutorialsRegistry(); public setup(core: CoreSetup) { @@ -36,11 +36,11 @@ export class HomePlugin implements Plugin { } /** @public */ -export interface HomePluginSetup { +export interface HomeServerPluginSetup { tutorials: TutorialsRegistrySetup; } /** @public */ -export interface HomePluginStart { +export interface HomeServerPluginStart { tutorials: TutorialsRegistryStart; } diff --git a/src/plugins/home/server/services/index.ts b/src/plugins/home/server/services/index.ts index 5fe5cb0ba47603..9bfbe4079c6bef 100644 --- a/src/plugins/home/server/services/index.ts +++ b/src/plugins/home/server/services/index.ts @@ -19,9 +19,17 @@ // provided to other plugins as APIs // should model the plugin lifecycle +export { TutorialsRegistry, TutorialsRegistrySetup, TutorialsRegistryStart } from './tutorials'; export { - TutorialsRegistry, - TutorialsRegistrySetup, - TutorialsRegistryStart, -} from './tutorials_registry'; -export * from '../lib/tutorials_registry_types'; + TutorialsCategory, + ParamTypes, + InstructionSetSchema, + ParamsSchema, + InstructionsSchema, + DashboardSchema, + ArtifactsSchema, + TutorialSchema, + TutorialProvider, + TutorialContextFactory, + ScopedTutorialContextFactory, +} from './tutorials'; diff --git a/src/plugins/home/server/services/tutorials/index.ts b/src/plugins/home/server/services/tutorials/index.ts new file mode 100644 index 00000000000000..d481a94516163c --- /dev/null +++ b/src/plugins/home/server/services/tutorials/index.ts @@ -0,0 +1,36 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +export { + TutorialsRegistry, + TutorialsRegistrySetup, + TutorialsRegistryStart, +} from './tutorials_registry'; +export { + TutorialsCategory, + ParamTypes, + InstructionSetSchema, + ParamsSchema, + InstructionsSchema, + DashboardSchema, + ArtifactsSchema, + TutorialSchema, + TutorialProvider, + TutorialContextFactory, + ScopedTutorialContextFactory, +} from './lib/tutorials_registry_types'; diff --git a/src/plugins/home/server/lib/tutorial_schema.ts b/src/plugins/home/server/services/tutorials/lib/tutorial_schema.ts similarity index 100% rename from src/plugins/home/server/lib/tutorial_schema.ts rename to src/plugins/home/server/services/tutorials/lib/tutorial_schema.ts diff --git a/src/plugins/home/server/lib/tutorials_registry_types.ts b/src/plugins/home/server/services/tutorials/lib/tutorials_registry_types.ts similarity index 100% rename from src/plugins/home/server/lib/tutorials_registry_types.ts rename to src/plugins/home/server/services/tutorials/lib/tutorials_registry_types.ts diff --git a/src/plugins/home/server/services/tutorials_registry.mock.ts b/src/plugins/home/server/services/tutorials/tutorials_registry.mock.ts similarity index 100% rename from src/plugins/home/server/services/tutorials_registry.mock.ts rename to src/plugins/home/server/services/tutorials/tutorials_registry.mock.ts diff --git a/src/plugins/home/server/services/tutorials_registry.test.ts b/src/plugins/home/server/services/tutorials/tutorials_registry.test.ts similarity index 95% rename from src/plugins/home/server/services/tutorials_registry.test.ts rename to src/plugins/home/server/services/tutorials/tutorials_registry.test.ts index 04c26bab1f065c..8144fef2d92e46 100644 --- a/src/plugins/home/server/services/tutorials_registry.test.ts +++ b/src/plugins/home/server/services/tutorials/tutorials_registry.test.ts @@ -18,16 +18,16 @@ */ import { TutorialsRegistry } from './tutorials_registry'; -import { coreMock } from '../../../../core/server/mocks'; -import { CoreSetup } from '../../../../core/server'; -import { httpServerMock } from '../../../../../src/core/server/mocks'; +import { coreMock } from '../../../../../core/server/mocks'; +import { CoreSetup } from '../../../../../core/server'; +import { httpServerMock } from '../../../../../core/server/mocks'; import { TutorialProvider, TutorialSchema, TutorialsCategory, ScopedTutorialContextFactory, -} from '../lib/tutorials_registry_types'; +} from './lib/tutorials_registry_types'; const INVALID_TUTORIAL: TutorialSchema = { id: 'test', diff --git a/src/plugins/home/server/services/tutorials_registry.ts b/src/plugins/home/server/services/tutorials/tutorials_registry.ts similarity index 96% rename from src/plugins/home/server/services/tutorials_registry.ts rename to src/plugins/home/server/services/tutorials/tutorials_registry.ts index 40692d85586561..be0302cbd81889 100644 --- a/src/plugins/home/server/services/tutorials_registry.ts +++ b/src/plugins/home/server/services/tutorials/tutorials_registry.ts @@ -23,8 +23,8 @@ import { TutorialProvider, TutorialContextFactory, ScopedTutorialContextFactory, -} from '../lib/tutorials_registry_types'; -import { tutorialSchema } from '../lib/tutorial_schema'; +} from './lib/tutorials_registry_types'; +import { tutorialSchema } from './lib/tutorial_schema'; export class TutorialsRegistry { private readonly tutorialProviders: TutorialProvider[] = []; // pre-register all the tutorials we know we want in here diff --git a/x-pack/plugins/spaces/server/plugin.ts b/x-pack/plugins/spaces/server/plugin.ts index 21120ab37b06a7..6511a5dc3f31b0 100644 --- a/x-pack/plugins/spaces/server/plugin.ts +++ b/x-pack/plugins/spaces/server/plugin.ts @@ -31,7 +31,7 @@ import { ConfigType } from './config'; import { toggleUICapabilities } from './lib/toggle_ui_capabilities'; import { initSpacesRequestInterceptors } from './lib/request_interceptors'; import { initExternalSpacesApi } from './routes/api/external'; -import { HomePluginSetup } from '../../../../src/plugins/home/server'; +import { HomeServerPluginSetup } from '../../../../src/plugins/home/server'; /** * Describes a set of APIs that is available in the legacy platform only and required by this plugin * to function properly. @@ -62,7 +62,7 @@ export interface PluginsSetup { features: FeaturesPluginSetup; licensing: LicensingPluginSetup; security?: SecurityPluginSetup; - home?: HomePluginSetup; + home?: HomeServerPluginSetup; } export interface SpacesPluginSetup {