diff --git a/docs/development/core/public/kibana-plugin-core-public.coresetup.doclinks.md b/docs/development/core/public/kibana-plugin-core-public.coresetup.doclinks.md
new file mode 100644
index 000000000000..b239319c427f
--- /dev/null
+++ b/docs/development/core/public/kibana-plugin-core-public.coresetup.doclinks.md
@@ -0,0 +1,13 @@
+
+
+[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [CoreSetup](./kibana-plugin-core-public.coresetup.md) > [docLinks](./kibana-plugin-core-public.coresetup.doclinks.md)
+
+## CoreSetup.docLinks property
+
+[DocLinksSetup](./kibana-plugin-core-public.doclinkssetup.md)
+
+Signature:
+
+```typescript
+docLinks: DocLinksSetup;
+```
diff --git a/docs/development/core/public/kibana-plugin-core-public.coresetup.md b/docs/development/core/public/kibana-plugin-core-public.coresetup.md
index 870fa33dce90..4f981b5a4013 100644
--- a/docs/development/core/public/kibana-plugin-core-public.coresetup.md
+++ b/docs/development/core/public/kibana-plugin-core-public.coresetup.md
@@ -18,6 +18,7 @@ export interface CoreSetupApplicationSetup | [ApplicationSetup](./kibana-plugin-core-public.applicationsetup.md) |
| [context](./kibana-plugin-core-public.coresetup.context.md) | ContextSetup
| [ContextSetup](./kibana-plugin-core-public.contextsetup.md) |
+| [docLinks](./kibana-plugin-core-public.coresetup.doclinks.md) | DocLinksSetup
| [DocLinksSetup](./kibana-plugin-core-public.doclinkssetup.md) |
| [fatalErrors](./kibana-plugin-core-public.coresetup.fatalerrors.md) | FatalErrorsSetup
| [FatalErrorsSetup](./kibana-plugin-core-public.fatalerrorssetup.md) |
| [getStartServices](./kibana-plugin-core-public.coresetup.getstartservices.md) | StartServicesAccessor<TPluginsStart, TStart>
| [StartServicesAccessor](./kibana-plugin-core-public.startservicesaccessor.md) |
| [http](./kibana-plugin-core-public.coresetup.http.md) | HttpSetup
| [HttpSetup](./kibana-plugin-core-public.httpsetup.md) |
diff --git a/docs/development/core/public/kibana-plugin-core-public.doclinkssetup.doc_link_version.md b/docs/development/core/public/kibana-plugin-core-public.doclinkssetup.doc_link_version.md
new file mode 100644
index 000000000000..c8d13bab92b0
--- /dev/null
+++ b/docs/development/core/public/kibana-plugin-core-public.doclinkssetup.doc_link_version.md
@@ -0,0 +1,11 @@
+
+
+[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [DocLinksSetup](./kibana-plugin-core-public.doclinkssetup.md) > [DOC\_LINK\_VERSION](./kibana-plugin-core-public.doclinkssetup.doc_link_version.md)
+
+## DocLinksSetup.DOC\_LINK\_VERSION property
+
+Signature:
+
+```typescript
+readonly DOC_LINK_VERSION: string;
+```
diff --git a/docs/development/core/public/kibana-plugin-core-public.doclinkssetup.elastic_website_url.md b/docs/development/core/public/kibana-plugin-core-public.doclinkssetup.elastic_website_url.md
new file mode 100644
index 000000000000..d8493148bae1
--- /dev/null
+++ b/docs/development/core/public/kibana-plugin-core-public.doclinkssetup.elastic_website_url.md
@@ -0,0 +1,11 @@
+
+
+[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [DocLinksSetup](./kibana-plugin-core-public.doclinkssetup.md) > [ELASTIC\_WEBSITE\_URL](./kibana-plugin-core-public.doclinkssetup.elastic_website_url.md)
+
+## DocLinksSetup.ELASTIC\_WEBSITE\_URL property
+
+Signature:
+
+```typescript
+readonly ELASTIC_WEBSITE_URL: string;
+```
diff --git a/docs/development/core/public/kibana-plugin-core-public.doclinksstart.links.md b/docs/development/core/public/kibana-plugin-core-public.doclinkssetup.links.md
similarity index 94%
rename from docs/development/core/public/kibana-plugin-core-public.doclinksstart.links.md
rename to docs/development/core/public/kibana-plugin-core-public.doclinkssetup.links.md
index b43c484f8de7..fd05ae139ba2 100644
--- a/docs/development/core/public/kibana-plugin-core-public.doclinksstart.links.md
+++ b/docs/development/core/public/kibana-plugin-core-public.doclinkssetup.links.md
@@ -1,8 +1,8 @@
-[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [DocLinksStart](./kibana-plugin-core-public.doclinksstart.md) > [links](./kibana-plugin-core-public.doclinksstart.links.md)
+[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [DocLinksSetup](./kibana-plugin-core-public.doclinkssetup.md) > [links](./kibana-plugin-core-public.doclinkssetup.links.md)
-## DocLinksStart.links property
+## DocLinksSetup.links property
Signature:
diff --git a/docs/development/core/public/kibana-plugin-core-public.doclinkssetup.md b/docs/development/core/public/kibana-plugin-core-public.doclinkssetup.md
new file mode 100644
index 000000000000..1114e05589c4
--- /dev/null
+++ b/docs/development/core/public/kibana-plugin-core-public.doclinkssetup.md
@@ -0,0 +1,21 @@
+
+
+[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [DocLinksSetup](./kibana-plugin-core-public.doclinkssetup.md)
+
+## DocLinksSetup interface
+
+
+Signature:
+
+```typescript
+export interface DocLinksSetup
+```
+
+## Properties
+
+| Property | Type | Description |
+| --- | --- | --- |
+| [DOC\_LINK\_VERSION](./kibana-plugin-core-public.doclinkssetup.doc_link_version.md) | string
| |
+| [ELASTIC\_WEBSITE\_URL](./kibana-plugin-core-public.doclinkssetup.elastic_website_url.md) | string
| |
+| [links](./kibana-plugin-core-public.doclinkssetup.links.md) | {
readonly filebeat: {
readonly base: string;
readonly installation: string;
readonly configuration: string;
readonly elasticsearchOutput: string;
readonly startup: string;
readonly exportedFields: string;
};
readonly auditbeat: {
readonly base: string;
};
readonly metricbeat: {
readonly base: string;
};
readonly heartbeat: {
readonly base: string;
};
readonly logstash: {
readonly base: string;
};
readonly functionbeat: {
readonly base: string;
};
readonly winlogbeat: {
readonly base: string;
};
readonly aggs: {
readonly date_histogram: string;
readonly date_range: string;
readonly filter: string;
readonly filters: string;
readonly geohash_grid: string;
readonly histogram: string;
readonly ip_range: string;
readonly range: string;
readonly significant_terms: string;
readonly terms: string;
readonly avg: string;
readonly avg_bucket: string;
readonly max_bucket: string;
readonly min_bucket: string;
readonly sum_bucket: string;
readonly cardinality: string;
readonly count: string;
readonly cumulative_sum: string;
readonly derivative: string;
readonly geo_bounds: string;
readonly geo_centroid: string;
readonly max: string;
readonly median: string;
readonly min: string;
readonly moving_avg: string;
readonly percentile_ranks: string;
readonly serial_diff: string;
readonly std_dev: string;
readonly sum: string;
readonly top_hits: string;
};
readonly scriptedFields: {
readonly scriptFields: string;
readonly scriptAggs: string;
readonly painless: string;
readonly painlessApi: string;
readonly painlessSyntax: string;
readonly luceneExpressions: string;
};
readonly indexPatterns: {
readonly loadingData: string;
readonly introduction: string;
};
readonly kibana: string;
readonly siem: {
readonly guide: string;
readonly gettingStarted: string;
};
readonly query: {
readonly luceneQuerySyntax: string;
readonly queryDsl: string;
readonly kueryQuerySyntax: string;
};
readonly date: {
readonly dateMath: string;
};
readonly management: Record<string, string>;
}
| |
+
diff --git a/docs/development/core/public/kibana-plugin-core-public.doclinksstart.doc_link_version.md b/docs/development/core/public/kibana-plugin-core-public.doclinksstart.doc_link_version.md
deleted file mode 100644
index 8140b3fcf380..000000000000
--- a/docs/development/core/public/kibana-plugin-core-public.doclinksstart.doc_link_version.md
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [DocLinksStart](./kibana-plugin-core-public.doclinksstart.md) > [DOC\_LINK\_VERSION](./kibana-plugin-core-public.doclinksstart.doc_link_version.md)
-
-## DocLinksStart.DOC\_LINK\_VERSION property
-
-Signature:
-
-```typescript
-readonly DOC_LINK_VERSION: string;
-```
diff --git a/docs/development/core/public/kibana-plugin-core-public.doclinksstart.elastic_website_url.md b/docs/development/core/public/kibana-plugin-core-public.doclinksstart.elastic_website_url.md
deleted file mode 100644
index af770ed3055a..000000000000
--- a/docs/development/core/public/kibana-plugin-core-public.doclinksstart.elastic_website_url.md
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [DocLinksStart](./kibana-plugin-core-public.doclinksstart.md) > [ELASTIC\_WEBSITE\_URL](./kibana-plugin-core-public.doclinksstart.elastic_website_url.md)
-
-## DocLinksStart.ELASTIC\_WEBSITE\_URL property
-
-Signature:
-
-```typescript
-readonly ELASTIC_WEBSITE_URL: string;
-```
diff --git a/docs/development/core/public/kibana-plugin-core-public.doclinksstart.md b/docs/development/core/public/kibana-plugin-core-public.doclinksstart.md
index 69bc4e473590..af2a41b69172 100644
--- a/docs/development/core/public/kibana-plugin-core-public.doclinksstart.md
+++ b/docs/development/core/public/kibana-plugin-core-public.doclinksstart.md
@@ -2,20 +2,11 @@
[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [DocLinksStart](./kibana-plugin-core-public.doclinksstart.md)
-## DocLinksStart interface
+## DocLinksStart type
Signature:
```typescript
-export interface DocLinksStart
+export declare type DocLinksStart = DocLinksSetup;
```
-
-## Properties
-
-| Property | Type | Description |
-| --- | --- | --- |
-| [DOC\_LINK\_VERSION](./kibana-plugin-core-public.doclinksstart.doc_link_version.md) | string
| |
-| [ELASTIC\_WEBSITE\_URL](./kibana-plugin-core-public.doclinksstart.elastic_website_url.md) | string
| |
-| [links](./kibana-plugin-core-public.doclinksstart.links.md) | {
readonly filebeat: {
readonly base: string;
readonly installation: string;
readonly configuration: string;
readonly elasticsearchOutput: string;
readonly startup: string;
readonly exportedFields: string;
};
readonly auditbeat: {
readonly base: string;
};
readonly metricbeat: {
readonly base: string;
};
readonly heartbeat: {
readonly base: string;
};
readonly logstash: {
readonly base: string;
};
readonly functionbeat: {
readonly base: string;
};
readonly winlogbeat: {
readonly base: string;
};
readonly aggs: {
readonly date_histogram: string;
readonly date_range: string;
readonly filter: string;
readonly filters: string;
readonly geohash_grid: string;
readonly histogram: string;
readonly ip_range: string;
readonly range: string;
readonly significant_terms: string;
readonly terms: string;
readonly avg: string;
readonly avg_bucket: string;
readonly max_bucket: string;
readonly min_bucket: string;
readonly sum_bucket: string;
readonly cardinality: string;
readonly count: string;
readonly cumulative_sum: string;
readonly derivative: string;
readonly geo_bounds: string;
readonly geo_centroid: string;
readonly max: string;
readonly median: string;
readonly min: string;
readonly moving_avg: string;
readonly percentile_ranks: string;
readonly serial_diff: string;
readonly std_dev: string;
readonly sum: string;
readonly top_hits: string;
};
readonly scriptedFields: {
readonly scriptFields: string;
readonly scriptAggs: string;
readonly painless: string;
readonly painlessApi: string;
readonly painlessSyntax: string;
readonly luceneExpressions: string;
};
readonly indexPatterns: {
readonly loadingData: string;
readonly introduction: string;
};
readonly kibana: string;
readonly siem: {
readonly guide: string;
readonly gettingStarted: string;
};
readonly query: {
readonly luceneQuerySyntax: string;
readonly queryDsl: string;
readonly kueryQuerySyntax: string;
};
readonly date: {
readonly dateMath: string;
};
readonly management: Record<string, string>;
}
| |
-
diff --git a/docs/development/core/public/kibana-plugin-core-public.md b/docs/development/core/public/kibana-plugin-core-public.md
index eafc81447ee0..b2524ec48c75 100644
--- a/docs/development/core/public/kibana-plugin-core-public.md
+++ b/docs/development/core/public/kibana-plugin-core-public.md
@@ -65,7 +65,7 @@ The plugin integrates with the core system via lifecycle events: `setup`
| [ContextSetup](./kibana-plugin-core-public.contextsetup.md) | An object that handles registration of context providers and configuring handlers with context. |
| [CoreSetup](./kibana-plugin-core-public.coresetup.md) | Core services exposed to the Plugin
setup lifecycle |
| [CoreStart](./kibana-plugin-core-public.corestart.md) | Core services exposed to the Plugin
start lifecycle |
-| [DocLinksStart](./kibana-plugin-core-public.doclinksstart.md) | |
+| [DocLinksSetup](./kibana-plugin-core-public.doclinkssetup.md) | |
| [EnvironmentMode](./kibana-plugin-core-public.environmentmode.md) | |
| [ErrorToastOptions](./kibana-plugin-core-public.errortoastoptions.md) | Options available for [IToasts](./kibana-plugin-core-public.itoasts.md) error APIs. |
| [FatalErrorInfo](./kibana-plugin-core-public.fatalerrorinfo.md) | Represents the message
and stack
of a fatal Error |
@@ -149,6 +149,7 @@ The plugin integrates with the core system via lifecycle events: `setup`
| [ChromeHelpExtensionMenuGitHubLink](./kibana-plugin-core-public.chromehelpextensionmenugithublink.md) | |
| [ChromeHelpExtensionMenuLink](./kibana-plugin-core-public.chromehelpextensionmenulink.md) | |
| [ChromeNavLinkUpdateableFields](./kibana-plugin-core-public.chromenavlinkupdateablefields.md) | |
+| [DocLinksStart](./kibana-plugin-core-public.doclinksstart.md) | |
| [FatalErrorsStart](./kibana-plugin-core-public.fatalerrorsstart.md) | FatalErrors stop the Kibana Public Core and displays a fatal error screen with details about the Kibana build and the error. |
| [Freezable](./kibana-plugin-core-public.freezable.md) | |
| [HandlerContextType](./kibana-plugin-core-public.handlercontexttype.md) | Extracts the type of the first argument of a [HandlerFunction](./kibana-plugin-core-public.handlerfunction.md) to represent the type of the context. |
diff --git a/src/core/public/core_system.test.ts b/src/core/public/core_system.test.ts
index a42719417a2b..2979dd7661e5 100644
--- a/src/core/public/core_system.test.ts
+++ b/src/core/public/core_system.test.ts
@@ -197,6 +197,11 @@ describe('#setup()', () => {
expect(MockInjectedMetadataService.setup).toHaveBeenCalledTimes(1);
});
+ it('calls docLinks#setup()', async () => {
+ await setupCore();
+ expect(MockDocLinksService.setup).toHaveBeenCalledTimes(1);
+ });
+
it('calls http#setup()', async () => {
await setupCore();
expect(MockHttpService.setup).toHaveBeenCalledTimes(1);
diff --git a/src/core/public/core_system.ts b/src/core/public/core_system.ts
index e58114b69dcc..46e1ecb83e9e 100644
--- a/src/core/public/core_system.ts
+++ b/src/core/public/core_system.ts
@@ -160,6 +160,7 @@ export class CoreSystem {
i18n: this.i18n.getContext(),
});
await this.integrations.setup();
+ const docLinks = this.docLinks.setup({ injectedMetadata });
const http = this.http.setup({ injectedMetadata, fatalErrors: this.fatalErrorsSetup });
const uiSettings = this.uiSettings.setup({ http, injectedMetadata });
const notifications = this.notifications.setup({ uiSettings });
@@ -180,6 +181,7 @@ export class CoreSystem {
const core: InternalCoreSetup = {
application,
context,
+ docLinks,
fatalErrors: this.fatalErrorsSetup,
http,
injectedMetadata,
@@ -211,7 +213,7 @@ export class CoreSystem {
try {
const injectedMetadata = await this.injectedMetadata.start();
const uiSettings = await this.uiSettings.start();
- const docLinks = await this.docLinks.start({ injectedMetadata });
+ const docLinks = this.docLinks.start();
const http = await this.http.start();
const savedObjects = await this.savedObjects.start({ http });
const i18n = await this.i18n.start();
diff --git a/src/core/public/doc_links/doc_links_service.mock.ts b/src/core/public/doc_links/doc_links_service.mock.ts
index 239249f40fe6..9edcf2e3c799 100644
--- a/src/core/public/doc_links/doc_links_service.mock.ts
+++ b/src/core/public/doc_links/doc_links_service.mock.ts
@@ -18,21 +18,25 @@
*/
import { injectedMetadataServiceMock } from '../injected_metadata/injected_metadata_service.mock';
-import { DocLinksService, DocLinksStart } from './doc_links_service';
+import { DocLinksService, DocLinksSetup, DocLinksStart } from './doc_links_service';
-const createStartContractMock = (): DocLinksStart => {
+const createSetupContractMock = (): DocLinksSetup => {
// This service is so simple that we actually use the real implementation
const injectedMetadata = injectedMetadataServiceMock.createStartContract();
injectedMetadata.getKibanaBranch.mockReturnValue('mocked-test-branch');
- return new DocLinksService().start({ injectedMetadata });
+ return new DocLinksService().setup({ injectedMetadata });
};
+const createStartContractMock: () => DocLinksStart = createSetupContractMock;
+
type DocLinksServiceContract = PublicMethodsOf;
const createMock = (): jest.Mocked => ({
+ setup: jest.fn().mockReturnValue(createSetupContractMock()),
start: jest.fn().mockReturnValue(createStartContractMock()),
});
export const docLinksServiceMock = {
create: createMock,
+ createSetupContract: createSetupContractMock,
createStartContract: createStartContractMock,
};
diff --git a/src/core/public/doc_links/doc_links_service.test.ts b/src/core/public/doc_links/doc_links_service.test.ts
index 283bfa9e2771..4c5d6bcde8b7 100644
--- a/src/core/public/doc_links/doc_links_service.test.ts
+++ b/src/core/public/doc_links/doc_links_service.test.ts
@@ -20,15 +20,33 @@
import { DocLinksService } from './doc_links_service';
import { injectedMetadataServiceMock } from '../injected_metadata/injected_metadata_service.mock';
-describe('DocLinksService#start()', () => {
+describe('DocLinksService#setup()', () => {
it('templates the doc links with the branch information from injectedMetadata', () => {
const injectedMetadata = injectedMetadataServiceMock.createStartContract();
injectedMetadata.getKibanaBranch.mockReturnValue('test-branch');
const service = new DocLinksService();
- const start = service.start({ injectedMetadata });
- expect(start.DOC_LINK_VERSION).toEqual('test-branch');
- expect(start.links.kibana).toEqual(
+ const setup = service.setup({ injectedMetadata });
+ expect(setup.DOC_LINK_VERSION).toEqual('test-branch');
+ expect(setup.links.kibana).toEqual(
'https://www.elastic.co/guide/en/kibana/test-branch/index.html'
);
});
});
+
+describe('DocLinksService#start()', () => {
+ it('returns the same data as setup', () => {
+ const injectedMetadata = injectedMetadataServiceMock.createStartContract();
+ injectedMetadata.getKibanaBranch.mockReturnValue('test-branch');
+ const service = new DocLinksService();
+ const setup = service.setup({ injectedMetadata });
+ const start = service.start();
+ expect(setup).toEqual(start);
+ });
+
+ it('must be called after setup', () => {
+ const service = new DocLinksService();
+ expect(() => {
+ service.start();
+ }).toThrowErrorMatchingInlineSnapshot(`"DocLinksService#setup() must be called first!"`);
+ });
+});
diff --git a/src/core/public/doc_links/doc_links_service.ts b/src/core/public/doc_links/doc_links_service.ts
index 9b672d40961d..aeeb8c3342e4 100644
--- a/src/core/public/doc_links/doc_links_service.ts
+++ b/src/core/public/doc_links/doc_links_service.ts
@@ -17,21 +17,23 @@
* under the License.
*/
-import { InjectedMetadataStart } from '../injected_metadata';
+import { InjectedMetadataSetup } from '../injected_metadata';
import { deepFreeze } from '../../utils';
-interface StartDeps {
- injectedMetadata: InjectedMetadataStart;
+interface SetupDeps {
+ injectedMetadata: InjectedMetadataSetup;
}
/** @internal */
export class DocLinksService {
- public start({ injectedMetadata }: StartDeps): DocLinksStart {
+ private service?: DocLinksSetup;
+
+ public setup({ injectedMetadata }: SetupDeps): DocLinksSetup {
const DOC_LINK_VERSION = injectedMetadata.getKibanaBranch();
const ELASTIC_WEBSITE_URL = 'https://www.elastic.co/';
const ELASTICSEARCH_DOCS = `${ELASTIC_WEBSITE_URL}guide/en/elasticsearch/reference/${DOC_LINK_VERSION}/`;
- return deepFreeze({
+ this.service = deepFreeze({
DOC_LINK_VERSION,
ELASTIC_WEBSITE_URL,
links: {
@@ -124,11 +126,21 @@ export class DocLinksService {
},
},
});
+
+ return this.service;
+ }
+
+ public start(): DocLinksStart {
+ if (!this.service) {
+ throw new Error(`DocLinksService#setup() must be called first!`);
+ }
+
+ return this.service;
}
}
/** @public */
-export interface DocLinksStart {
+export interface DocLinksSetup {
readonly DOC_LINK_VERSION: string;
readonly ELASTIC_WEBSITE_URL: string;
readonly links: {
@@ -218,3 +230,6 @@ export interface DocLinksStart {
readonly management: Record;
};
}
+
+/** @public */
+export type DocLinksStart = DocLinksSetup;
diff --git a/src/core/public/doc_links/index.ts b/src/core/public/doc_links/index.ts
index fe49d4a7c6a5..fbfa9db5635d 100644
--- a/src/core/public/doc_links/index.ts
+++ b/src/core/public/doc_links/index.ts
@@ -17,4 +17,4 @@
* under the License.
*/
-export { DocLinksService, DocLinksStart } from './doc_links_service';
+export { DocLinksService, DocLinksSetup, DocLinksStart } from './doc_links_service';
diff --git a/src/core/public/index.ts b/src/core/public/index.ts
index 3b2d9ed3c0b0..3698fdcfe951 100644
--- a/src/core/public/index.ts
+++ b/src/core/public/index.ts
@@ -65,7 +65,7 @@ import { OverlayStart } from './overlays';
import { Plugin, PluginInitializer, PluginInitializerContext, PluginOpaqueId } from './plugins';
import { UiSettingsState, IUiSettingsClient } from './ui_settings';
import { ApplicationSetup, Capabilities, ApplicationStart } from './application';
-import { DocLinksStart } from './doc_links';
+import { DocLinksSetup, DocLinksStart } from './doc_links';
import { SavedObjectsStart } from './saved_objects';
export { PackageInfo, EnvironmentMode } from '../server/types';
import {
@@ -208,6 +208,8 @@ export interface CoreSetup, any, any]>, []>(() =>
Promise.resolve([createCoreStartMock({ basePath }), pluginStartDeps, pluginStartContract])
diff --git a/src/core/public/plugins/plugin_context.ts b/src/core/public/plugins/plugin_context.ts
index 19cfadf70be1..c4b3c929415e 100644
--- a/src/core/public/plugins/plugin_context.ts
+++ b/src/core/public/plugins/plugin_context.ts
@@ -101,6 +101,7 @@ export function createPluginSetupContext<
deps.application.registerMountContext(plugin.opaqueId, contextName, provider),
},
context: deps.context,
+ docLinks: deps.docLinks,
fatalErrors: deps.fatalErrors,
http: deps.http,
notifications: deps.notifications,
diff --git a/src/core/public/plugins/plugins_service.test.ts b/src/core/public/plugins/plugins_service.test.ts
index 6d71844bc19c..6c5ab5fcedcf 100644
--- a/src/core/public/plugins/plugins_service.test.ts
+++ b/src/core/public/plugins/plugins_service.test.ts
@@ -89,6 +89,7 @@ describe('PluginsService', () => {
mockSetupDeps = {
application: applicationServiceMock.createInternalSetupContract(),
context: contextServiceMock.createSetupContract(),
+ docLinks: docLinksServiceMock.createSetupContract(),
fatalErrors: fatalErrorsServiceMock.createSetupContract(),
http: httpServiceMock.createSetupContract(),
injectedMetadata: pick(injectedMetadataServiceMock.createStartContract(), 'getInjectedVar'),
diff --git a/src/core/public/public.api.md b/src/core/public/public.api.md
index 225ef611c029..fbd8f474151f 100644
--- a/src/core/public/public.api.md
+++ b/src/core/public/public.api.md
@@ -383,6 +383,8 @@ export interface CoreSetup;
@@ -471,7 +473,7 @@ export const DEFAULT_APP_CATEGORIES: Readonly<{
}>;
// @public (undocumented)
-export interface DocLinksStart {
+export interface DocLinksSetup {
// (undocumented)
readonly DOC_LINK_VERSION: string;
// (undocumented)
@@ -565,6 +567,9 @@ export interface DocLinksStart {
};
}
+// @public (undocumented)
+export type DocLinksStart = DocLinksSetup;
+
// @public (undocumented)
export interface EnvironmentMode {
// (undocumented)