Skip to content

Expose core api types in /public and /server#32746

Merged
rudolf merged 16 commits intoelastic:masterfrom
rudolf:rm-expose-server-public-types
Mar 19, 2019
Merged

Expose core api types in /public and /server#32746
rudolf merged 16 commits intoelastic:masterfrom
rudolf:rm-expose-server-public-types

Conversation

@rudolf
Copy link
Copy Markdown
Contributor

@rudolf rudolf commented Mar 8, 2019

Summary

Exposes all of the core API types for use by both public and server plugins. Types are also exposed as part of the kibana package, allowing imports like import {CoreStart} from 'kibana/public'

Checklist

Use strikethroughs to remove checklist items you don't feel are applicable to this PR.

For maintainers

@elasticmachine
Copy link
Copy Markdown
Contributor

💔 Build Failed

@rudolf rudolf added Team:Core Platform Core services: plugins, logging, config, saved objects, http, ES client, i18n, etc t// Feature:New Platform labels Mar 8, 2019
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/kibana-platform

@elasticmachine
Copy link
Copy Markdown
Contributor

💔 Build Failed

@rudolf
Copy link
Copy Markdown
Contributor Author

rudolf commented Mar 12, 2019

retest

@rudolf rudolf marked this pull request as ready for review March 12, 2019 21:35
@rudolf rudolf requested a review from a team as a code owner March 12, 2019 21:35
@rudolf rudolf added the v8.0.0 label Mar 12, 2019
@elasticmachine
Copy link
Copy Markdown
Contributor

💔 Build Failed

rudolf added 3 commits March 12, 2019 14:56
The exported type `InjectedMetadataStart` derives it's type from the returned values.
Since it's internal state is frozen the type changes to `ReadOnly<`. However, consumers
of the API shouldn't have to know or care about this type.
@rudolf rudolf force-pushed the rm-expose-server-public-types branch from 8c9fca2 to d65574d Compare March 12, 2019 21:56
@elasticmachine
Copy link
Copy Markdown
Contributor

💔 Build Failed

@elasticmachine
Copy link
Copy Markdown
Contributor

💔 Build Failed

@elasticmachine
Copy link
Copy Markdown
Contributor

💔 Build Failed

@rudolf
Copy link
Copy Markdown
Contributor Author

rudolf commented Mar 14, 2019

I've merged in master now which should include elastic/eui#1723

@elasticmachine
Copy link
Copy Markdown
Contributor

💔 Build Failed

@elasticmachine
Copy link
Copy Markdown
Contributor

💔 Build Failed

Exposing the internal API's at the top level of core/public and core/server
makes it obvious that these API's are consumed outside these modules. Marking
these @internal ensures they don't get exported as part of the documentation.
@elasticmachine
Copy link
Copy Markdown
Contributor

💔 Build Failed

@elasticmachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

@elasticmachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

@rudolf rudolf added the review label Mar 18, 2019
@rudolf rudolf added non-issue Indicates to automation that a pull request should not appear in the release notes v7.2.0 labels Mar 18, 2019
@rudolf rudolf merged commit 1ffb261 into elastic:master Mar 19, 2019
@rudolf rudolf deleted the rm-expose-server-public-types branch March 19, 2019 07:35
rudolf added a commit to rudolf/kibana that referenced this pull request Mar 19, 2019
* Expose core api types in /public and /server

* Export CoreStart from core/public

* Export Server and Public from 'kibana'

* Cast frozen object type back to original

The exported type `InjectedMetadataStart` derives it's type from the returned values.
Since it's internal state is frozen the type changes to `ReadOnly<`. However, consumers
of the API shouldn't have to know or care about this type.

* Be more selective with what gets exported

* Fix type imports in tests

* Fix type errors

* Remove src/type_exports.ts

* More remove src/type_exports.ts

* Remove build:types

* Fix bootstrap import

* Expose internal API's at the top level

Exposing the internal API's at the top level of core/public and core/server
makes it obvious that these API's are consumed outside these modules. Marking
these @internal ensures they don't get exported as part of the documentation.

* Fix tests

* Put core/{public/server} in their own namespaces
rudolf added a commit that referenced this pull request Mar 19, 2019
* Expose core api types in /public and /server

* Export CoreStart from core/public

* Export Server and Public from 'kibana'

* Cast frozen object type back to original

The exported type `InjectedMetadataStart` derives it's type from the returned values.
Since it's internal state is frozen the type changes to `ReadOnly<`. However, consumers
of the API shouldn't have to know or care about this type.

* Be more selective with what gets exported

* Fix type imports in tests

* Fix type errors

* Remove src/type_exports.ts

* More remove src/type_exports.ts

* Remove build:types

* Fix bootstrap import

* Expose internal API's at the top level

Exposing the internal API's at the top level of core/public and core/server
makes it obvious that these API's are consumed outside these modules. Marking
these @internal ensures they don't get exported as part of the documentation.

* Fix tests

* Put core/{public/server} in their own namespaces
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature:New Platform non-issue Indicates to automation that a pull request should not appear in the release notes review Team:Core Platform Core services: plugins, logging, config, saved objects, http, ES client, i18n, etc t// v7.2.0 v8.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants