diff --git a/plugins/todo/dev/index.tsx b/plugins/todo/dev/index.tsx index 71e5e36355..741a409d84 100644 --- a/plugins/todo/dev/index.tsx +++ b/plugins/todo/dev/index.tsx @@ -15,14 +15,6 @@ */ import { Entity, LOCATION_ANNOTATION } from '@backstage/catalog-model'; -import { - ApiProvider, - ApiRegistry, - Content, - Header, - HeaderLabel, - Page, -} from '@backstage/core'; import { createDevApp } from '@backstage/dev-utils'; import { EntityProvider } from '@backstage/plugin-catalog-react'; import OnlineIcon from '@material-ui/icons/Cloud'; @@ -30,6 +22,9 @@ import OfflineIcon from '@material-ui/icons/Storage'; import React from 'react'; import { EntityTodoContent, todoApiRef, todoPlugin } from '../src'; +import { ApiProvider, ApiRegistry } from '@backstage/core-app-api'; +import { Content, Header, HeaderLabel, Page } from '@backstage/core-components'; + const entity: Entity = { apiVersion: 'backstage.io/v1alpha1', kind: 'Component', diff --git a/plugins/todo/package.json b/plugins/todo/package.json index 88eb60b3ce..ada0afb5e2 100644 --- a/plugins/todo/package.json +++ b/plugins/todo/package.json @@ -27,7 +27,8 @@ }, "dependencies": { "@backstage/catalog-model": "^0.8.0", - "@backstage/core": "^0.7.11", + "@backstage/core-components": "^0.1.0", + "@backstage/core-plugin-api": "^0.1.0", "@backstage/errors": "^0.1.1", "@backstage/plugin-catalog-react": "^0.2.0", "@backstage/theme": "^0.2.8", @@ -40,6 +41,7 @@ }, "devDependencies": { "@backstage/cli": "^0.6.14", + "@backstage/core-app-api": "^0.1.0", "@backstage/dev-utils": "^0.1.17", "@backstage/test-utils": "^0.1.13", "@testing-library/jest-dom": "^5.10.1", diff --git a/plugins/todo/src/api/TodoClient.ts b/plugins/todo/src/api/TodoClient.ts index 9d9fff0144..3f3d7ed28b 100644 --- a/plugins/todo/src/api/TodoClient.ts +++ b/plugins/todo/src/api/TodoClient.ts @@ -16,8 +16,8 @@ import { serializeEntityRef } from '@backstage/catalog-model'; import { ResponseError } from '@backstage/errors'; -import { DiscoveryApi, IdentityApi } from '@backstage/core'; import { TodoApi, TodoListOptions, TodoListResult } from './types'; +import { DiscoveryApi, IdentityApi } from '@backstage/core-plugin-api'; interface Options { discoveryApi: DiscoveryApi; diff --git a/plugins/todo/src/api/types.ts b/plugins/todo/src/api/types.ts index 10c810592c..e8781a137a 100644 --- a/plugins/todo/src/api/types.ts +++ b/plugins/todo/src/api/types.ts @@ -14,8 +14,8 @@ * limitations under the License. */ -import { createApiRef } from '@backstage/core'; import { Entity } from '@backstage/catalog-model'; +import { createApiRef } from '@backstage/core-plugin-api'; export type TodoItem = { /** The contents of the TODO comment */ diff --git a/plugins/todo/src/components/TodoList/TodoList.test.tsx b/plugins/todo/src/components/TodoList/TodoList.test.tsx index 2fb4f780bc..38de72f288 100644 --- a/plugins/todo/src/components/TodoList/TodoList.test.tsx +++ b/plugins/todo/src/components/TodoList/TodoList.test.tsx @@ -15,12 +15,12 @@ */ import { Entity } from '@backstage/catalog-model'; -import { ApiProvider, ApiRegistry } from '@backstage/core'; import { EntityProvider } from '@backstage/plugin-catalog-react'; import { renderWithEffects } from '@backstage/test-utils'; import React from 'react'; import { TodoApi, todoApiRef } from '../../api'; import { TodoList } from './TodoList'; +import { ApiProvider, ApiRegistry } from '@backstage/core-app-api'; describe('TodoList', () => { it('should render', async () => { diff --git a/plugins/todo/src/components/TodoList/TodoList.tsx b/plugins/todo/src/components/TodoList/TodoList.tsx index 101f1caac0..da350cf42a 100644 --- a/plugins/todo/src/components/TodoList/TodoList.tsx +++ b/plugins/todo/src/components/TodoList/TodoList.tsx @@ -14,19 +14,20 @@ * limitations under the License. */ -import { - Table, - TableColumn, - useApi, - OverflowTooltip, - Link, - ResponseErrorPanel, -} from '@backstage/core'; import { useEntity } from '@backstage/plugin-catalog-react'; import React, { useState } from 'react'; import { todoApiRef } from '../../api'; import { TodoItem, TodoListOptions } from '../../api/types'; +import { + Table, + TableColumn, + OverflowTooltip, + Link, + ResponseErrorPanel, +} from '@backstage/core-components'; +import { useApi } from '@backstage/core-plugin-api'; + const PAGE_SIZE = 10; const columns: TableColumn[] = [ diff --git a/plugins/todo/src/plugin.ts b/plugins/todo/src/plugin.ts index 6dc06a7c34..0759213282 100644 --- a/plugins/todo/src/plugin.ts +++ b/plugins/todo/src/plugin.ts @@ -13,14 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +import { todoApiRef, TodoClient } from './api'; import { createApiFactory, createPlugin, createComponentExtension, discoveryApiRef, identityApiRef, -} from '@backstage/core'; -import { todoApiRef, TodoClient } from './api'; +} from '@backstage/core-plugin-api'; // import { rootRouteRef } from './routes'; diff --git a/plugins/todo/src/routes.ts b/plugins/todo/src/routes.ts index f34eea2391..013fb00467 100644 --- a/plugins/todo/src/routes.ts +++ b/plugins/todo/src/routes.ts @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { createRouteRef } from '@backstage/core'; +import { createRouteRef } from '@backstage/core-plugin-api'; export const rootRouteRef = createRouteRef({ title: 'todo',