Fix imports from restricted paths#130102
Conversation
| import type { | ||
| EmbeddablePersistableStateService, | ||
| EmbeddableRegistryDefinition, | ||
| } from '../../../embeddable/common'; |
There was a problem hiding this comment.
Please let me clarify you some rules:
- If your file placed in
{your_plugin_id}/server/**/*.ts(x)normally we should import from"{plugin}/server". - If your file placed in
{your_plugin_id}/public/**/*.ts(x)normally we should import from"{plugin}/public". - If your file placed in
{your_plugin_id}/common/**/*.ts(x)normally we should import from"{plugin}/common".
About this one. The following import import { EmbeddablePersistableStateService } from '../../../embeddable/common'; was absolutely right and we don't needed to modify that.
Please do re-export needed types from the common folder instead of removing it
# Conflicts: # src/plugins/controls/server/control_group/control_group_container_factory.ts # src/plugins/controls/server/control_types/options_list/options_list_embeddable_factory.ts # src/plugins/controls/server/control_types/time_slider/time_slider_embeddable_factory.ts # src/plugins/dashboard/server/embeddable/dashboard_container_embeddable_factory.ts # src/plugins/embeddable/common/types.ts # src/plugins/embeddable/server/plugin.ts # src/plugins/visualizations/common/types.ts # src/plugins/visualizations/server/embeddable/make_visualize_embeddable_factory.test.ts # src/plugins/visualizations/server/embeddable/make_visualize_embeddable_factory.ts # x-pack/plugins/lens/common/embeddable_factory/index.ts # x-pack/plugins/lens/common/expressions/counter_rate/counter_rate.test.ts # x-pack/plugins/lens/common/expressions/format_column/format_column.test.ts # x-pack/plugins/lens/common/expressions/merge_tables/merge_tables.test.ts # x-pack/plugins/lens/common/expressions/time_scale/time_scale.test.ts # x-pack/plugins/lens/server/embeddable/make_lens_embeddable_factory.ts # x-pack/plugins/lens/server/migrations/saved_object_migrations.ts # x-pack/plugins/lens/server/migrations/types.ts # x-pack/plugins/maps/common/embeddable/extract.ts # x-pack/plugins/maps/common/embeddable/inject.ts
|
Pinging @elastic/kibana-vis-editors @elastic/kibana-vis-editors-external (Team:VisEditors) |
|
@elasticmachine merge upstream |
nreese
left a comment
There was a problem hiding this comment.
maps changes LGTM
code review
|
@elasticmachine merge upstream |
💚 Build SucceededMetrics [docs]Public APIs missing comments
Unknown metric groupsAPI count
ESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
* Fix imports from restricted paths * Re-export EmbeddableRegistryDefinition from embedabble server and fix some imports Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Closes #129316
Summary
EmbeddableRegistryDefinitiontype was moved from embeddable server to common and re-exported from server, which resolved some restricted paths in maps common and didn't affect other imports from server files.For maintainers