Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate savedObject management to new plugin #59110

Closed
wants to merge 12 commits into from
8 changes: 7 additions & 1 deletion src/core/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,11 @@ import { PluginsServiceSetup, PluginsServiceStart, PluginOpaqueId } from './plug
import { ContextSetup } from './context';
import { IUiSettingsClient, UiSettingsServiceSetup, UiSettingsServiceStart } from './ui_settings';
import { SavedObjectsClientContract } from './saved_objects/types';
import { SavedObjectsServiceSetup, SavedObjectsServiceStart } from './saved_objects';
import {
ISavedObjectTypeRegistry,
SavedObjectsServiceSetup,
SavedObjectsServiceStart,
} from './saved_objects';
import { CapabilitiesSetup, CapabilitiesStart } from './capabilities';
import { UuidServiceSetup } from './uuid';

Expand Down Expand Up @@ -227,6 +231,7 @@ export {
SavedObjectTypeRegistry,
ISavedObjectTypeRegistry,
SavedObjectsType,
SavedObjectsTypeManagementDefinition,
SavedObjectMigrationMap,
SavedObjectMigrationFn,
} from './saved_objects';
Expand Down Expand Up @@ -291,6 +296,7 @@ export interface RequestHandlerContext {
rendering: IScopedRenderingClient;
savedObjects: {
client: SavedObjectsClientContract;
typeRegistry: ISavedObjectTypeRegistry;
};
elasticsearch: {
dataClient: IScopedClusterClient;
Expand Down
2 changes: 2 additions & 0 deletions src/core/server/mocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import { httpServiceMock } from './http/http_service.mock';
import { contextServiceMock } from './context/context_service.mock';
import { savedObjectsServiceMock } from './saved_objects/saved_objects_service.mock';
import { savedObjectsClientMock } from './saved_objects/service/saved_objects_client.mock';
import { typeRegistryMock as savedObjectsTypeRegistryMock } from './saved_objects/saved_objects_type_registry.mock';
import { uiSettingsServiceMock } from './ui_settings/ui_settings_service.mock';
import { SharedGlobalConfig } from './plugins';
import { InternalCoreSetup, InternalCoreStart } from './internal_types';
Expand Down Expand Up @@ -173,6 +174,7 @@ function createCoreRequestHandlerContextMock() {
},
savedObjects: {
client: savedObjectsClientMock.create(),
typeRegistry: savedObjectsTypeRegistryMock.create(),
},
elasticsearch: {
adminClient: elasticsearchServiceMock.createScopedClusterClient(),
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions src/core/server/saved_objects/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ export * from './service';

export { SavedObjectsSchema } from './schema';

export { SavedObjectsManagement } from './management';

export * from './import';

export {
Expand Down Expand Up @@ -70,7 +68,7 @@ export {
SavedObjectMigrationContext,
} from './migrations';

export { SavedObjectsType } from './types';
export { SavedObjectsType, SavedObjectsTypeManagementDefinition } from './types';

export { savedObjectsConfig, savedObjectsMigrationConfig } from './saved_objects_config';
export { SavedObjectTypeRegistry, ISavedObjectTypeRegistry } from './saved_objects_type_registry';
174 changes: 0 additions & 174 deletions src/core/server/saved_objects/management/management.test.ts

This file was deleted.

91 changes: 0 additions & 91 deletions src/core/server/saved_objects/management/management.ts

This file was deleted.

Loading