diff --git a/src/plugins/maps_ems/public/plugin.ts b/src/plugins/maps_ems/public/plugin.ts index 5310c65cc2176..c7ae8c728e672 100644 --- a/src/plugins/maps_ems/public/plugin.ts +++ b/src/plugins/maps_ems/public/plugin.ts @@ -21,15 +21,6 @@ import { getServiceSettings } from './lazy_load_bundle/get_service_settings'; * @public */ -export const bindSetupCoreAndPlugins = ( - core: CoreSetup, - config: MapsEmsConfig, - kibanaVersion: string -) => { - setKibanaVersion(kibanaVersion); - setMapsEmsConfig(config); -}; - // eslint-disable-next-line @typescript-eslint/no-empty-interface export interface MapsEmsStartDependencies {} // eslint-disable-next-line @typescript-eslint/no-empty-interface @@ -46,7 +37,8 @@ export class MapsEmsPlugin implements Plugin(); const kibanaVersion = this._initializerContext.env.packageInfo.version; - bindSetupCoreAndPlugins(core, config, kibanaVersion); + setKibanaVersion(kibanaVersion); + setMapsEmsConfig(config); return { getServiceSettings, diff --git a/src/plugins/maps_ems/public/service_settings/service_settings.ts b/src/plugins/maps_ems/public/service_settings/service_settings.ts index ad23001f16eaf..f7c735b6c3037 100644 --- a/src/plugins/maps_ems/public/service_settings/service_settings.ts +++ b/src/plugins/maps_ems/public/service_settings/service_settings.ts @@ -70,8 +70,11 @@ export class ServiceSettings implements IServiceSettings { this._showZoomMessage = false; } - __debugStubManifestCalls(manifestRetrieval: () => Promise): { removeStub: () => void } { + __debugStubManifestCalls(manifestRetrieval: () => Promise): { removeStub: () => void } { const oldGetManifest = this._emsClient.getManifest; + + // This legacy code used for debugging/testing only. + // @ts-expect-error this._emsClient.getManifest = manifestRetrieval; return { removeStub: () => { diff --git a/src/plugins/maps_legacy/public/plugin.ts b/src/plugins/maps_legacy/public/plugin.ts index 4efa18fc6f0da..688cc3d6d7425 100644 --- a/src/plugins/maps_legacy/public/plugin.ts +++ b/src/plugins/maps_legacy/public/plugin.ts @@ -54,7 +54,10 @@ export class MapsLegacyPlugin implements Plugin new BaseMapsVisualizationProvider();