mirror of
https://github.com/elastic/kibana.git
synced 2025-06-28 11:05:39 -04:00
Create core packages for docLinks browser/server services (#133360)
* Create core packages for docLinks browser/server services * fix mock imports * fix service imports * fix server-side type imports * fix type imports on browser side * updating readme files * update generated doc * add base server mock package * adapt core usages of coreContextMock * fix tests / mocks * lint * add missing export * fix another test import * import from package
This commit is contained in:
parent
a8cef96515
commit
2fddd18fa7
113 changed files with 1229 additions and 224 deletions
|
@ -4,7 +4,6 @@
|
||||||
|
|
||||||
## CoreStart.docLinks property
|
## CoreStart.docLinks property
|
||||||
|
|
||||||
[DocLinksStart](./kibana-plugin-core-public.doclinksstart.md)
|
|
||||||
|
|
||||||
<b>Signature:</b>
|
<b>Signature:</b>
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ export interface CoreStart
|
||||||
| [application](./kibana-plugin-core-public.corestart.application.md) | ApplicationStart | [ApplicationStart](./kibana-plugin-core-public.applicationstart.md) |
|
| [application](./kibana-plugin-core-public.corestart.application.md) | ApplicationStart | [ApplicationStart](./kibana-plugin-core-public.applicationstart.md) |
|
||||||
| [chrome](./kibana-plugin-core-public.corestart.chrome.md) | ChromeStart | [ChromeStart](./kibana-plugin-core-public.chromestart.md) |
|
| [chrome](./kibana-plugin-core-public.corestart.chrome.md) | ChromeStart | [ChromeStart](./kibana-plugin-core-public.chromestart.md) |
|
||||||
| [deprecations](./kibana-plugin-core-public.corestart.deprecations.md) | DeprecationsServiceStart | [DeprecationsServiceStart](./kibana-plugin-core-public.deprecationsservicestart.md) |
|
| [deprecations](./kibana-plugin-core-public.corestart.deprecations.md) | DeprecationsServiceStart | [DeprecationsServiceStart](./kibana-plugin-core-public.deprecationsservicestart.md) |
|
||||||
| [docLinks](./kibana-plugin-core-public.corestart.doclinks.md) | DocLinksStart | [DocLinksStart](./kibana-plugin-core-public.doclinksstart.md) |
|
| [docLinks](./kibana-plugin-core-public.corestart.doclinks.md) | DocLinksStart | |
|
||||||
| [executionContext](./kibana-plugin-core-public.corestart.executioncontext.md) | ExecutionContextStart | [ExecutionContextStart](./kibana-plugin-core-public.executioncontextstart.md) |
|
| [executionContext](./kibana-plugin-core-public.corestart.executioncontext.md) | ExecutionContextStart | [ExecutionContextStart](./kibana-plugin-core-public.executioncontextstart.md) |
|
||||||
| [fatalErrors](./kibana-plugin-core-public.corestart.fatalerrors.md) | FatalErrorsStart | [FatalErrorsStart](./kibana-plugin-core-public.fatalerrorsstart.md) |
|
| [fatalErrors](./kibana-plugin-core-public.corestart.fatalerrors.md) | FatalErrorsStart | [FatalErrorsStart](./kibana-plugin-core-public.fatalerrorsstart.md) |
|
||||||
| [http](./kibana-plugin-core-public.corestart.http.md) | HttpStart | [HttpStart](./kibana-plugin-core-public.httpstart.md) |
|
| [http](./kibana-plugin-core-public.corestart.http.md) | HttpStart | [HttpStart](./kibana-plugin-core-public.httpstart.md) |
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
||||||
|
|
||||||
[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
|
|
||||||
|
|
||||||
<b>Signature:</b>
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
readonly DOC_LINK_VERSION: string;
|
|
||||||
```
|
|
|
@ -1,11 +0,0 @@
|
||||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
||||||
|
|
||||||
[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
|
|
||||||
|
|
||||||
<b>Signature:</b>
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
readonly ELASTIC_WEBSITE_URL: string;
|
|
||||||
```
|
|
|
@ -1,11 +0,0 @@
|
||||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
||||||
|
|
||||||
[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)
|
|
||||||
|
|
||||||
## DocLinksStart.links property
|
|
||||||
|
|
||||||
<b>Signature:</b>
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
readonly links: DocLinks;
|
|
||||||
```
|
|
|
@ -1,21 +0,0 @@
|
||||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
||||||
|
|
||||||
[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [DocLinksStart](./kibana-plugin-core-public.doclinksstart.md)
|
|
||||||
|
|
||||||
## DocLinksStart interface
|
|
||||||
|
|
||||||
|
|
||||||
<b>Signature:</b>
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
export interface DocLinksStart
|
|
||||||
```
|
|
||||||
|
|
||||||
## 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) | DocLinks | |
|
|
||||||
|
|
|
@ -59,7 +59,6 @@ The plugin integrates with the core system via lifecycle events: `setup`<!-- -->
|
||||||
| [CoreStart](./kibana-plugin-core-public.corestart.md) | Core services exposed to the <code>Plugin</code> start lifecycle |
|
| [CoreStart](./kibana-plugin-core-public.corestart.md) | Core services exposed to the <code>Plugin</code> start lifecycle |
|
||||||
| [CoreTheme](./kibana-plugin-core-public.coretheme.md) | Contains all the required information to apply Kibana's theme at the various levels it can be used. |
|
| [CoreTheme](./kibana-plugin-core-public.coretheme.md) | Contains all the required information to apply Kibana's theme at the various levels it can be used. |
|
||||||
| [DeprecationsServiceStart](./kibana-plugin-core-public.deprecationsservicestart.md) | DeprecationsService provides methods to fetch domain deprecation details from the Kibana server. |
|
| [DeprecationsServiceStart](./kibana-plugin-core-public.deprecationsservicestart.md) | DeprecationsService provides methods to fetch domain deprecation details from the Kibana server. |
|
||||||
| [DocLinksStart](./kibana-plugin-core-public.doclinksstart.md) | |
|
|
||||||
| [ErrorToastOptions](./kibana-plugin-core-public.errortoastoptions.md) | Options available for [IToasts](./kibana-plugin-core-public.itoasts.md) error APIs. |
|
| [ErrorToastOptions](./kibana-plugin-core-public.errortoastoptions.md) | Options available for [IToasts](./kibana-plugin-core-public.itoasts.md) error APIs. |
|
||||||
| [ExecutionContextSetup](./kibana-plugin-core-public.executioncontextsetup.md) | Kibana execution context. Used to provide execution context to Elasticsearch, reporting, performance monitoring, etc. |
|
| [ExecutionContextSetup](./kibana-plugin-core-public.executioncontextsetup.md) | Kibana execution context. Used to provide execution context to Elasticsearch, reporting, performance monitoring, etc. |
|
||||||
| [FatalErrorInfo](./kibana-plugin-core-public.fatalerrorinfo.md) | Represents the <code>message</code> and <code>stack</code> of a fatal Error |
|
| [FatalErrorInfo](./kibana-plugin-core-public.fatalerrorinfo.md) | Represents the <code>message</code> and <code>stack</code> of a fatal Error |
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
|
|
||||||
## CoreSetup.docLinks property
|
## CoreSetup.docLinks property
|
||||||
|
|
||||||
[DocLinksServiceSetup](./kibana-plugin-core-server.doclinksservicesetup.md)
|
|
||||||
|
|
||||||
<b>Signature:</b>
|
<b>Signature:</b>
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ export interface CoreSetup<TPluginsStart extends object = object, TStart = unkno
|
||||||
| [capabilities](./kibana-plugin-core-server.coresetup.capabilities.md) | CapabilitiesSetup | [CapabilitiesSetup](./kibana-plugin-core-server.capabilitiessetup.md) |
|
| [capabilities](./kibana-plugin-core-server.coresetup.capabilities.md) | CapabilitiesSetup | [CapabilitiesSetup](./kibana-plugin-core-server.capabilitiessetup.md) |
|
||||||
| [context](./kibana-plugin-core-server.coresetup.context.md) | ContextSetup | [ContextSetup](./kibana-plugin-core-server.contextsetup.md) |
|
| [context](./kibana-plugin-core-server.coresetup.context.md) | ContextSetup | [ContextSetup](./kibana-plugin-core-server.contextsetup.md) |
|
||||||
| [deprecations](./kibana-plugin-core-server.coresetup.deprecations.md) | DeprecationsServiceSetup | [DeprecationsServiceSetup](./kibana-plugin-core-server.deprecationsservicesetup.md) |
|
| [deprecations](./kibana-plugin-core-server.coresetup.deprecations.md) | DeprecationsServiceSetup | [DeprecationsServiceSetup](./kibana-plugin-core-server.deprecationsservicesetup.md) |
|
||||||
| [docLinks](./kibana-plugin-core-server.coresetup.doclinks.md) | DocLinksServiceSetup | [DocLinksServiceSetup](./kibana-plugin-core-server.doclinksservicesetup.md) |
|
| [docLinks](./kibana-plugin-core-server.coresetup.doclinks.md) | DocLinksServiceSetup | |
|
||||||
| [elasticsearch](./kibana-plugin-core-server.coresetup.elasticsearch.md) | ElasticsearchServiceSetup | [ElasticsearchServiceSetup](./kibana-plugin-core-server.elasticsearchservicesetup.md) |
|
| [elasticsearch](./kibana-plugin-core-server.coresetup.elasticsearch.md) | ElasticsearchServiceSetup | [ElasticsearchServiceSetup](./kibana-plugin-core-server.elasticsearchservicesetup.md) |
|
||||||
| [executionContext](./kibana-plugin-core-server.coresetup.executioncontext.md) | ExecutionContextSetup | [ExecutionContextSetup](./kibana-plugin-core-server.executioncontextsetup.md) |
|
| [executionContext](./kibana-plugin-core-server.coresetup.executioncontext.md) | ExecutionContextSetup | [ExecutionContextSetup](./kibana-plugin-core-server.executioncontextsetup.md) |
|
||||||
| [getStartServices](./kibana-plugin-core-server.coresetup.getstartservices.md) | StartServicesAccessor<TPluginsStart, TStart> | [StartServicesAccessor](./kibana-plugin-core-server.startservicesaccessor.md) |
|
| [getStartServices](./kibana-plugin-core-server.coresetup.getstartservices.md) | StartServicesAccessor<TPluginsStart, TStart> | [StartServicesAccessor](./kibana-plugin-core-server.startservicesaccessor.md) |
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
|
|
||||||
## CoreStart.docLinks property
|
## CoreStart.docLinks property
|
||||||
|
|
||||||
[DocLinksServiceStart](./kibana-plugin-core-server.doclinksservicestart.md)
|
|
||||||
|
|
||||||
<b>Signature:</b>
|
<b>Signature:</b>
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ export interface CoreStart
|
||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| [analytics](./kibana-plugin-core-server.corestart.analytics.md) | AnalyticsServiceStart | [AnalyticsServiceStart](./kibana-plugin-core-server.analyticsservicestart.md) |
|
| [analytics](./kibana-plugin-core-server.corestart.analytics.md) | AnalyticsServiceStart | [AnalyticsServiceStart](./kibana-plugin-core-server.analyticsservicestart.md) |
|
||||||
| [capabilities](./kibana-plugin-core-server.corestart.capabilities.md) | CapabilitiesStart | [CapabilitiesStart](./kibana-plugin-core-server.capabilitiesstart.md) |
|
| [capabilities](./kibana-plugin-core-server.corestart.capabilities.md) | CapabilitiesStart | [CapabilitiesStart](./kibana-plugin-core-server.capabilitiesstart.md) |
|
||||||
| [docLinks](./kibana-plugin-core-server.corestart.doclinks.md) | DocLinksServiceStart | [DocLinksServiceStart](./kibana-plugin-core-server.doclinksservicestart.md) |
|
| [docLinks](./kibana-plugin-core-server.corestart.doclinks.md) | DocLinksServiceStart | |
|
||||||
| [elasticsearch](./kibana-plugin-core-server.corestart.elasticsearch.md) | ElasticsearchServiceStart | [ElasticsearchServiceStart](./kibana-plugin-core-server.elasticsearchservicestart.md) |
|
| [elasticsearch](./kibana-plugin-core-server.corestart.elasticsearch.md) | ElasticsearchServiceStart | [ElasticsearchServiceStart](./kibana-plugin-core-server.elasticsearchservicestart.md) |
|
||||||
| [executionContext](./kibana-plugin-core-server.corestart.executioncontext.md) | ExecutionContextStart | [ExecutionContextStart](./kibana-plugin-core-server.executioncontextstart.md) |
|
| [executionContext](./kibana-plugin-core-server.corestart.executioncontext.md) | ExecutionContextStart | [ExecutionContextStart](./kibana-plugin-core-server.executioncontextstart.md) |
|
||||||
| [http](./kibana-plugin-core-server.corestart.http.md) | HttpServiceStart | [HttpServiceStart](./kibana-plugin-core-server.httpservicestart.md) |
|
| [http](./kibana-plugin-core-server.corestart.http.md) | HttpServiceStart | [HttpServiceStart](./kibana-plugin-core-server.httpservicestart.md) |
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
||||||
|
|
||||||
[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [DocLinksServiceSetup](./kibana-plugin-core-server.doclinksservicesetup.md) > [elasticWebsiteUrl](./kibana-plugin-core-server.doclinksservicesetup.elasticwebsiteurl.md)
|
|
||||||
|
|
||||||
## DocLinksServiceSetup.elasticWebsiteUrl property
|
|
||||||
|
|
||||||
The base url for the elastic website
|
|
||||||
|
|
||||||
<b>Signature:</b>
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
readonly elasticWebsiteUrl: string;
|
|
||||||
```
|
|
|
@ -1,13 +0,0 @@
|
||||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
||||||
|
|
||||||
[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [DocLinksServiceSetup](./kibana-plugin-core-server.doclinksservicesetup.md) > [links](./kibana-plugin-core-server.doclinksservicesetup.links.md)
|
|
||||||
|
|
||||||
## DocLinksServiceSetup.links property
|
|
||||||
|
|
||||||
A record of all registered doc links
|
|
||||||
|
|
||||||
<b>Signature:</b>
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
readonly links: DocLinks;
|
|
||||||
```
|
|
|
@ -1,21 +0,0 @@
|
||||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
||||||
|
|
||||||
[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [DocLinksServiceSetup](./kibana-plugin-core-server.doclinksservicesetup.md)
|
|
||||||
|
|
||||||
## DocLinksServiceSetup interface
|
|
||||||
|
|
||||||
|
|
||||||
<b>Signature:</b>
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
export interface DocLinksServiceSetup
|
|
||||||
```
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
| Property | Type | Description |
|
|
||||||
| --- | --- | --- |
|
|
||||||
| [elasticWebsiteUrl](./kibana-plugin-core-server.doclinksservicesetup.elasticwebsiteurl.md) | string | The base url for the elastic website |
|
|
||||||
| [links](./kibana-plugin-core-server.doclinksservicesetup.links.md) | DocLinks | A record of all registered doc links |
|
|
||||||
| [version](./kibana-plugin-core-server.doclinksservicesetup.version.md) | string | The branch/version the docLinks are pointing to |
|
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
||||||
|
|
||||||
[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [DocLinksServiceSetup](./kibana-plugin-core-server.doclinksservicesetup.md) > [version](./kibana-plugin-core-server.doclinksservicesetup.version.md)
|
|
||||||
|
|
||||||
## DocLinksServiceSetup.version property
|
|
||||||
|
|
||||||
The branch/version the docLinks are pointing to
|
|
||||||
|
|
||||||
<b>Signature:</b>
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
readonly version: string;
|
|
||||||
```
|
|
|
@ -1,12 +0,0 @@
|
||||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
||||||
|
|
||||||
[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [DocLinksServiceStart](./kibana-plugin-core-server.doclinksservicestart.md)
|
|
||||||
|
|
||||||
## DocLinksServiceStart type
|
|
||||||
|
|
||||||
|
|
||||||
<b>Signature:</b>
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
export declare type DocLinksServiceStart = DocLinksServiceSetup;
|
|
||||||
```
|
|
|
@ -67,7 +67,6 @@ The plugin integrates with the core system via lifecycle events: `setup`<!-- -->
|
||||||
| [DeprecationsClient](./kibana-plugin-core-server.deprecationsclient.md) | Server-side client that provides access to fetch all Kibana deprecations |
|
| [DeprecationsClient](./kibana-plugin-core-server.deprecationsclient.md) | Server-side client that provides access to fetch all Kibana deprecations |
|
||||||
| [DeprecationSettings](./kibana-plugin-core-server.deprecationsettings.md) | UiSettings deprecation field options. |
|
| [DeprecationSettings](./kibana-plugin-core-server.deprecationsettings.md) | UiSettings deprecation field options. |
|
||||||
| [DeprecationsServiceSetup](./kibana-plugin-core-server.deprecationsservicesetup.md) | The deprecations service provides a way for the Kibana platform to communicate deprecated features and configs with its users. These deprecations are only communicated if the deployment is using these features. Allowing for a user tailored experience for upgrading the stack version.<!-- -->The Deprecation service is consumed by the upgrade assistant to assist with the upgrade experience.<!-- -->If a deprecated feature can be resolved without manual user intervention. Using correctiveActions.api allows the Upgrade Assistant to use this api to correct the deprecation upon a user trigger. |
|
| [DeprecationsServiceSetup](./kibana-plugin-core-server.deprecationsservicesetup.md) | The deprecations service provides a way for the Kibana platform to communicate deprecated features and configs with its users. These deprecations are only communicated if the deployment is using these features. Allowing for a user tailored experience for upgrading the stack version.<!-- -->The Deprecation service is consumed by the upgrade assistant to assist with the upgrade experience.<!-- -->If a deprecated feature can be resolved without manual user intervention. Using correctiveActions.api allows the Upgrade Assistant to use this api to correct the deprecation upon a user trigger. |
|
||||||
| [DocLinksServiceSetup](./kibana-plugin-core-server.doclinksservicesetup.md) | |
|
|
||||||
| [ElasticsearchConfigPreboot](./kibana-plugin-core-server.elasticsearchconfigpreboot.md) | A limited set of Elasticsearch configuration entries exposed to the <code>preboot</code> plugins at <code>setup</code>. |
|
| [ElasticsearchConfigPreboot](./kibana-plugin-core-server.elasticsearchconfigpreboot.md) | A limited set of Elasticsearch configuration entries exposed to the <code>preboot</code> plugins at <code>setup</code>. |
|
||||||
| [ElasticsearchErrorDetails](./kibana-plugin-core-server.elasticsearcherrordetails.md) | |
|
| [ElasticsearchErrorDetails](./kibana-plugin-core-server.elasticsearcherrordetails.md) | |
|
||||||
| [ElasticsearchServicePreboot](./kibana-plugin-core-server.elasticsearchservicepreboot.md) | |
|
| [ElasticsearchServicePreboot](./kibana-plugin-core-server.elasticsearchservicepreboot.md) | |
|
||||||
|
@ -265,7 +264,6 @@ The plugin integrates with the core system via lifecycle events: `setup`<!-- -->
|
||||||
| [CustomRequestHandlerContext](./kibana-plugin-core-server.customrequesthandlercontext.md) | |
|
| [CustomRequestHandlerContext](./kibana-plugin-core-server.customrequesthandlercontext.md) | |
|
||||||
| [DeprecationsDetails](./kibana-plugin-core-server.deprecationsdetails.md) | |
|
| [DeprecationsDetails](./kibana-plugin-core-server.deprecationsdetails.md) | |
|
||||||
| [DestructiveRouteMethod](./kibana-plugin-core-server.destructiveroutemethod.md) | Set of HTTP methods changing the state of the server. |
|
| [DestructiveRouteMethod](./kibana-plugin-core-server.destructiveroutemethod.md) | Set of HTTP methods changing the state of the server. |
|
||||||
| [DocLinksServiceStart](./kibana-plugin-core-server.doclinksservicestart.md) | |
|
|
||||||
| [ElasticsearchClient](./kibana-plugin-core-server.elasticsearchclient.md) | Client used to query the elasticsearch cluster. |
|
| [ElasticsearchClient](./kibana-plugin-core-server.elasticsearchclient.md) | Client used to query the elasticsearch cluster. |
|
||||||
| [ElasticsearchClientConfig](./kibana-plugin-core-server.elasticsearchclientconfig.md) | Configuration options to be used to create a [cluster client](./kibana-plugin-core-server.iclusterclient.md) using the [createClient API](./kibana-plugin-core-server.elasticsearchservicestart.createclient.md) |
|
| [ElasticsearchClientConfig](./kibana-plugin-core-server.elasticsearchclientconfig.md) | Configuration options to be used to create a [cluster client](./kibana-plugin-core-server.iclusterclient.md) using the [createClient API](./kibana-plugin-core-server.elasticsearchservicestart.createclient.md) |
|
||||||
| [ExecutionContextStart](./kibana-plugin-core-server.executioncontextstart.md) | |
|
| [ExecutionContextStart](./kibana-plugin-core-server.executioncontextstart.md) | |
|
||||||
|
|
14
package.json
14
package.json
|
@ -151,6 +151,13 @@
|
||||||
"@kbn/core-base-common": "link:bazel-bin/packages/core/base/core-base-common",
|
"@kbn/core-base-common": "link:bazel-bin/packages/core/base/core-base-common",
|
||||||
"@kbn/core-base-common-internal": "link:bazel-bin/packages/core/base/core-base-common-internal",
|
"@kbn/core-base-common-internal": "link:bazel-bin/packages/core/base/core-base-common-internal",
|
||||||
"@kbn/core-base-server-internal": "link:bazel-bin/packages/core/base/core-base-server-internal",
|
"@kbn/core-base-server-internal": "link:bazel-bin/packages/core/base/core-base-server-internal",
|
||||||
|
"@kbn/core-base-server-mocks": "link:bazel-bin/packages/core/base/core-base-server-mocks",
|
||||||
|
"@kbn/core-doc-links-browser": "link:bazel-bin/packages/core/doc-links/core-doc-links-browser",
|
||||||
|
"@kbn/core-doc-links-browser-internal": "link:bazel-bin/packages/core/doc-links/core-doc-links-browser-internal",
|
||||||
|
"@kbn/core-doc-links-browser-mocks": "link:bazel-bin/packages/core/doc-links/core-doc-links-browser-mocks",
|
||||||
|
"@kbn/core-doc-links-server": "link:bazel-bin/packages/core/doc-links/core-doc-links-server",
|
||||||
|
"@kbn/core-doc-links-server-internal": "link:bazel-bin/packages/core/doc-links/core-doc-links-server-internal",
|
||||||
|
"@kbn/core-doc-links-server-mocks": "link:bazel-bin/packages/core/doc-links/core-doc-links-server-mocks",
|
||||||
"@kbn/core-injected-metadata-browser": "link:bazel-bin/packages/core/injected-metadata/core-injected-metadata-browser",
|
"@kbn/core-injected-metadata-browser": "link:bazel-bin/packages/core/injected-metadata/core-injected-metadata-browser",
|
||||||
"@kbn/core-injected-metadata-browser-internal": "link:bazel-bin/packages/core/injected-metadata/core-injected-metadata-browser-internal",
|
"@kbn/core-injected-metadata-browser-internal": "link:bazel-bin/packages/core/injected-metadata/core-injected-metadata-browser-internal",
|
||||||
"@kbn/core-injected-metadata-browser-mocks": "link:bazel-bin/packages/core/injected-metadata/core-injected-metadata-browser-mocks",
|
"@kbn/core-injected-metadata-browser-mocks": "link:bazel-bin/packages/core/injected-metadata/core-injected-metadata-browser-mocks",
|
||||||
|
@ -651,7 +658,14 @@
|
||||||
"@types/kbn__core-base-common-internal": "link:bazel-bin/packages/core/base/core-base-common-internal/npm_module_types",
|
"@types/kbn__core-base-common-internal": "link:bazel-bin/packages/core/base/core-base-common-internal/npm_module_types",
|
||||||
"@types/kbn__core-base-server": "link:bazel-bin/packages/core/base/core-base-server/npm_module_types",
|
"@types/kbn__core-base-server": "link:bazel-bin/packages/core/base/core-base-server/npm_module_types",
|
||||||
"@types/kbn__core-base-server-internal": "link:bazel-bin/packages/core/base/core-base-server-internal/npm_module_types",
|
"@types/kbn__core-base-server-internal": "link:bazel-bin/packages/core/base/core-base-server-internal/npm_module_types",
|
||||||
|
"@types/kbn__core-base-server-mocks": "link:bazel-bin/packages/core/base/core-base-server-mocks/npm_module_types",
|
||||||
"@types/kbn__core-common-internal-base": "link:bazel-bin/packages/core/common/internal-base/npm_module_types",
|
"@types/kbn__core-common-internal-base": "link:bazel-bin/packages/core/common/internal-base/npm_module_types",
|
||||||
|
"@types/kbn__core-doc-links-browser": "link:bazel-bin/packages/core/doc-links/core-doc-links-browser/npm_module_types",
|
||||||
|
"@types/kbn__core-doc-links-browser-internal": "link:bazel-bin/packages/core/doc-links/core-doc-links-browser-internal/npm_module_types",
|
||||||
|
"@types/kbn__core-doc-links-browser-mocks": "link:bazel-bin/packages/core/doc-links/core-doc-links-browser-mocks/npm_module_types",
|
||||||
|
"@types/kbn__core-doc-links-server": "link:bazel-bin/packages/core/doc-links/core-doc-links-server/npm_module_types",
|
||||||
|
"@types/kbn__core-doc-links-server-internal": "link:bazel-bin/packages/core/doc-links/core-doc-links-server-internal/npm_module_types",
|
||||||
|
"@types/kbn__core-doc-links-server-mocks": "link:bazel-bin/packages/core/doc-links/core-doc-links-server-mocks/npm_module_types",
|
||||||
"@types/kbn__core-injected-metadata-browser": "link:bazel-bin/packages/core/injected-metadata/core-injected-metadata-browser/npm_module_types",
|
"@types/kbn__core-injected-metadata-browser": "link:bazel-bin/packages/core/injected-metadata/core-injected-metadata-browser/npm_module_types",
|
||||||
"@types/kbn__core-injected-metadata-browser-internal": "link:bazel-bin/packages/core/injected-metadata/core-injected-metadata-browser-internal/npm_module_types",
|
"@types/kbn__core-injected-metadata-browser-internal": "link:bazel-bin/packages/core/injected-metadata/core-injected-metadata-browser-internal/npm_module_types",
|
||||||
"@types/kbn__core-injected-metadata-browser-mocks": "link:bazel-bin/packages/core/injected-metadata/core-injected-metadata-browser-mocks/npm_module_types",
|
"@types/kbn__core-injected-metadata-browser-mocks": "link:bazel-bin/packages/core/injected-metadata/core-injected-metadata-browser-mocks/npm_module_types",
|
||||||
|
|
|
@ -18,6 +18,13 @@ filegroup(
|
||||||
"//packages/core/base/core-base-common-internal:build",
|
"//packages/core/base/core-base-common-internal:build",
|
||||||
"//packages/core/base/core-base-common:build",
|
"//packages/core/base/core-base-common:build",
|
||||||
"//packages/core/base/core-base-server-internal:build",
|
"//packages/core/base/core-base-server-internal:build",
|
||||||
|
"//packages/core/base/core-base-server-mocks:build",
|
||||||
|
"//packages/core/doc-links/core-doc-links-browser-internal:build",
|
||||||
|
"//packages/core/doc-links/core-doc-links-browser-mocks:build",
|
||||||
|
"//packages/core/doc-links/core-doc-links-browser:build",
|
||||||
|
"//packages/core/doc-links/core-doc-links-server-internal:build",
|
||||||
|
"//packages/core/doc-links/core-doc-links-server-mocks:build",
|
||||||
|
"//packages/core/doc-links/core-doc-links-server:build",
|
||||||
"//packages/core/injected-metadata/core-injected-metadata-browser-internal:build",
|
"//packages/core/injected-metadata/core-injected-metadata-browser-internal:build",
|
||||||
"//packages/core/injected-metadata/core-injected-metadata-browser-mocks:build",
|
"//packages/core/injected-metadata/core-injected-metadata-browser-mocks:build",
|
||||||
"//packages/core/injected-metadata/core-injected-metadata-browser:build",
|
"//packages/core/injected-metadata/core-injected-metadata-browser:build",
|
||||||
|
@ -145,6 +152,13 @@ filegroup(
|
||||||
"//packages/core/base/core-base-common-internal:build_types",
|
"//packages/core/base/core-base-common-internal:build_types",
|
||||||
"//packages/core/base/core-base-common:build_types",
|
"//packages/core/base/core-base-common:build_types",
|
||||||
"//packages/core/base/core-base-server-internal:build_types",
|
"//packages/core/base/core-base-server-internal:build_types",
|
||||||
|
"//packages/core/base/core-base-server-mocks:build_types",
|
||||||
|
"//packages/core/doc-links/core-doc-links-browser-internal:build_types",
|
||||||
|
"//packages/core/doc-links/core-doc-links-browser-mocks:build_types",
|
||||||
|
"//packages/core/doc-links/core-doc-links-browser:build_types",
|
||||||
|
"//packages/core/doc-links/core-doc-links-server-internal:build_types",
|
||||||
|
"//packages/core/doc-links/core-doc-links-server-mocks:build_types",
|
||||||
|
"//packages/core/doc-links/core-doc-links-server:build_types",
|
||||||
"//packages/core/injected-metadata/core-injected-metadata-browser-internal:build_types",
|
"//packages/core/injected-metadata/core-injected-metadata-browser-internal:build_types",
|
||||||
"//packages/core/injected-metadata/core-injected-metadata-browser-mocks:build_types",
|
"//packages/core/injected-metadata/core-injected-metadata-browser-mocks:build_types",
|
||||||
"//packages/core/injected-metadata/core-injected-metadata-browser:build_types",
|
"//packages/core/injected-metadata/core-injected-metadata-browser:build_types",
|
||||||
|
|
106
packages/core/base/core-base-server-mocks/BUILD.bazel
Normal file
106
packages/core/base/core-base-server-mocks/BUILD.bazel
Normal file
|
@ -0,0 +1,106 @@
|
||||||
|
load("@npm//@bazel/typescript:index.bzl", "ts_config")
|
||||||
|
load("@build_bazel_rules_nodejs//:index.bzl", "js_library")
|
||||||
|
load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types", "ts_project")
|
||||||
|
|
||||||
|
PKG_DIRNAME = "core-base-server-mocks"
|
||||||
|
PKG_REQUIRE_NAME = "@kbn/core-base-server-mocks"
|
||||||
|
|
||||||
|
SOURCE_FILES = glob(
|
||||||
|
[
|
||||||
|
"src/**/*.ts",
|
||||||
|
],
|
||||||
|
exclude = [
|
||||||
|
"**/*.test.*",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
SRCS = SOURCE_FILES
|
||||||
|
|
||||||
|
filegroup(
|
||||||
|
name = "srcs",
|
||||||
|
srcs = SRCS,
|
||||||
|
)
|
||||||
|
|
||||||
|
NPM_MODULE_EXTRA_FILES = [
|
||||||
|
"package.json",
|
||||||
|
]
|
||||||
|
|
||||||
|
RUNTIME_DEPS = [
|
||||||
|
"//packages/kbn-utils",
|
||||||
|
"//packages/kbn-config",
|
||||||
|
"//packages/kbn-logging-mocks",
|
||||||
|
"//packages/kbn-config-mocks",
|
||||||
|
]
|
||||||
|
|
||||||
|
TYPES_DEPS = [
|
||||||
|
"@npm//@types/node",
|
||||||
|
"@npm//@types/jest",
|
||||||
|
"//packages/kbn-utility-types-jest:npm_module_types",
|
||||||
|
"//packages/kbn-utils:npm_module_types",
|
||||||
|
"//packages/kbn-config:npm_module_types",
|
||||||
|
"//packages/kbn-config-mocks:npm_module_types",
|
||||||
|
"//packages/kbn-logging:npm_module_types",
|
||||||
|
"//packages/kbn-logging-mocks:npm_module_types",
|
||||||
|
"//packages/core/base/core-base-server-internal:npm_module_types",
|
||||||
|
]
|
||||||
|
|
||||||
|
jsts_transpiler(
|
||||||
|
name = "target_node",
|
||||||
|
srcs = SRCS,
|
||||||
|
build_pkg_name = package_name(),
|
||||||
|
)
|
||||||
|
|
||||||
|
ts_config(
|
||||||
|
name = "tsconfig",
|
||||||
|
src = "tsconfig.json",
|
||||||
|
deps = [
|
||||||
|
"//:tsconfig.base.json",
|
||||||
|
"//:tsconfig.bazel.json",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
ts_project(
|
||||||
|
name = "tsc_types",
|
||||||
|
args = ['--pretty'],
|
||||||
|
srcs = SRCS,
|
||||||
|
deps = TYPES_DEPS,
|
||||||
|
declaration = True,
|
||||||
|
emit_declaration_only = True,
|
||||||
|
out_dir = "target_types",
|
||||||
|
root_dir = "src",
|
||||||
|
tsconfig = ":tsconfig",
|
||||||
|
)
|
||||||
|
|
||||||
|
js_library(
|
||||||
|
name = PKG_DIRNAME,
|
||||||
|
srcs = NPM_MODULE_EXTRA_FILES,
|
||||||
|
deps = RUNTIME_DEPS + [":target_node"],
|
||||||
|
package_name = PKG_REQUIRE_NAME,
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
)
|
||||||
|
|
||||||
|
pkg_npm(
|
||||||
|
name = "npm_module",
|
||||||
|
deps = [":" + PKG_DIRNAME],
|
||||||
|
)
|
||||||
|
|
||||||
|
filegroup(
|
||||||
|
name = "build",
|
||||||
|
srcs = [":npm_module"],
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
)
|
||||||
|
|
||||||
|
pkg_npm_types(
|
||||||
|
name = "npm_module_types",
|
||||||
|
srcs = SRCS,
|
||||||
|
deps = [":tsc_types"],
|
||||||
|
package_name = PKG_REQUIRE_NAME,
|
||||||
|
tsconfig = ":tsconfig",
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
)
|
||||||
|
|
||||||
|
filegroup(
|
||||||
|
name = "build_types",
|
||||||
|
srcs = [":npm_module_types"],
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
)
|
3
packages/core/base/core-base-server-mocks/README.md
Normal file
3
packages/core/base/core-base-server-mocks/README.md
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
# @kbn/core-base-server-mocks
|
||||||
|
|
||||||
|
Empty package generated by @kbn/generate
|
13
packages/core/base/core-base-server-mocks/jest.config.js
Normal file
13
packages/core/base/core-base-server-mocks/jest.config.js
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
/*
|
||||||
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||||
|
* or more contributor license agreements. Licensed under the Elastic License
|
||||||
|
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
||||||
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
||||||
|
* Side Public License, v 1.
|
||||||
|
*/
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
preset: '@kbn/test/jest_node',
|
||||||
|
rootDir: '../../../..',
|
||||||
|
roots: ['<rootDir>/packages/core/base/core-base-server-mocks'],
|
||||||
|
};
|
7
packages/core/base/core-base-server-mocks/package.json
Normal file
7
packages/core/base/core-base-server-mocks/package.json
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"name": "@kbn/core-base-server-mocks",
|
||||||
|
"private": true,
|
||||||
|
"version": "1.0.0",
|
||||||
|
"main": "./target_node/index.js",
|
||||||
|
"license": "SSPL-1.0 OR Elastic License 2.0"
|
||||||
|
}
|
|
@ -9,18 +9,18 @@
|
||||||
import { REPO_ROOT } from '@kbn/utils';
|
import { REPO_ROOT } from '@kbn/utils';
|
||||||
import type { DeeplyMockedKeys } from '@kbn/utility-types-jest';
|
import type { DeeplyMockedKeys } from '@kbn/utility-types-jest';
|
||||||
import { Env, IConfigService } from '@kbn/config';
|
import { Env, IConfigService } from '@kbn/config';
|
||||||
|
import type { LoggerFactory } from '@kbn/logging';
|
||||||
|
import { loggerMock } from '@kbn/logging-mocks';
|
||||||
import { configServiceMock, getEnvOptions } from '@kbn/config-mocks';
|
import { configServiceMock, getEnvOptions } from '@kbn/config-mocks';
|
||||||
import type { CoreContext } from '@kbn/core-base-server-internal';
|
import type { CoreContext } from '@kbn/core-base-server-internal';
|
||||||
import { loggingSystemMock } from './logging/logging_system.mock';
|
|
||||||
import { ILoggingSystem } from './logging';
|
|
||||||
|
|
||||||
function create({
|
function create({
|
||||||
env = Env.createDefault(REPO_ROOT, getEnvOptions()),
|
env = Env.createDefault(REPO_ROOT, getEnvOptions()),
|
||||||
logger = loggingSystemMock.create(),
|
logger = loggerMock.create(),
|
||||||
configService = configServiceMock.create(),
|
configService = configServiceMock.create(),
|
||||||
}: {
|
}: {
|
||||||
env?: Env;
|
env?: Env;
|
||||||
logger?: jest.Mocked<ILoggingSystem>;
|
logger?: jest.Mocked<LoggerFactory>;
|
||||||
configService?: jest.Mocked<IConfigService>;
|
configService?: jest.Mocked<IConfigService>;
|
||||||
} = {}): DeeplyMockedKeys<CoreContext> {
|
} = {}): DeeplyMockedKeys<CoreContext> {
|
||||||
return { coreId: Symbol(), env, logger, configService };
|
return { coreId: Symbol(), env, logger, configService };
|
9
packages/core/base/core-base-server-mocks/src/index.ts
Normal file
9
packages/core/base/core-base-server-mocks/src/index.ts
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
/*
|
||||||
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||||
|
* or more contributor license agreements. Licensed under the Elastic License
|
||||||
|
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
||||||
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
||||||
|
* Side Public License, v 1.
|
||||||
|
*/
|
||||||
|
|
||||||
|
export { mockCoreContext } from './core_context.mock';
|
17
packages/core/base/core-base-server-mocks/tsconfig.json
Normal file
17
packages/core/base/core-base-server-mocks/tsconfig.json
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
"extends": "../../../../tsconfig.bazel.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"declaration": true,
|
||||||
|
"emitDeclarationOnly": true,
|
||||||
|
"outDir": "target_types",
|
||||||
|
"rootDir": "src",
|
||||||
|
"stripInternal": false,
|
||||||
|
"types": [
|
||||||
|
"jest",
|
||||||
|
"node"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"include": [
|
||||||
|
"src/**/*"
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,107 @@
|
||||||
|
load("@npm//@bazel/typescript:index.bzl", "ts_config")
|
||||||
|
load("@build_bazel_rules_nodejs//:index.bzl", "js_library")
|
||||||
|
load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types", "ts_project")
|
||||||
|
|
||||||
|
PKG_DIRNAME = "core-doc-links-browser-internal"
|
||||||
|
PKG_REQUIRE_NAME = "@kbn/core-doc-links-browser-internal"
|
||||||
|
|
||||||
|
SOURCE_FILES = glob(
|
||||||
|
[
|
||||||
|
"src/**/*.ts",
|
||||||
|
"src/**/*.tsx",
|
||||||
|
],
|
||||||
|
exclude = [
|
||||||
|
"**/*.test.*",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
SRCS = SOURCE_FILES
|
||||||
|
|
||||||
|
filegroup(
|
||||||
|
name = "srcs",
|
||||||
|
srcs = SRCS,
|
||||||
|
)
|
||||||
|
|
||||||
|
NPM_MODULE_EXTRA_FILES = [
|
||||||
|
"package.json",
|
||||||
|
]
|
||||||
|
|
||||||
|
RUNTIME_DEPS = [
|
||||||
|
]
|
||||||
|
|
||||||
|
TYPES_DEPS = [
|
||||||
|
"@npm//@types/node",
|
||||||
|
"@npm//@types/jest",
|
||||||
|
"@npm//@types/react",
|
||||||
|
"//packages/kbn-doc-links:npm_module_types",
|
||||||
|
"//packages/core/injected-metadata/core-injected-metadata-browser-internal:npm_module_types",
|
||||||
|
"//packages/core/doc-links/core-doc-links-browser:npm_module_types",
|
||||||
|
]
|
||||||
|
|
||||||
|
jsts_transpiler(
|
||||||
|
name = "target_node",
|
||||||
|
srcs = SRCS,
|
||||||
|
build_pkg_name = package_name(),
|
||||||
|
)
|
||||||
|
|
||||||
|
jsts_transpiler(
|
||||||
|
name = "target_web",
|
||||||
|
srcs = SRCS,
|
||||||
|
build_pkg_name = package_name(),
|
||||||
|
web = True,
|
||||||
|
)
|
||||||
|
|
||||||
|
ts_config(
|
||||||
|
name = "tsconfig",
|
||||||
|
src = "tsconfig.json",
|
||||||
|
deps = [
|
||||||
|
"//:tsconfig.base.json",
|
||||||
|
"//:tsconfig.bazel.json",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
ts_project(
|
||||||
|
name = "tsc_types",
|
||||||
|
args = ['--pretty'],
|
||||||
|
srcs = SRCS,
|
||||||
|
deps = TYPES_DEPS,
|
||||||
|
declaration = True,
|
||||||
|
emit_declaration_only = True,
|
||||||
|
out_dir = "target_types",
|
||||||
|
root_dir = "src",
|
||||||
|
tsconfig = ":tsconfig",
|
||||||
|
)
|
||||||
|
|
||||||
|
js_library(
|
||||||
|
name = PKG_DIRNAME,
|
||||||
|
srcs = NPM_MODULE_EXTRA_FILES,
|
||||||
|
deps = RUNTIME_DEPS + [":target_node", ":target_web"],
|
||||||
|
package_name = PKG_REQUIRE_NAME,
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
)
|
||||||
|
|
||||||
|
pkg_npm(
|
||||||
|
name = "npm_module",
|
||||||
|
deps = [":" + PKG_DIRNAME],
|
||||||
|
)
|
||||||
|
|
||||||
|
filegroup(
|
||||||
|
name = "build",
|
||||||
|
srcs = [":npm_module"],
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
)
|
||||||
|
|
||||||
|
pkg_npm_types(
|
||||||
|
name = "npm_module_types",
|
||||||
|
srcs = SRCS,
|
||||||
|
deps = [":tsc_types"],
|
||||||
|
package_name = PKG_REQUIRE_NAME,
|
||||||
|
tsconfig = ":tsconfig",
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
)
|
||||||
|
|
||||||
|
filegroup(
|
||||||
|
name = "build_types",
|
||||||
|
srcs = [":npm_module_types"],
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
)
|
|
@ -0,0 +1,3 @@
|
||||||
|
# @kbn/core-doc-links-browser-internal
|
||||||
|
|
||||||
|
This package contains the internal types and implementation for the browser-side docLinks service.
|
|
@ -0,0 +1,13 @@
|
||||||
|
/*
|
||||||
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||||
|
* or more contributor license agreements. Licensed under the Elastic License
|
||||||
|
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
||||||
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
||||||
|
* Side Public License, v 1.
|
||||||
|
*/
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
preset: '@kbn/test',
|
||||||
|
rootDir: '../../../..',
|
||||||
|
roots: ['<rootDir>/packages/core/doc-links/core-doc-links-browser-internal'],
|
||||||
|
};
|
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"name": "@kbn/core-doc-links-browser-internal",
|
||||||
|
"private": true,
|
||||||
|
"version": "1.0.0",
|
||||||
|
"main": "./target_node/index.js",
|
||||||
|
"browser": "./target_web/index.js",
|
||||||
|
"license": "SSPL-1.0 OR Elastic License 2.0"
|
||||||
|
}
|
|
@ -7,10 +7,11 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { getDocLinks, getDocLinksMeta } from '@kbn/doc-links';
|
import { getDocLinks, getDocLinksMeta } from '@kbn/doc-links';
|
||||||
import type { DocLinks } from '@kbn/doc-links';
|
|
||||||
import type { InternalInjectedMetadataSetup } from '@kbn/core-injected-metadata-browser-internal';
|
import type { InternalInjectedMetadataSetup } from '@kbn/core-injected-metadata-browser-internal';
|
||||||
|
import type { DocLinksStart } from '@kbn/core-doc-links-browser';
|
||||||
|
|
||||||
export interface StartDeps {
|
/** @internal */
|
||||||
|
export interface DocLinksServiceStartDeps {
|
||||||
injectedMetadata: InternalInjectedMetadataSetup;
|
injectedMetadata: InternalInjectedMetadataSetup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,7 +19,7 @@ export interface StartDeps {
|
||||||
export class DocLinksService {
|
export class DocLinksService {
|
||||||
public setup() {}
|
public setup() {}
|
||||||
|
|
||||||
public start({ injectedMetadata }: StartDeps): DocLinksStart {
|
public start({ injectedMetadata }: DocLinksServiceStartDeps): DocLinksStart {
|
||||||
const kibanaBranch = injectedMetadata.getKibanaBranch();
|
const kibanaBranch = injectedMetadata.getKibanaBranch();
|
||||||
const docMeta = getDocLinksMeta({ kibanaBranch });
|
const docMeta = getDocLinksMeta({ kibanaBranch });
|
||||||
const docLinks = getDocLinks({ kibanaBranch });
|
const docLinks = getDocLinks({ kibanaBranch });
|
||||||
|
@ -30,10 +31,3 @@ export class DocLinksService {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @public */
|
|
||||||
export interface DocLinksStart {
|
|
||||||
readonly DOC_LINK_VERSION: string;
|
|
||||||
readonly ELASTIC_WEBSITE_URL: string;
|
|
||||||
readonly links: DocLinks;
|
|
||||||
}
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
/*
|
||||||
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||||
|
* or more contributor license agreements. Licensed under the Elastic License
|
||||||
|
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
||||||
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
||||||
|
* Side Public License, v 1.
|
||||||
|
*/
|
||||||
|
|
||||||
|
export { DocLinksService } from './doc_links_service';
|
||||||
|
export type { DocLinksServiceStartDeps } from './doc_links_service';
|
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
"extends": "../../../../tsconfig.bazel.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"declaration": true,
|
||||||
|
"emitDeclarationOnly": true,
|
||||||
|
"outDir": "target_types",
|
||||||
|
"rootDir": "src",
|
||||||
|
"stripInternal": false,
|
||||||
|
"types": [
|
||||||
|
"jest",
|
||||||
|
"node"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"include": [
|
||||||
|
"src/**/*"
|
||||||
|
]
|
||||||
|
}
|
109
packages/core/doc-links/core-doc-links-browser-mocks/BUILD.bazel
Normal file
109
packages/core/doc-links/core-doc-links-browser-mocks/BUILD.bazel
Normal file
|
@ -0,0 +1,109 @@
|
||||||
|
load("@npm//@bazel/typescript:index.bzl", "ts_config")
|
||||||
|
load("@build_bazel_rules_nodejs//:index.bzl", "js_library")
|
||||||
|
load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types", "ts_project")
|
||||||
|
|
||||||
|
PKG_DIRNAME = "core-doc-links-browser-mocks"
|
||||||
|
PKG_REQUIRE_NAME = "@kbn/core-doc-links-browser-mocks"
|
||||||
|
|
||||||
|
SOURCE_FILES = glob(
|
||||||
|
[
|
||||||
|
"src/**/*.ts",
|
||||||
|
"src/**/*.tsx",
|
||||||
|
],
|
||||||
|
exclude = [
|
||||||
|
"**/*.test.*",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
SRCS = SOURCE_FILES
|
||||||
|
|
||||||
|
filegroup(
|
||||||
|
name = "srcs",
|
||||||
|
srcs = SRCS,
|
||||||
|
)
|
||||||
|
|
||||||
|
NPM_MODULE_EXTRA_FILES = [
|
||||||
|
"package.json",
|
||||||
|
]
|
||||||
|
|
||||||
|
RUNTIME_DEPS = [
|
||||||
|
"//packages/core/injected-metadata/core-injected-metadata-browser-mocks",
|
||||||
|
"//packages/core/doc-links/core-doc-links-browser-internal",
|
||||||
|
]
|
||||||
|
|
||||||
|
TYPES_DEPS = [
|
||||||
|
"@npm//@types/node",
|
||||||
|
"@npm//@types/jest",
|
||||||
|
"//packages/kbn-utility-types:npm_module_types",
|
||||||
|
"//packages/core/injected-metadata/core-injected-metadata-browser-mocks:npm_module_types",
|
||||||
|
"//packages/core/doc-links/core-doc-links-browser:npm_module_types",
|
||||||
|
"//packages/core/doc-links/core-doc-links-browser-internal:npm_module_types",
|
||||||
|
]
|
||||||
|
|
||||||
|
jsts_transpiler(
|
||||||
|
name = "target_node",
|
||||||
|
srcs = SRCS,
|
||||||
|
build_pkg_name = package_name(),
|
||||||
|
)
|
||||||
|
|
||||||
|
jsts_transpiler(
|
||||||
|
name = "target_web",
|
||||||
|
srcs = SRCS,
|
||||||
|
build_pkg_name = package_name(),
|
||||||
|
web = True,
|
||||||
|
)
|
||||||
|
|
||||||
|
ts_config(
|
||||||
|
name = "tsconfig",
|
||||||
|
src = "tsconfig.json",
|
||||||
|
deps = [
|
||||||
|
"//:tsconfig.base.json",
|
||||||
|
"//:tsconfig.bazel.json",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
ts_project(
|
||||||
|
name = "tsc_types",
|
||||||
|
args = ['--pretty'],
|
||||||
|
srcs = SRCS,
|
||||||
|
deps = TYPES_DEPS,
|
||||||
|
declaration = True,
|
||||||
|
emit_declaration_only = True,
|
||||||
|
out_dir = "target_types",
|
||||||
|
root_dir = "src",
|
||||||
|
tsconfig = ":tsconfig",
|
||||||
|
)
|
||||||
|
|
||||||
|
js_library(
|
||||||
|
name = PKG_DIRNAME,
|
||||||
|
srcs = NPM_MODULE_EXTRA_FILES,
|
||||||
|
deps = RUNTIME_DEPS + [":target_node", ":target_web"],
|
||||||
|
package_name = PKG_REQUIRE_NAME,
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
)
|
||||||
|
|
||||||
|
pkg_npm(
|
||||||
|
name = "npm_module",
|
||||||
|
deps = [":" + PKG_DIRNAME],
|
||||||
|
)
|
||||||
|
|
||||||
|
filegroup(
|
||||||
|
name = "build",
|
||||||
|
srcs = [":npm_module"],
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
)
|
||||||
|
|
||||||
|
pkg_npm_types(
|
||||||
|
name = "npm_module_types",
|
||||||
|
srcs = SRCS,
|
||||||
|
deps = [":tsc_types"],
|
||||||
|
package_name = PKG_REQUIRE_NAME,
|
||||||
|
tsconfig = ":tsconfig",
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
)
|
||||||
|
|
||||||
|
filegroup(
|
||||||
|
name = "build_types",
|
||||||
|
srcs = [":npm_module_types"],
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
)
|
|
@ -0,0 +1,3 @@
|
||||||
|
# @kbn/core-doc-links-browser-mocks
|
||||||
|
|
||||||
|
This package contains the mocks for Core's browser-side docLinks service.
|
|
@ -0,0 +1,13 @@
|
||||||
|
/*
|
||||||
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||||
|
* or more contributor license agreements. Licensed under the Elastic License
|
||||||
|
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
||||||
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
||||||
|
* Side Public License, v 1.
|
||||||
|
*/
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
preset: '@kbn/test',
|
||||||
|
rootDir: '../../../..',
|
||||||
|
roots: ['<rootDir>/packages/core/doc-links/core-doc-links-browser-mocks'],
|
||||||
|
};
|
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"name": "@kbn/core-doc-links-browser-mocks",
|
||||||
|
"private": true,
|
||||||
|
"version": "1.0.0",
|
||||||
|
"main": "./target_node/index.js",
|
||||||
|
"browser": "./target_web/index.js",
|
||||||
|
"license": "SSPL-1.0 OR Elastic License 2.0"
|
||||||
|
}
|
|
@ -8,7 +8,8 @@
|
||||||
|
|
||||||
import type { PublicMethodsOf } from '@kbn/utility-types';
|
import type { PublicMethodsOf } from '@kbn/utility-types';
|
||||||
import { injectedMetadataServiceMock } from '@kbn/core-injected-metadata-browser-mocks';
|
import { injectedMetadataServiceMock } from '@kbn/core-injected-metadata-browser-mocks';
|
||||||
import { DocLinksService, DocLinksStart } from './doc_links_service';
|
import type { DocLinksStart } from '@kbn/core-doc-links-browser';
|
||||||
|
import { DocLinksService } from '@kbn/core-doc-links-browser-internal';
|
||||||
|
|
||||||
const createStartContractMock = (): DocLinksStart => {
|
const createStartContractMock = (): DocLinksStart => {
|
||||||
// This service is so simple that we actually use the real implementation
|
// This service is so simple that we actually use the real implementation
|
|
@ -0,0 +1,9 @@
|
||||||
|
/*
|
||||||
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||||
|
* or more contributor license agreements. Licensed under the Elastic License
|
||||||
|
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
||||||
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
||||||
|
* Side Public License, v 1.
|
||||||
|
*/
|
||||||
|
|
||||||
|
export { docLinksServiceMock } from './doc_links_service.mock';
|
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
"extends": "../../../../tsconfig.bazel.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"declaration": true,
|
||||||
|
"emitDeclarationOnly": true,
|
||||||
|
"outDir": "target_types",
|
||||||
|
"rootDir": "src",
|
||||||
|
"stripInternal": false,
|
||||||
|
"types": [
|
||||||
|
"jest",
|
||||||
|
"node"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"include": [
|
||||||
|
"src/**/*"
|
||||||
|
]
|
||||||
|
}
|
104
packages/core/doc-links/core-doc-links-browser/BUILD.bazel
Normal file
104
packages/core/doc-links/core-doc-links-browser/BUILD.bazel
Normal file
|
@ -0,0 +1,104 @@
|
||||||
|
load("@npm//@bazel/typescript:index.bzl", "ts_config")
|
||||||
|
load("@build_bazel_rules_nodejs//:index.bzl", "js_library")
|
||||||
|
load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types", "ts_project")
|
||||||
|
|
||||||
|
PKG_DIRNAME = "core-doc-links-browser"
|
||||||
|
PKG_REQUIRE_NAME = "@kbn/core-doc-links-browser"
|
||||||
|
|
||||||
|
SOURCE_FILES = glob(
|
||||||
|
[
|
||||||
|
"src/**/*.ts",
|
||||||
|
"src/**/*.tsx",
|
||||||
|
],
|
||||||
|
exclude = [
|
||||||
|
"**/*.test.*",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
SRCS = SOURCE_FILES
|
||||||
|
|
||||||
|
filegroup(
|
||||||
|
name = "srcs",
|
||||||
|
srcs = SRCS,
|
||||||
|
)
|
||||||
|
|
||||||
|
NPM_MODULE_EXTRA_FILES = [
|
||||||
|
"package.json",
|
||||||
|
]
|
||||||
|
|
||||||
|
RUNTIME_DEPS = [
|
||||||
|
]
|
||||||
|
|
||||||
|
TYPES_DEPS = [
|
||||||
|
"@npm//@types/node",
|
||||||
|
"@npm//@types/jest",
|
||||||
|
"//packages/kbn-doc-links:npm_module_types",
|
||||||
|
]
|
||||||
|
|
||||||
|
jsts_transpiler(
|
||||||
|
name = "target_node",
|
||||||
|
srcs = SRCS,
|
||||||
|
build_pkg_name = package_name(),
|
||||||
|
)
|
||||||
|
|
||||||
|
jsts_transpiler(
|
||||||
|
name = "target_web",
|
||||||
|
srcs = SRCS,
|
||||||
|
build_pkg_name = package_name(),
|
||||||
|
web = True,
|
||||||
|
)
|
||||||
|
|
||||||
|
ts_config(
|
||||||
|
name = "tsconfig",
|
||||||
|
src = "tsconfig.json",
|
||||||
|
deps = [
|
||||||
|
"//:tsconfig.base.json",
|
||||||
|
"//:tsconfig.bazel.json",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
ts_project(
|
||||||
|
name = "tsc_types",
|
||||||
|
args = ['--pretty'],
|
||||||
|
srcs = SRCS,
|
||||||
|
deps = TYPES_DEPS,
|
||||||
|
declaration = True,
|
||||||
|
emit_declaration_only = True,
|
||||||
|
out_dir = "target_types",
|
||||||
|
root_dir = "src",
|
||||||
|
tsconfig = ":tsconfig",
|
||||||
|
)
|
||||||
|
|
||||||
|
js_library(
|
||||||
|
name = PKG_DIRNAME,
|
||||||
|
srcs = NPM_MODULE_EXTRA_FILES,
|
||||||
|
deps = RUNTIME_DEPS + [":target_node", ":target_web"],
|
||||||
|
package_name = PKG_REQUIRE_NAME,
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
)
|
||||||
|
|
||||||
|
pkg_npm(
|
||||||
|
name = "npm_module",
|
||||||
|
deps = [":" + PKG_DIRNAME],
|
||||||
|
)
|
||||||
|
|
||||||
|
filegroup(
|
||||||
|
name = "build",
|
||||||
|
srcs = [":npm_module"],
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
)
|
||||||
|
|
||||||
|
pkg_npm_types(
|
||||||
|
name = "npm_module_types",
|
||||||
|
srcs = SRCS,
|
||||||
|
deps = [":tsc_types"],
|
||||||
|
package_name = PKG_REQUIRE_NAME,
|
||||||
|
tsconfig = ":tsconfig",
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
)
|
||||||
|
|
||||||
|
filegroup(
|
||||||
|
name = "build_types",
|
||||||
|
srcs = [":npm_module_types"],
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
)
|
3
packages/core/doc-links/core-doc-links-browser/README.md
Normal file
3
packages/core/doc-links/core-doc-links-browser/README.md
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
# @kbn/core-doc-links-browser
|
||||||
|
|
||||||
|
This package contains the public types for Core's browser-side docLinks service.
|
|
@ -0,0 +1,13 @@
|
||||||
|
/*
|
||||||
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||||
|
* or more contributor license agreements. Licensed under the Elastic License
|
||||||
|
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
||||||
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
||||||
|
* Side Public License, v 1.
|
||||||
|
*/
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
preset: '@kbn/test',
|
||||||
|
rootDir: '../../../..',
|
||||||
|
roots: ['<rootDir>/packages/core/doc-links/core-doc-links-browser'],
|
||||||
|
};
|
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"name": "@kbn/core-doc-links-browser",
|
||||||
|
"private": true,
|
||||||
|
"version": "1.0.0",
|
||||||
|
"main": "./target_node/index.js",
|
||||||
|
"browser": "./target_web/index.js",
|
||||||
|
"license": "SSPL-1.0 OR Elastic License 2.0"
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
/*
|
||||||
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||||
|
* or more contributor license agreements. Licensed under the Elastic License
|
||||||
|
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
||||||
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
||||||
|
* Side Public License, v 1.
|
||||||
|
*/
|
||||||
|
|
||||||
|
export type { DocLinksStart } from './types';
|
16
packages/core/doc-links/core-doc-links-browser/src/types.ts
Normal file
16
packages/core/doc-links/core-doc-links-browser/src/types.ts
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
/*
|
||||||
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||||
|
* or more contributor license agreements. Licensed under the Elastic License
|
||||||
|
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
||||||
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
||||||
|
* Side Public License, v 1.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { DocLinks } from '@kbn/doc-links';
|
||||||
|
|
||||||
|
/** @public */
|
||||||
|
export interface DocLinksStart {
|
||||||
|
readonly DOC_LINK_VERSION: string;
|
||||||
|
readonly ELASTIC_WEBSITE_URL: string;
|
||||||
|
readonly links: DocLinks;
|
||||||
|
}
|
17
packages/core/doc-links/core-doc-links-browser/tsconfig.json
Normal file
17
packages/core/doc-links/core-doc-links-browser/tsconfig.json
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
"extends": "../../../../tsconfig.bazel.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"declaration": true,
|
||||||
|
"emitDeclarationOnly": true,
|
||||||
|
"outDir": "target_types",
|
||||||
|
"rootDir": "src",
|
||||||
|
"stripInternal": false,
|
||||||
|
"types": [
|
||||||
|
"jest",
|
||||||
|
"node"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"include": [
|
||||||
|
"src/**/*"
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,100 @@
|
||||||
|
load("@npm//@bazel/typescript:index.bzl", "ts_config")
|
||||||
|
load("@build_bazel_rules_nodejs//:index.bzl", "js_library")
|
||||||
|
load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types", "ts_project")
|
||||||
|
|
||||||
|
PKG_DIRNAME = "core-doc-links-server-internal"
|
||||||
|
PKG_REQUIRE_NAME = "@kbn/core-doc-links-server-internal"
|
||||||
|
|
||||||
|
SOURCE_FILES = glob(
|
||||||
|
[
|
||||||
|
"src/**/*.ts",
|
||||||
|
],
|
||||||
|
exclude = [
|
||||||
|
"**/*.test.*",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
SRCS = SOURCE_FILES
|
||||||
|
|
||||||
|
filegroup(
|
||||||
|
name = "srcs",
|
||||||
|
srcs = SRCS,
|
||||||
|
)
|
||||||
|
|
||||||
|
NPM_MODULE_EXTRA_FILES = [
|
||||||
|
"package.json",
|
||||||
|
]
|
||||||
|
|
||||||
|
RUNTIME_DEPS = [
|
||||||
|
"//packages/core/base/core-base-server-mocks",
|
||||||
|
]
|
||||||
|
|
||||||
|
TYPES_DEPS = [
|
||||||
|
"@npm//@types/node",
|
||||||
|
"@npm//@types/jest",
|
||||||
|
"//packages/kbn-doc-links:npm_module_types",
|
||||||
|
"//packages/core/base/core-base-server-internal:npm_module_types",
|
||||||
|
"//packages/core/base/core-base-server-mocks:npm_module_types",
|
||||||
|
"//packages/core/doc-links/core-doc-links-server:npm_module_types",
|
||||||
|
]
|
||||||
|
|
||||||
|
jsts_transpiler(
|
||||||
|
name = "target_node",
|
||||||
|
srcs = SRCS,
|
||||||
|
build_pkg_name = package_name(),
|
||||||
|
)
|
||||||
|
|
||||||
|
ts_config(
|
||||||
|
name = "tsconfig",
|
||||||
|
src = "tsconfig.json",
|
||||||
|
deps = [
|
||||||
|
"//:tsconfig.base.json",
|
||||||
|
"//:tsconfig.bazel.json",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
ts_project(
|
||||||
|
name = "tsc_types",
|
||||||
|
args = ['--pretty'],
|
||||||
|
srcs = SRCS,
|
||||||
|
deps = TYPES_DEPS,
|
||||||
|
declaration = True,
|
||||||
|
emit_declaration_only = True,
|
||||||
|
out_dir = "target_types",
|
||||||
|
root_dir = "src",
|
||||||
|
tsconfig = ":tsconfig",
|
||||||
|
)
|
||||||
|
|
||||||
|
js_library(
|
||||||
|
name = PKG_DIRNAME,
|
||||||
|
srcs = NPM_MODULE_EXTRA_FILES,
|
||||||
|
deps = RUNTIME_DEPS + [":target_node"],
|
||||||
|
package_name = PKG_REQUIRE_NAME,
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
)
|
||||||
|
|
||||||
|
pkg_npm(
|
||||||
|
name = "npm_module",
|
||||||
|
deps = [":" + PKG_DIRNAME],
|
||||||
|
)
|
||||||
|
|
||||||
|
filegroup(
|
||||||
|
name = "build",
|
||||||
|
srcs = [":npm_module"],
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
)
|
||||||
|
|
||||||
|
pkg_npm_types(
|
||||||
|
name = "npm_module_types",
|
||||||
|
srcs = SRCS,
|
||||||
|
deps = [":tsc_types"],
|
||||||
|
package_name = PKG_REQUIRE_NAME,
|
||||||
|
tsconfig = ":tsconfig",
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
)
|
||||||
|
|
||||||
|
filegroup(
|
||||||
|
name = "build_types",
|
||||||
|
srcs = [":npm_module_types"],
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
)
|
|
@ -0,0 +1,3 @@
|
||||||
|
# @kbn/core-doc-links-server-internal
|
||||||
|
|
||||||
|
This package contains the internal types and implementation for Core's server-side docLinks service.
|
|
@ -0,0 +1,13 @@
|
||||||
|
/*
|
||||||
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||||
|
* or more contributor license agreements. Licensed under the Elastic License
|
||||||
|
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
||||||
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
||||||
|
* Side Public License, v 1.
|
||||||
|
*/
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
preset: '@kbn/test/jest_node',
|
||||||
|
rootDir: '../../../..',
|
||||||
|
roots: ['<rootDir>/packages/core/doc-links/core-doc-links-server-internal'],
|
||||||
|
};
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"name": "@kbn/core-doc-links-server-internal",
|
||||||
|
"private": true,
|
||||||
|
"version": "1.0.0",
|
||||||
|
"main": "./target_node/index.js",
|
||||||
|
"license": "SSPL-1.0 OR Elastic License 2.0"
|
||||||
|
}
|
|
@ -6,9 +6,9 @@
|
||||||
* Side Public License, v 1.
|
* Side Public License, v 1.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import { mockCoreContext } from '@kbn/core-base-server-mocks';
|
||||||
import { getDocLinksMock, getDocLinksMetaMock } from './doc_links_service.test.mocks';
|
import { getDocLinksMock, getDocLinksMetaMock } from './doc_links_service.test.mocks';
|
||||||
import { DocLinksService } from './doc_links_service';
|
import { DocLinksService } from './doc_links_service';
|
||||||
import { mockCoreContext } from '../core_context.mock';
|
|
||||||
|
|
||||||
describe('DocLinksService', () => {
|
describe('DocLinksService', () => {
|
||||||
let coreContext: ReturnType<typeof mockCoreContext.create>;
|
let coreContext: ReturnType<typeof mockCoreContext.create>;
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
import { getDocLinks, getDocLinksMeta } from '@kbn/doc-links';
|
import { getDocLinks, getDocLinksMeta } from '@kbn/doc-links';
|
||||||
import type { CoreContext } from '@kbn/core-base-server-internal';
|
import type { CoreContext } from '@kbn/core-base-server-internal';
|
||||||
import type { DocLinksServiceSetup, DocLinksServiceStart } from './types';
|
import type { DocLinksServiceSetup, DocLinksServiceStart } from '@kbn/core-doc-links-server';
|
||||||
|
|
||||||
/** @internal */
|
/** @internal */
|
||||||
export class DocLinksService {
|
export class DocLinksService {
|
|
@ -7,4 +7,3 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export { DocLinksService } from './doc_links_service';
|
export { DocLinksService } from './doc_links_service';
|
||||||
export type { DocLinksStart } from './doc_links_service';
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
"extends": "../../../../tsconfig.bazel.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"declaration": true,
|
||||||
|
"emitDeclarationOnly": true,
|
||||||
|
"outDir": "target_types",
|
||||||
|
"rootDir": "src",
|
||||||
|
"stripInternal": false,
|
||||||
|
"types": [
|
||||||
|
"jest",
|
||||||
|
"node"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"include": [
|
||||||
|
"src/**/*"
|
||||||
|
]
|
||||||
|
}
|
101
packages/core/doc-links/core-doc-links-server-mocks/BUILD.bazel
Normal file
101
packages/core/doc-links/core-doc-links-server-mocks/BUILD.bazel
Normal file
|
@ -0,0 +1,101 @@
|
||||||
|
load("@npm//@bazel/typescript:index.bzl", "ts_config")
|
||||||
|
load("@build_bazel_rules_nodejs//:index.bzl", "js_library")
|
||||||
|
load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types", "ts_project")
|
||||||
|
|
||||||
|
PKG_DIRNAME = "core-doc-links-server-mocks"
|
||||||
|
PKG_REQUIRE_NAME = "@kbn/core-doc-links-server-mocks"
|
||||||
|
|
||||||
|
SOURCE_FILES = glob(
|
||||||
|
[
|
||||||
|
"src/**/*.ts",
|
||||||
|
],
|
||||||
|
exclude = [
|
||||||
|
"**/*.test.*",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
SRCS = SOURCE_FILES
|
||||||
|
|
||||||
|
filegroup(
|
||||||
|
name = "srcs",
|
||||||
|
srcs = SRCS,
|
||||||
|
)
|
||||||
|
|
||||||
|
NPM_MODULE_EXTRA_FILES = [
|
||||||
|
"package.json",
|
||||||
|
]
|
||||||
|
|
||||||
|
RUNTIME_DEPS = [
|
||||||
|
"//packages/kbn-doc-links",
|
||||||
|
]
|
||||||
|
|
||||||
|
TYPES_DEPS = [
|
||||||
|
"@npm//@types/node",
|
||||||
|
"@npm//@types/jest",
|
||||||
|
"//packages/kbn-utility-types:npm_module_types",
|
||||||
|
"//packages/kbn-doc-links:npm_module_types",
|
||||||
|
"//packages/core/injected-metadata/core-injected-metadata-browser-mocks:npm_module_types",
|
||||||
|
"//packages/core/doc-links/core-doc-links-server:npm_module_types",
|
||||||
|
"//packages/core/doc-links/core-doc-links-server-internal:npm_module_types",
|
||||||
|
]
|
||||||
|
|
||||||
|
jsts_transpiler(
|
||||||
|
name = "target_node",
|
||||||
|
srcs = SRCS,
|
||||||
|
build_pkg_name = package_name(),
|
||||||
|
)
|
||||||
|
|
||||||
|
ts_config(
|
||||||
|
name = "tsconfig",
|
||||||
|
src = "tsconfig.json",
|
||||||
|
deps = [
|
||||||
|
"//:tsconfig.base.json",
|
||||||
|
"//:tsconfig.bazel.json",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
ts_project(
|
||||||
|
name = "tsc_types",
|
||||||
|
args = ['--pretty'],
|
||||||
|
srcs = SRCS,
|
||||||
|
deps = TYPES_DEPS,
|
||||||
|
declaration = True,
|
||||||
|
emit_declaration_only = True,
|
||||||
|
out_dir = "target_types",
|
||||||
|
root_dir = "src",
|
||||||
|
tsconfig = ":tsconfig",
|
||||||
|
)
|
||||||
|
|
||||||
|
js_library(
|
||||||
|
name = PKG_DIRNAME,
|
||||||
|
srcs = NPM_MODULE_EXTRA_FILES,
|
||||||
|
deps = RUNTIME_DEPS + [":target_node"],
|
||||||
|
package_name = PKG_REQUIRE_NAME,
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
)
|
||||||
|
|
||||||
|
pkg_npm(
|
||||||
|
name = "npm_module",
|
||||||
|
deps = [":" + PKG_DIRNAME],
|
||||||
|
)
|
||||||
|
|
||||||
|
filegroup(
|
||||||
|
name = "build",
|
||||||
|
srcs = [":npm_module"],
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
)
|
||||||
|
|
||||||
|
pkg_npm_types(
|
||||||
|
name = "npm_module_types",
|
||||||
|
srcs = SRCS,
|
||||||
|
deps = [":tsc_types"],
|
||||||
|
package_name = PKG_REQUIRE_NAME,
|
||||||
|
tsconfig = ":tsconfig",
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
)
|
||||||
|
|
||||||
|
filegroup(
|
||||||
|
name = "build_types",
|
||||||
|
srcs = [":npm_module_types"],
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
)
|
|
@ -0,0 +1,3 @@
|
||||||
|
# @kbn/core-doc-links-server-mocks
|
||||||
|
|
||||||
|
This package contains the mocks for Core's server-side docLinks service.
|
|
@ -0,0 +1,13 @@
|
||||||
|
/*
|
||||||
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||||
|
* or more contributor license agreements. Licensed under the Elastic License
|
||||||
|
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
||||||
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
||||||
|
* Side Public License, v 1.
|
||||||
|
*/
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
preset: '@kbn/test/jest_node',
|
||||||
|
rootDir: '../../../..',
|
||||||
|
roots: ['<rootDir>/packages/core/doc-links/core-doc-links-server-mocks'],
|
||||||
|
};
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"name": "@kbn/core-doc-links-server-mocks",
|
||||||
|
"private": true,
|
||||||
|
"version": "1.0.0",
|
||||||
|
"main": "./target_node/index.js",
|
||||||
|
"license": "SSPL-1.0 OR Elastic License 2.0"
|
||||||
|
}
|
|
@ -8,8 +8,8 @@
|
||||||
|
|
||||||
import { PublicMethodsOf } from '@kbn/utility-types';
|
import { PublicMethodsOf } from '@kbn/utility-types';
|
||||||
import { getDocLinks, getDocLinksMeta } from '@kbn/doc-links';
|
import { getDocLinks, getDocLinksMeta } from '@kbn/doc-links';
|
||||||
import type { DocLinksServiceStart, DocLinksServiceSetup } from './types';
|
import type { DocLinksServiceStart, DocLinksServiceSetup } from '@kbn/core-doc-links-server';
|
||||||
import type { DocLinksService } from './doc_links_service';
|
import type { DocLinksService } from '@kbn/core-doc-links-server-internal';
|
||||||
|
|
||||||
type DocLinksServiceContract = PublicMethodsOf<DocLinksService>;
|
type DocLinksServiceContract = PublicMethodsOf<DocLinksService>;
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
/*
|
||||||
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||||
|
* or more contributor license agreements. Licensed under the Elastic License
|
||||||
|
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
||||||
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
||||||
|
* Side Public License, v 1.
|
||||||
|
*/
|
||||||
|
|
||||||
|
export { docLinksServiceMock } from './doc_links_service.mock';
|
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
"extends": "../../../../tsconfig.bazel.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"declaration": true,
|
||||||
|
"emitDeclarationOnly": true,
|
||||||
|
"outDir": "target_types",
|
||||||
|
"rootDir": "src",
|
||||||
|
"stripInternal": false,
|
||||||
|
"types": [
|
||||||
|
"jest",
|
||||||
|
"node"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"include": [
|
||||||
|
"src/**/*"
|
||||||
|
]
|
||||||
|
}
|
96
packages/core/doc-links/core-doc-links-server/BUILD.bazel
Normal file
96
packages/core/doc-links/core-doc-links-server/BUILD.bazel
Normal file
|
@ -0,0 +1,96 @@
|
||||||
|
load("@npm//@bazel/typescript:index.bzl", "ts_config")
|
||||||
|
load("@build_bazel_rules_nodejs//:index.bzl", "js_library")
|
||||||
|
load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types", "ts_project")
|
||||||
|
|
||||||
|
PKG_DIRNAME = "core-doc-links-server"
|
||||||
|
PKG_REQUIRE_NAME = "@kbn/core-doc-links-server"
|
||||||
|
|
||||||
|
SOURCE_FILES = glob(
|
||||||
|
[
|
||||||
|
"src/**/*.ts",
|
||||||
|
],
|
||||||
|
exclude = [
|
||||||
|
"**/*.test.*",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
SRCS = SOURCE_FILES
|
||||||
|
|
||||||
|
filegroup(
|
||||||
|
name = "srcs",
|
||||||
|
srcs = SRCS,
|
||||||
|
)
|
||||||
|
|
||||||
|
NPM_MODULE_EXTRA_FILES = [
|
||||||
|
"package.json",
|
||||||
|
]
|
||||||
|
|
||||||
|
RUNTIME_DEPS = [
|
||||||
|
]
|
||||||
|
|
||||||
|
TYPES_DEPS = [
|
||||||
|
"@npm//@types/node",
|
||||||
|
"@npm//@types/jest",
|
||||||
|
"//packages/kbn-doc-links:npm_module_types",
|
||||||
|
]
|
||||||
|
|
||||||
|
jsts_transpiler(
|
||||||
|
name = "target_node",
|
||||||
|
srcs = SRCS,
|
||||||
|
build_pkg_name = package_name(),
|
||||||
|
)
|
||||||
|
|
||||||
|
ts_config(
|
||||||
|
name = "tsconfig",
|
||||||
|
src = "tsconfig.json",
|
||||||
|
deps = [
|
||||||
|
"//:tsconfig.base.json",
|
||||||
|
"//:tsconfig.bazel.json",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
ts_project(
|
||||||
|
name = "tsc_types",
|
||||||
|
args = ['--pretty'],
|
||||||
|
srcs = SRCS,
|
||||||
|
deps = TYPES_DEPS,
|
||||||
|
declaration = True,
|
||||||
|
emit_declaration_only = True,
|
||||||
|
out_dir = "target_types",
|
||||||
|
root_dir = "src",
|
||||||
|
tsconfig = ":tsconfig",
|
||||||
|
)
|
||||||
|
|
||||||
|
js_library(
|
||||||
|
name = PKG_DIRNAME,
|
||||||
|
srcs = NPM_MODULE_EXTRA_FILES,
|
||||||
|
deps = RUNTIME_DEPS + [":target_node"],
|
||||||
|
package_name = PKG_REQUIRE_NAME,
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
)
|
||||||
|
|
||||||
|
pkg_npm(
|
||||||
|
name = "npm_module",
|
||||||
|
deps = [":" + PKG_DIRNAME],
|
||||||
|
)
|
||||||
|
|
||||||
|
filegroup(
|
||||||
|
name = "build",
|
||||||
|
srcs = [":npm_module"],
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
)
|
||||||
|
|
||||||
|
pkg_npm_types(
|
||||||
|
name = "npm_module_types",
|
||||||
|
srcs = SRCS,
|
||||||
|
deps = [":tsc_types"],
|
||||||
|
package_name = PKG_REQUIRE_NAME,
|
||||||
|
tsconfig = ":tsconfig",
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
)
|
||||||
|
|
||||||
|
filegroup(
|
||||||
|
name = "build_types",
|
||||||
|
srcs = [":npm_module_types"],
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
)
|
3
packages/core/doc-links/core-doc-links-server/README.md
Normal file
3
packages/core/doc-links/core-doc-links-server/README.md
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
# @kbn/core-doc-links-server
|
||||||
|
|
||||||
|
This package contains the public types for Core's server-side docLinks service.
|
13
packages/core/doc-links/core-doc-links-server/jest.config.js
Normal file
13
packages/core/doc-links/core-doc-links-server/jest.config.js
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
/*
|
||||||
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||||
|
* or more contributor license agreements. Licensed under the Elastic License
|
||||||
|
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
||||||
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
||||||
|
* Side Public License, v 1.
|
||||||
|
*/
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
preset: '@kbn/test/jest_node',
|
||||||
|
rootDir: '../../../..',
|
||||||
|
roots: ['<rootDir>/packages/core/doc-links/core-doc-links-server'],
|
||||||
|
};
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"name": "@kbn/core-doc-links-server",
|
||||||
|
"private": true,
|
||||||
|
"version": "1.0.0",
|
||||||
|
"main": "./target_node/index.js",
|
||||||
|
"license": "SSPL-1.0 OR Elastic License 2.0"
|
||||||
|
}
|
|
@ -6,5 +6,4 @@
|
||||||
* Side Public License, v 1.
|
* Side Public License, v 1.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export { DocLinksService } from './doc_links_service';
|
|
||||||
export type { DocLinksServiceStart, DocLinksServiceSetup } from './types';
|
export type { DocLinksServiceStart, DocLinksServiceSetup } from './types';
|
17
packages/core/doc-links/core-doc-links-server/tsconfig.json
Normal file
17
packages/core/doc-links/core-doc-links-server/tsconfig.json
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
"extends": "../../../../tsconfig.bazel.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"declaration": true,
|
||||||
|
"emitDeclarationOnly": true,
|
||||||
|
"outDir": "target_types",
|
||||||
|
"rootDir": "src",
|
||||||
|
"stripInternal": false,
|
||||||
|
"types": [
|
||||||
|
"jest",
|
||||||
|
"node"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"include": [
|
||||||
|
"src/**/*"
|
||||||
|
]
|
||||||
|
}
|
|
@ -10,6 +10,7 @@ export type {
|
||||||
ConfigDeprecationFactory,
|
ConfigDeprecationFactory,
|
||||||
AddConfigDeprecation,
|
AddConfigDeprecation,
|
||||||
ConfigDeprecationProvider,
|
ConfigDeprecationProvider,
|
||||||
|
DeprecatedConfigDetails,
|
||||||
ConfigDeprecationWithContext,
|
ConfigDeprecationWithContext,
|
||||||
ConfigDeprecation,
|
ConfigDeprecation,
|
||||||
ConfigDeprecationCommand,
|
ConfigDeprecationCommand,
|
||||||
|
|
|
@ -11,9 +11,9 @@ import React from 'react';
|
||||||
import * as Rx from 'rxjs';
|
import * as Rx from 'rxjs';
|
||||||
import { toArray } from 'rxjs/operators';
|
import { toArray } from 'rxjs/operators';
|
||||||
import { injectedMetadataServiceMock } from '@kbn/core-injected-metadata-browser-mocks';
|
import { injectedMetadataServiceMock } from '@kbn/core-injected-metadata-browser-mocks';
|
||||||
|
import { docLinksServiceMock } from '@kbn/core-doc-links-browser-mocks';
|
||||||
import { App, PublicAppInfo } from '../application';
|
import { App, PublicAppInfo } from '../application';
|
||||||
import { applicationServiceMock } from '../application/application_service.mock';
|
import { applicationServiceMock } from '../application/application_service.mock';
|
||||||
import { docLinksServiceMock } from '../doc_links/doc_links_service.mock';
|
|
||||||
import { httpServiceMock } from '../http/http_service.mock';
|
import { httpServiceMock } from '../http/http_service.mock';
|
||||||
import { notificationServiceMock } from '../notifications/notifications_service.mock';
|
import { notificationServiceMock } from '../notifications/notifications_service.mock';
|
||||||
import { uiSettingsServiceMock } from '../ui_settings/ui_settings_service.mock';
|
import { uiSettingsServiceMock } from '../ui_settings/ui_settings_service.mock';
|
||||||
|
|
|
@ -13,9 +13,9 @@ import { flatMap, map, takeUntil } from 'rxjs/operators';
|
||||||
import { parse } from 'url';
|
import { parse } from 'url';
|
||||||
import { EuiLink } from '@elastic/eui';
|
import { EuiLink } from '@elastic/eui';
|
||||||
import type { InternalInjectedMetadataStart } from '@kbn/core-injected-metadata-browser-internal';
|
import type { InternalInjectedMetadataStart } from '@kbn/core-injected-metadata-browser-internal';
|
||||||
|
import type { DocLinksStart } from '@kbn/core-doc-links-browser';
|
||||||
import { mountReactNode } from '../utils/mount';
|
import { mountReactNode } from '../utils/mount';
|
||||||
import { InternalApplicationStart } from '../application';
|
import { InternalApplicationStart } from '../application';
|
||||||
import { DocLinksStart } from '../doc_links';
|
|
||||||
import { HttpStart } from '../http';
|
import { HttpStart } from '../http';
|
||||||
import { NotificationsStart } from '../notifications';
|
import { NotificationsStart } from '../notifications';
|
||||||
import { KIBANA_ASK_ELASTIC_LINK } from './constants';
|
import { KIBANA_ASK_ELASTIC_LINK } from './constants';
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
import { UnregisterCallback } from 'history';
|
import { UnregisterCallback } from 'history';
|
||||||
import type { CoreContext } from '@kbn/core-base-browser-internal';
|
import type { CoreContext } from '@kbn/core-base-browser-internal';
|
||||||
import type { InternalInjectedMetadataSetup } from '@kbn/core-injected-metadata-browser-internal';
|
import type { InternalInjectedMetadataSetup } from '@kbn/core-injected-metadata-browser-internal';
|
||||||
|
import type { DocLinksStart } from '@kbn/core-doc-links-browser';
|
||||||
import {
|
import {
|
||||||
InternalApplicationSetup,
|
InternalApplicationSetup,
|
||||||
InternalApplicationStart,
|
InternalApplicationStart,
|
||||||
|
@ -24,7 +25,6 @@ import {
|
||||||
setupUrlOverflowDetection,
|
setupUrlOverflowDetection,
|
||||||
} from './errors';
|
} from './errors';
|
||||||
import { renderApp as renderStatusApp } from './status';
|
import { renderApp as renderStatusApp } from './status';
|
||||||
import { DocLinksStart } from '../doc_links';
|
|
||||||
|
|
||||||
export interface SetupDeps {
|
export interface SetupDeps {
|
||||||
application: InternalApplicationSetup;
|
application: InternalApplicationSetup;
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
* Side Public License, v 1.
|
* Side Public License, v 1.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { docLinksServiceMock } from '../../doc_links/doc_links_service.mock';
|
import { docLinksServiceMock } from '@kbn/core-doc-links-browser-mocks';
|
||||||
import { httpServiceMock } from '../../http/http_service.mock';
|
import { httpServiceMock } from '../../http/http_service.mock';
|
||||||
import { notificationServiceMock } from '../../notifications/notifications_service.mock';
|
import { notificationServiceMock } from '../../notifications/notifications_service.mock';
|
||||||
|
|
||||||
|
|
|
@ -11,8 +11,8 @@ import { EuiButton, EuiFlexGroup, EuiFlexItem } from '@elastic/eui';
|
||||||
import { i18n } from '@kbn/i18n';
|
import { i18n } from '@kbn/i18n';
|
||||||
import { FormattedMessage } from '@kbn/i18n-react';
|
import { FormattedMessage } from '@kbn/i18n-react';
|
||||||
|
|
||||||
|
import type { DocLinksStart } from '@kbn/core-doc-links-browser';
|
||||||
import type { HttpStart, NotificationsStart } from '../..';
|
import type { HttpStart, NotificationsStart } from '../..';
|
||||||
import type { DocLinksStart } from '../../doc_links';
|
|
||||||
import { mountReactNode } from '../../utils';
|
import { mountReactNode } from '../../utils';
|
||||||
|
|
||||||
/** Only exported for tests */
|
/** Only exported for tests */
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { injectedMetadataServiceMock } from '@kbn/core-injected-metadata-browser-mocks';
|
import { injectedMetadataServiceMock } from '@kbn/core-injected-metadata-browser-mocks';
|
||||||
|
import { docLinksServiceMock } from '@kbn/core-doc-links-browser-mocks';
|
||||||
import { applicationServiceMock } from './application/application_service.mock';
|
import { applicationServiceMock } from './application/application_service.mock';
|
||||||
import { chromeServiceMock } from './chrome/chrome_service.mock';
|
import { chromeServiceMock } from './chrome/chrome_service.mock';
|
||||||
import { fatalErrorsServiceMock } from './fatal_errors/fatal_errors_service.mock';
|
import { fatalErrorsServiceMock } from './fatal_errors/fatal_errors_service.mock';
|
||||||
|
@ -16,7 +17,6 @@ import { notificationServiceMock } from './notifications/notifications_service.m
|
||||||
import { overlayServiceMock } from './overlays/overlay_service.mock';
|
import { overlayServiceMock } from './overlays/overlay_service.mock';
|
||||||
import { pluginsServiceMock } from './plugins/plugins_service.mock';
|
import { pluginsServiceMock } from './plugins/plugins_service.mock';
|
||||||
import { uiSettingsServiceMock } from './ui_settings/ui_settings_service.mock';
|
import { uiSettingsServiceMock } from './ui_settings/ui_settings_service.mock';
|
||||||
import { docLinksServiceMock } from './doc_links/doc_links_service.mock';
|
|
||||||
import { renderingServiceMock } from './rendering/rendering_service.mock';
|
import { renderingServiceMock } from './rendering/rendering_service.mock';
|
||||||
import { integrationsServiceMock } from './integrations/integrations_service.mock';
|
import { integrationsServiceMock } from './integrations/integrations_service.mock';
|
||||||
import { coreAppMock } from './core_app/core_app.mock';
|
import { coreAppMock } from './core_app/core_app.mock';
|
||||||
|
@ -108,7 +108,7 @@ jest.doMock('./application', () => ({
|
||||||
|
|
||||||
export const MockDocLinksService = docLinksServiceMock.create();
|
export const MockDocLinksService = docLinksServiceMock.create();
|
||||||
export const DocLinksServiceConstructor = jest.fn().mockImplementation(() => MockDocLinksService);
|
export const DocLinksServiceConstructor = jest.fn().mockImplementation(() => MockDocLinksService);
|
||||||
jest.doMock('./doc_links', () => ({
|
jest.doMock('@kbn/core-doc-links-browser-internal', () => ({
|
||||||
DocLinksService: DocLinksServiceConstructor,
|
DocLinksService: DocLinksServiceConstructor,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,7 @@ import {
|
||||||
InternalInjectedMetadataSetup,
|
InternalInjectedMetadataSetup,
|
||||||
InternalInjectedMetadataStart,
|
InternalInjectedMetadataStart,
|
||||||
} from '@kbn/core-injected-metadata-browser-internal';
|
} from '@kbn/core-injected-metadata-browser-internal';
|
||||||
|
import { DocLinksService } from '@kbn/core-doc-links-browser-internal';
|
||||||
import { CoreSetup, CoreStart } from '.';
|
import { CoreSetup, CoreStart } from '.';
|
||||||
import { ChromeService } from './chrome';
|
import { ChromeService } from './chrome';
|
||||||
import { FatalErrorsService, FatalErrorsSetup } from './fatal_errors';
|
import { FatalErrorsService, FatalErrorsSetup } from './fatal_errors';
|
||||||
|
@ -23,7 +24,6 @@ import { OverlayService } from './overlays';
|
||||||
import { PluginsService } from './plugins';
|
import { PluginsService } from './plugins';
|
||||||
import { UiSettingsService } from './ui_settings';
|
import { UiSettingsService } from './ui_settings';
|
||||||
import { ApplicationService } from './application';
|
import { ApplicationService } from './application';
|
||||||
import { DocLinksService } from './doc_links';
|
|
||||||
import { RenderingService } from './rendering';
|
import { RenderingService } from './rendering';
|
||||||
import { SavedObjectsService } from './saved_objects';
|
import { SavedObjectsService } from './saved_objects';
|
||||||
import { IntegrationsService } from './integrations';
|
import { IntegrationsService } from './integrations';
|
||||||
|
|
|
@ -30,6 +30,7 @@ import type {
|
||||||
InjectedMetadataSetup,
|
InjectedMetadataSetup,
|
||||||
InjectedMetadataStart,
|
InjectedMetadataStart,
|
||||||
} from '@kbn/core-injected-metadata-browser';
|
} from '@kbn/core-injected-metadata-browser';
|
||||||
|
import { DocLinksStart } from '@kbn/core-doc-links-browser';
|
||||||
import {
|
import {
|
||||||
ChromeBadge,
|
ChromeBadge,
|
||||||
ChromeBreadcrumb,
|
ChromeBreadcrumb,
|
||||||
|
@ -60,7 +61,6 @@ import { OverlayStart } from './overlays';
|
||||||
import { Plugin, PluginInitializer, PluginInitializerContext, PluginOpaqueId } from './plugins';
|
import { Plugin, PluginInitializer, PluginInitializerContext, PluginOpaqueId } from './plugins';
|
||||||
import { UiSettingsState, IUiSettingsClient } from './ui_settings';
|
import { UiSettingsState, IUiSettingsClient } from './ui_settings';
|
||||||
import { ApplicationSetup, Capabilities, ApplicationStart } from './application';
|
import { ApplicationSetup, Capabilities, ApplicationStart } from './application';
|
||||||
import { DocLinksStart } from './doc_links';
|
|
||||||
import { SavedObjectsStart } from './saved_objects';
|
import { SavedObjectsStart } from './saved_objects';
|
||||||
import { DeprecationsServiceStart } from './deprecations';
|
import { DeprecationsServiceStart } from './deprecations';
|
||||||
import type { ThemeServiceSetup, ThemeServiceStart } from './theme';
|
import type { ThemeServiceSetup, ThemeServiceStart } from './theme';
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
import { createMemoryHistory } from 'history';
|
import { createMemoryHistory } from 'history';
|
||||||
import type { CoreContext } from '@kbn/core-base-browser-internal';
|
import type { CoreContext } from '@kbn/core-base-browser-internal';
|
||||||
import { injectedMetadataServiceMock } from '@kbn/core-injected-metadata-browser-mocks';
|
import { injectedMetadataServiceMock } from '@kbn/core-injected-metadata-browser-mocks';
|
||||||
|
import { docLinksServiceMock } from '@kbn/core-doc-links-browser-mocks';
|
||||||
|
|
||||||
// Only import types from '.' to avoid triggering default Jest mocks.
|
// Only import types from '.' to avoid triggering default Jest mocks.
|
||||||
import { PluginInitializerContext, AppMountParameters } from '.';
|
import { PluginInitializerContext, AppMountParameters } from '.';
|
||||||
|
@ -18,7 +19,6 @@ import { ScopedHistory } from './application';
|
||||||
import { analyticsServiceMock } from './analytics/analytics_service.mock';
|
import { analyticsServiceMock } from './analytics/analytics_service.mock';
|
||||||
import { applicationServiceMock } from './application/application_service.mock';
|
import { applicationServiceMock } from './application/application_service.mock';
|
||||||
import { chromeServiceMock } from './chrome/chrome_service.mock';
|
import { chromeServiceMock } from './chrome/chrome_service.mock';
|
||||||
import { docLinksServiceMock } from './doc_links/doc_links_service.mock';
|
|
||||||
import { fatalErrorsServiceMock } from './fatal_errors/fatal_errors_service.mock';
|
import { fatalErrorsServiceMock } from './fatal_errors/fatal_errors_service.mock';
|
||||||
import { httpServiceMock } from './http/http_service.mock';
|
import { httpServiceMock } from './http/http_service.mock';
|
||||||
import { i18nServiceMock } from './i18n/i18n_service.mock';
|
import { i18nServiceMock } from './i18n/i18n_service.mock';
|
||||||
|
@ -31,8 +31,8 @@ import { themeServiceMock } from './theme/theme_service.mock';
|
||||||
import { executionContextServiceMock } from './execution_context/execution_context_service.mock';
|
import { executionContextServiceMock } from './execution_context/execution_context_service.mock';
|
||||||
|
|
||||||
export { injectedMetadataServiceMock } from '@kbn/core-injected-metadata-browser-mocks';
|
export { injectedMetadataServiceMock } from '@kbn/core-injected-metadata-browser-mocks';
|
||||||
|
export { docLinksServiceMock } from '@kbn/core-doc-links-browser-mocks';
|
||||||
export { chromeServiceMock } from './chrome/chrome_service.mock';
|
export { chromeServiceMock } from './chrome/chrome_service.mock';
|
||||||
export { docLinksServiceMock } from './doc_links/doc_links_service.mock';
|
|
||||||
export { executionContextServiceMock } from './execution_context/execution_context_service.mock';
|
export { executionContextServiceMock } from './execution_context/execution_context_service.mock';
|
||||||
export { analyticsServiceMock } from './analytics/analytics_service.mock';
|
export { analyticsServiceMock } from './analytics/analytics_service.mock';
|
||||||
export { fatalErrorsServiceMock } from './fatal_errors/fatal_errors_service.mock';
|
export { fatalErrorsServiceMock } from './fatal_errors/fatal_errors_service.mock';
|
||||||
|
|
|
@ -22,6 +22,7 @@ import {
|
||||||
} from './plugins_service';
|
} from './plugins_service';
|
||||||
|
|
||||||
import type { InjectedMetadataPlugin } from '@kbn/core-injected-metadata-common-internal';
|
import type { InjectedMetadataPlugin } from '@kbn/core-injected-metadata-common-internal';
|
||||||
|
import { docLinksServiceMock } from '@kbn/core-doc-links-browser-mocks';
|
||||||
import { notificationServiceMock } from '../notifications/notifications_service.mock';
|
import { notificationServiceMock } from '../notifications/notifications_service.mock';
|
||||||
import { applicationServiceMock } from '../application/application_service.mock';
|
import { applicationServiceMock } from '../application/application_service.mock';
|
||||||
import { i18nServiceMock } from '../i18n/i18n_service.mock';
|
import { i18nServiceMock } from '../i18n/i18n_service.mock';
|
||||||
|
@ -32,7 +33,6 @@ import { uiSettingsServiceMock } from '../ui_settings/ui_settings_service.mock';
|
||||||
import { injectedMetadataServiceMock } from '@kbn/core-injected-metadata-browser-mocks';
|
import { injectedMetadataServiceMock } from '@kbn/core-injected-metadata-browser-mocks';
|
||||||
import { httpServiceMock } from '../http/http_service.mock';
|
import { httpServiceMock } from '../http/http_service.mock';
|
||||||
import { CoreSetup, CoreStart, PluginInitializerContext } from '..';
|
import { CoreSetup, CoreStart, PluginInitializerContext } from '..';
|
||||||
import { docLinksServiceMock } from '../doc_links/doc_links_service.mock';
|
|
||||||
import { savedObjectsServiceMock } from '../saved_objects/saved_objects_service.mock';
|
import { savedObjectsServiceMock } from '../saved_objects/saved_objects_service.mock';
|
||||||
import { deprecationsServiceMock } from '../deprecations/deprecations_service.mock';
|
import { deprecationsServiceMock } from '../deprecations/deprecations_service.mock';
|
||||||
import { themeServiceMock } from '../theme/theme_service.mock';
|
import { themeServiceMock } from '../theme/theme_service.mock';
|
||||||
|
|
|
@ -11,7 +11,7 @@ import { AnalyticsClient } from '@kbn/analytics-client';
|
||||||
import type { ButtonColor } from '@elastic/eui';
|
import type { ButtonColor } from '@elastic/eui';
|
||||||
import { ContextProviderOpts } from '@kbn/analytics-client';
|
import { ContextProviderOpts } from '@kbn/analytics-client';
|
||||||
import { CoreContext } from '@kbn/core-base-browser-internal';
|
import { CoreContext } from '@kbn/core-base-browser-internal';
|
||||||
import type { DocLinks } from '@kbn/doc-links';
|
import { DocLinksStart } from '@kbn/core-doc-links-browser';
|
||||||
import { EnvironmentMode } from '@kbn/config';
|
import { EnvironmentMode } from '@kbn/config';
|
||||||
import * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
|
import * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
|
||||||
import { EuiBreadcrumb } from '@elastic/eui';
|
import { EuiBreadcrumb } from '@elastic/eui';
|
||||||
|
@ -429,6 +429,8 @@ export interface CoreStart {
|
||||||
chrome: ChromeStart;
|
chrome: ChromeStart;
|
||||||
// (undocumented)
|
// (undocumented)
|
||||||
deprecations: DeprecationsServiceStart;
|
deprecations: DeprecationsServiceStart;
|
||||||
|
// Warning: (ae-unresolved-link) The @link reference could not be resolved: This type of declaration is not supported yet by the resolver
|
||||||
|
//
|
||||||
// (undocumented)
|
// (undocumented)
|
||||||
docLinks: DocLinksStart;
|
docLinks: DocLinksStart;
|
||||||
// (undocumented)
|
// (undocumented)
|
||||||
|
@ -492,15 +494,7 @@ export interface DeprecationsServiceStart {
|
||||||
resolveDeprecation: (details: DomainDeprecationDetails) => Promise<ResolveDeprecationResponse>;
|
resolveDeprecation: (details: DomainDeprecationDetails) => Promise<ResolveDeprecationResponse>;
|
||||||
}
|
}
|
||||||
|
|
||||||
// @public (undocumented)
|
export { DocLinksStart }
|
||||||
export interface DocLinksStart {
|
|
||||||
// (undocumented)
|
|
||||||
readonly DOC_LINK_VERSION: string;
|
|
||||||
// (undocumented)
|
|
||||||
readonly ELASTIC_WEBSITE_URL: string;
|
|
||||||
// (undocumented)
|
|
||||||
readonly links: DocLinks;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Warning: (ae-forgotten-export) The symbol "DeprecationsDetails" needs to be exported by the entry point index.d.ts
|
// Warning: (ae-forgotten-export) The symbol "DeprecationsDetails" needs to be exported by the entry point index.d.ts
|
||||||
//
|
//
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
* Side Public License, v 1.
|
* Side Public License, v 1.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import { mockCoreContext } from '@kbn/core-base-server-mocks';
|
||||||
import {
|
import {
|
||||||
httpServiceMock,
|
httpServiceMock,
|
||||||
InternalHttpServicePrebootMock,
|
InternalHttpServicePrebootMock,
|
||||||
|
@ -13,7 +14,6 @@ import {
|
||||||
} from '../http/http_service.mock';
|
} from '../http/http_service.mock';
|
||||||
import { mockRouter, RouterMock } from '../http/router/router.mock';
|
import { mockRouter, RouterMock } from '../http/router/router.mock';
|
||||||
import { CapabilitiesService, CapabilitiesSetup } from './capabilities_service';
|
import { CapabilitiesService, CapabilitiesSetup } from './capabilities_service';
|
||||||
import { mockCoreContext } from '../core_context.mock';
|
|
||||||
|
|
||||||
describe('CapabilitiesService', () => {
|
describe('CapabilitiesService', () => {
|
||||||
let http: InternalHttpServiceSetupMock;
|
let http: InternalHttpServiceSetupMock;
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
import { registerBundleRoutesMock } from './core_app.test.mocks';
|
import { registerBundleRoutesMock } from './core_app.test.mocks';
|
||||||
|
|
||||||
import { mockCoreContext } from '../core_context.mock';
|
import { mockCoreContext } from '@kbn/core-base-server-mocks';
|
||||||
import { coreMock, httpServerMock } from '../mocks';
|
import { coreMock, httpServerMock } from '../mocks';
|
||||||
import { httpResourcesMock } from '../http_resources/http_resources_service.mock';
|
import { httpResourcesMock } from '../http_resources/http_resources_service.mock';
|
||||||
import type { UiPlugins } from '../plugins';
|
import type { UiPlugins } from '../plugins';
|
||||||
|
|
|
@ -14,7 +14,7 @@ import { TestScheduler } from 'rxjs/testing';
|
||||||
import { HotObservable } from 'rxjs/internal/testing/HotObservable';
|
import { HotObservable } from 'rxjs/internal/testing/HotObservable';
|
||||||
|
|
||||||
import { configServiceMock } from '@kbn/config-mocks';
|
import { configServiceMock } from '@kbn/config-mocks';
|
||||||
import { mockCoreContext } from '../core_context.mock';
|
import { mockCoreContext } from '@kbn/core-base-server-mocks';
|
||||||
import { config as RawElasticsearchConfig } from '../elasticsearch/elasticsearch_config';
|
import { config as RawElasticsearchConfig } from '../elasticsearch/elasticsearch_config';
|
||||||
import { config as RawHttpConfig } from '../http/http_config';
|
import { config as RawHttpConfig } from '../http/http_config';
|
||||||
import { config as RawLoggingConfig } from '../logging/logging_config';
|
import { config as RawLoggingConfig } from '../logging/logging_config';
|
||||||
|
|
|
@ -8,11 +8,11 @@
|
||||||
|
|
||||||
import { DeprecationsFactoryMock } from './deprecations_service.test.mocks';
|
import { DeprecationsFactoryMock } from './deprecations_service.test.mocks';
|
||||||
|
|
||||||
|
import { mockCoreContext } from '@kbn/core-base-server-mocks';
|
||||||
/* eslint-disable dot-notation */
|
/* eslint-disable dot-notation */
|
||||||
import { DeprecationsService, DeprecationsSetupDeps } from './deprecations_service';
|
import { DeprecationsService, DeprecationsSetupDeps } from './deprecations_service';
|
||||||
import { httpServiceMock } from '../http/http_service.mock';
|
import { httpServiceMock } from '../http/http_service.mock';
|
||||||
import { savedObjectsClientMock, elasticsearchServiceMock, configServiceMock } from '../mocks';
|
import { savedObjectsClientMock, elasticsearchServiceMock, configServiceMock } from '../mocks';
|
||||||
import { mockCoreContext } from '../core_context.mock';
|
|
||||||
import { mockDeprecationsFactory } from './deprecations_factory.mock';
|
import { mockDeprecationsFactory } from './deprecations_factory.mock';
|
||||||
import { mockDeprecationsRegistry } from './deprecations_registry.mock';
|
import { mockDeprecationsRegistry } from './deprecations_registry.mock';
|
||||||
|
|
||||||
|
|
|
@ -16,8 +16,8 @@ import { writePidFile } from './write_pid_file';
|
||||||
import type { AnalyticsServicePreboot } from '../analytics';
|
import type { AnalyticsServicePreboot } from '../analytics';
|
||||||
|
|
||||||
import { configServiceMock } from '@kbn/config-mocks';
|
import { configServiceMock } from '@kbn/config-mocks';
|
||||||
|
import { mockCoreContext } from '@kbn/core-base-server-mocks';
|
||||||
import { loggingSystemMock } from '../logging/logging_system.mock';
|
import { loggingSystemMock } from '../logging/logging_system.mock';
|
||||||
import { mockCoreContext } from '../core_context.mock';
|
|
||||||
import { analyticsServiceMock } from '../analytics/analytics_service.mock';
|
import { analyticsServiceMock } from '../analytics/analytics_service.mock';
|
||||||
|
|
||||||
jest.mock('./resolve_uuid', () => ({
|
jest.mock('./resolve_uuid', () => ({
|
||||||
|
|
|
@ -6,11 +6,11 @@
|
||||||
* Side Public License, v 1.
|
* Side Public License, v 1.
|
||||||
*/
|
*/
|
||||||
import { BehaviorSubject } from 'rxjs';
|
import { BehaviorSubject } from 'rxjs';
|
||||||
|
import { mockCoreContext } from '@kbn/core-base-server-mocks';
|
||||||
import {
|
import {
|
||||||
ExecutionContextService,
|
ExecutionContextService,
|
||||||
InternalExecutionContextSetup,
|
InternalExecutionContextSetup,
|
||||||
} from './execution_context_service';
|
} from './execution_context_service';
|
||||||
import { mockCoreContext } from '../core_context.mock';
|
|
||||||
import { loggingSystemMock } from '../logging/logging_system.mock';
|
import { loggingSystemMock } from '../logging/logging_system.mock';
|
||||||
|
|
||||||
const delay = (ms: number = 100) => new Promise((resolve) => setTimeout(resolve, ms));
|
const delay = (ms: number = 100) => new Promise((resolve) => setTimeout(resolve, ms));
|
||||||
|
|
|
@ -10,8 +10,8 @@ import { getApmConfigMock } from './http_resources_service.test.mocks';
|
||||||
|
|
||||||
import { IRouter, RouteConfig } from '../http';
|
import { IRouter, RouteConfig } from '../http';
|
||||||
|
|
||||||
|
import { mockCoreContext } from '@kbn/core-base-server-mocks';
|
||||||
import { coreMock } from '../mocks';
|
import { coreMock } from '../mocks';
|
||||||
import { mockCoreContext } from '../core_context.mock';
|
|
||||||
import { httpServiceMock } from '../http/http_service.mock';
|
import { httpServiceMock } from '../http/http_service.mock';
|
||||||
import { httpServerMock } from '../http/http_server.mocks';
|
import { httpServerMock } from '../http/http_server.mocks';
|
||||||
import { renderingMock } from '../rendering/rendering_service.mock';
|
import { renderingMock } from '../rendering/rendering_service.mock';
|
||||||
|
|
|
@ -16,7 +16,7 @@ import { BehaviorSubject } from 'rxjs';
|
||||||
import { I18nService } from './i18n_service';
|
import { I18nService } from './i18n_service';
|
||||||
|
|
||||||
import { configServiceMock } from '@kbn/config-mocks';
|
import { configServiceMock } from '@kbn/config-mocks';
|
||||||
import { mockCoreContext } from '../core_context.mock';
|
import { mockCoreContext } from '@kbn/core-base-server-mocks';
|
||||||
import { httpServiceMock } from '../mocks';
|
import { httpServiceMock } from '../mocks';
|
||||||
|
|
||||||
const getConfigService = (locale = 'en') => {
|
const getConfigService = (locale = 'en') => {
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
|
|
||||||
import { AwaitedProperties } from '@kbn/utility-types';
|
import { AwaitedProperties } from '@kbn/utility-types';
|
||||||
import { Type } from '@kbn/config-schema';
|
import { Type } from '@kbn/config-schema';
|
||||||
|
import type { DocLinksServiceStart, DocLinksServiceSetup } from '@kbn/core-doc-links-server';
|
||||||
import {
|
import {
|
||||||
ElasticsearchServiceSetup,
|
ElasticsearchServiceSetup,
|
||||||
configSchema as elasticsearchConfigSchema,
|
configSchema as elasticsearchConfigSchema,
|
||||||
|
@ -70,7 +71,6 @@ import {
|
||||||
CoreServicesUsageData,
|
CoreServicesUsageData,
|
||||||
} from './core_usage_data';
|
} from './core_usage_data';
|
||||||
import { PrebootServicePreboot } from './preboot';
|
import { PrebootServicePreboot } from './preboot';
|
||||||
import { DocLinksServiceStart, DocLinksServiceSetup } from './doc_links';
|
|
||||||
|
|
||||||
export type { PrebootServicePreboot } from './preboot';
|
export type { PrebootServicePreboot } from './preboot';
|
||||||
|
|
||||||
|
@ -449,7 +449,7 @@ export type {
|
||||||
CoreIncrementCounterParams,
|
CoreIncrementCounterParams,
|
||||||
} from './core_usage_data';
|
} from './core_usage_data';
|
||||||
|
|
||||||
export type { DocLinksServiceSetup, DocLinksServiceStart } from './doc_links';
|
export type { DocLinksServiceStart, DocLinksServiceSetup } from '@kbn/core-doc-links-server';
|
||||||
|
|
||||||
export type {
|
export type {
|
||||||
AnalyticsServiceSetup,
|
AnalyticsServiceSetup,
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
* Side Public License, v 1.
|
* Side Public License, v 1.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import type { DocLinksServiceStart, DocLinksServiceSetup } from '@kbn/core-doc-links-server';
|
||||||
import { CapabilitiesSetup, CapabilitiesStart } from './capabilities';
|
import { CapabilitiesSetup, CapabilitiesStart } from './capabilities';
|
||||||
import { InternalContextPreboot, ContextSetup } from './context';
|
import { InternalContextPreboot, ContextSetup } from './context';
|
||||||
import {
|
import {
|
||||||
|
@ -41,7 +42,6 @@ import type {
|
||||||
InternalExecutionContextStart,
|
InternalExecutionContextStart,
|
||||||
} from './execution_context';
|
} from './execution_context';
|
||||||
import { InternalPrebootServicePreboot } from './preboot';
|
import { InternalPrebootServicePreboot } from './preboot';
|
||||||
import { DocLinksServiceSetup, DocLinksServiceStart } from './doc_links';
|
|
||||||
import type {
|
import type {
|
||||||
AnalyticsServicePreboot,
|
AnalyticsServicePreboot,
|
||||||
AnalyticsServiceSetup,
|
AnalyticsServiceSetup,
|
||||||
|
|
|
@ -9,9 +9,9 @@
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
|
|
||||||
import { configServiceMock } from '@kbn/config-mocks';
|
import { configServiceMock } from '@kbn/config-mocks';
|
||||||
|
import { mockCoreContext } from '@kbn/core-base-server-mocks';
|
||||||
import { mockOpsCollector } from './metrics_service.test.mocks';
|
import { mockOpsCollector } from './metrics_service.test.mocks';
|
||||||
import { MetricsService } from './metrics_service';
|
import { MetricsService } from './metrics_service';
|
||||||
import { mockCoreContext } from '../core_context.mock';
|
|
||||||
import { httpServiceMock } from '../http/http_service.mock';
|
import { httpServiceMock } from '../http/http_service.mock';
|
||||||
import { loggingSystemMock } from '../logging/logging_system.mock';
|
import { loggingSystemMock } from '../logging/logging_system.mock';
|
||||||
import { take } from 'rxjs/operators';
|
import { take } from 'rxjs/operators';
|
||||||
|
|
|
@ -11,6 +11,7 @@ import { duration } from 'moment';
|
||||||
import { ByteSizeValue } from '@kbn/config-schema';
|
import { ByteSizeValue } from '@kbn/config-schema';
|
||||||
import { isPromise } from '@kbn/std';
|
import { isPromise } from '@kbn/std';
|
||||||
import type { MockedKeys } from '@kbn/utility-types-jest';
|
import type { MockedKeys } from '@kbn/utility-types-jest';
|
||||||
|
import { docLinksServiceMock } from '@kbn/core-doc-links-server-mocks';
|
||||||
import type {
|
import type {
|
||||||
PluginInitializerContext,
|
PluginInitializerContext,
|
||||||
CoreSetup,
|
CoreSetup,
|
||||||
|
@ -39,7 +40,6 @@ import { i18nServiceMock } from './i18n/i18n_service.mock';
|
||||||
import { deprecationsServiceMock } from './deprecations/deprecations_service.mock';
|
import { deprecationsServiceMock } from './deprecations/deprecations_service.mock';
|
||||||
import { executionContextServiceMock } from './execution_context/execution_context_service.mock';
|
import { executionContextServiceMock } from './execution_context/execution_context_service.mock';
|
||||||
import { prebootServiceMock } from './preboot/preboot_service.mock';
|
import { prebootServiceMock } from './preboot/preboot_service.mock';
|
||||||
import { docLinksServiceMock } from './doc_links/doc_links_service.mock';
|
|
||||||
import { analyticsServiceMock } from './analytics/analytics_service.mock';
|
import { analyticsServiceMock } from './analytics/analytics_service.mock';
|
||||||
|
|
||||||
export { configServiceMock, configDeprecationsMock } from '@kbn/config-mocks';
|
export { configServiceMock, configDeprecationsMock } from '@kbn/config-mocks';
|
||||||
|
@ -64,7 +64,7 @@ export { coreUsageDataServiceMock } from './core_usage_data/core_usage_data_serv
|
||||||
export { i18nServiceMock } from './i18n/i18n_service.mock';
|
export { i18nServiceMock } from './i18n/i18n_service.mock';
|
||||||
export { deprecationsServiceMock } from './deprecations/deprecations_service.mock';
|
export { deprecationsServiceMock } from './deprecations/deprecations_service.mock';
|
||||||
export { executionContextServiceMock } from './execution_context/execution_context_service.mock';
|
export { executionContextServiceMock } from './execution_context/execution_context_service.mock';
|
||||||
export { docLinksServiceMock } from './doc_links/doc_links_service.mock';
|
export { docLinksServiceMock } from '@kbn/core-doc-links-server-mocks';
|
||||||
export { analyticsServiceMock } from './analytics/analytics_service.mock';
|
export { analyticsServiceMock } from './analytics/analytics_service.mock';
|
||||||
|
|
||||||
export type {
|
export type {
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
* Side Public License, v 1.
|
* Side Public License, v 1.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { mockCoreContext } from '../../core_context.mock';
|
import { mockCoreContext } from '@kbn/core-base-server-mocks';
|
||||||
import { elasticsearchServiceMock } from '../../elasticsearch/elasticsearch_service.mock';
|
import { elasticsearchServiceMock } from '../../elasticsearch/elasticsearch_service.mock';
|
||||||
import { httpServiceMock } from '../../http/http_service.mock';
|
import { httpServiceMock } from '../../http/http_service.mock';
|
||||||
import { pluginServiceMock } from '../../plugins/plugins_service.mock';
|
import { pluginServiceMock } from '../../plugins/plugins_service.mock';
|
||||||
|
|
|
@ -8,9 +8,10 @@
|
||||||
|
|
||||||
import { ByteSizeValue } from '@kbn/config-schema';
|
import { ByteSizeValue } from '@kbn/config-schema';
|
||||||
import * as Option from 'fp-ts/Option';
|
import * as Option from 'fp-ts/Option';
|
||||||
import type { DocLinksServiceSetup } from '../../doc_links';
|
import type { DocLinksServiceSetup } from '@kbn/core-doc-links-server';
|
||||||
import { docLinksServiceMock, loggingSystemMock } from '../../mocks';
|
import { docLinksServiceMock } from '@kbn/core-doc-links-server-mocks';
|
||||||
import type { SavedObjectsMigrationConfigType } from '../saved_objects_config';
|
import { loggingSystemMock } from '../../mocks';
|
||||||
|
import { SavedObjectsMigrationConfigType } from '../saved_objects_config';
|
||||||
import { SavedObjectTypeRegistry } from '../saved_objects_type_registry';
|
import { SavedObjectTypeRegistry } from '../saved_objects_type_registry';
|
||||||
import { createInitialState } from './initial_state';
|
import { createInitialState } from './initial_state';
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import * as Option from 'fp-ts/Option';
|
import * as Option from 'fp-ts/Option';
|
||||||
|
import type { DocLinksServiceStart } from '@kbn/core-doc-links-server';
|
||||||
import type { Logger } from '@kbn/logging';
|
import type { Logger } from '@kbn/logging';
|
||||||
import type { IndexMapping } from '../mappings';
|
import type { IndexMapping } from '../mappings';
|
||||||
import type { SavedObjectsMigrationVersion } from '../../../types';
|
import type { SavedObjectsMigrationVersion } from '../../../types';
|
||||||
|
@ -14,7 +15,6 @@ import type { SavedObjectsMigrationConfigType } from '../saved_objects_config';
|
||||||
import type { ISavedObjectTypeRegistry } from '../saved_objects_type_registry';
|
import type { ISavedObjectTypeRegistry } from '../saved_objects_type_registry';
|
||||||
import type { InitState } from './state';
|
import type { InitState } from './state';
|
||||||
import { excludeUnusedTypesQuery } from './core';
|
import { excludeUnusedTypesQuery } from './core';
|
||||||
import type { DocLinksServiceStart } from '../../doc_links';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Construct the initial state for the model
|
* Construct the initial state for the model
|
||||||
|
|
|
@ -16,7 +16,7 @@ import { SavedObjectTypeRegistry } from '../saved_objects_type_registry';
|
||||||
import { SavedObjectsType } from '../types';
|
import { SavedObjectsType } from '../types';
|
||||||
import { DocumentMigrator } from './core/document_migrator';
|
import { DocumentMigrator } from './core/document_migrator';
|
||||||
import { ByteSizeValue } from '@kbn/config-schema';
|
import { ByteSizeValue } from '@kbn/config-schema';
|
||||||
import { docLinksServiceMock } from '../../mocks';
|
import { docLinksServiceMock } from '@kbn/core-doc-links-server-mocks';
|
||||||
import { lastValueFrom } from 'rxjs';
|
import { lastValueFrom } from 'rxjs';
|
||||||
|
|
||||||
jest.mock('./core/document_migrator', () => {
|
jest.mock('./core/document_migrator', () => {
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue