Skip to content

Commit b3bdf56

Browse files
authored
Merge pull request #31 from backstage/blam/new
Update the demo site to latest deps
2 parents 9ca697d + c1a007a commit b3bdf56

File tree

9 files changed

+1221
-978
lines changed

9 files changed

+1221
-978
lines changed

packages/app/package.json

+13-11
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,27 @@
44
"private": true,
55
"bundled": true,
66
"dependencies": {
7-
"@backstage/catalog-model": "^0.8.0",
8-
"@backstage/cli": "^0.6.6",
9-
"@backstage/core": "^0.7.3",
7+
"@backstage/core-components": "^0.2.0",
8+
"@backstage/core-app-api": "^0.1.6",
9+
"@backstage/core-plugin-api": "^0.1.4",
10+
"@backstage/catalog-model": "^0.9.0",
11+
"@backstage/cli": "^0.7.6",
1012
"@backstage/integration-react": "^0.1.1",
11-
"@backstage/plugin-api-docs": "^0.4.9",
13+
"@backstage/plugin-api-docs": "^0.6.4",
1214
"@backstage/plugin-badges": "^0.2.1",
1315
"@backstage/plugin-catalog": "^0.6.0",
14-
"@backstage/plugin-catalog-react": "^0.2.0",
15-
"@backstage/plugin-cost-insights": "^0.10.0",
16+
"@backstage/plugin-catalog-react": "^0.4.0",
17+
"@backstage/plugin-cost-insights": "^0.11.2",
1618
"@backstage/plugin-explore": "^0.3.2",
17-
"@backstage/plugin-explore-react": "^0.0.5",
19+
"@backstage/plugin-explore-react": "^0.0.6",
1820
"@backstage/plugin-github-actions": "^0.4.2",
1921
"@backstage/plugin-graphiql": "^0.2.9",
2022
"@backstage/plugin-org": "^0.3.11",
21-
"@backstage/plugin-search": "^0.3.4",
22-
"@backstage/plugin-tech-radar": "^0.3.8",
23-
"@backstage/plugin-techdocs": "^0.9.2",
23+
"@backstage/plugin-search": "^0.4.5",
24+
"@backstage/plugin-tech-radar": "^0.4.3",
25+
"@backstage/plugin-techdocs": "^0.10.2",
2426
"@backstage/plugin-todo": "^0.1.0",
25-
"@backstage/plugin-user-settings": "^0.2.8",
27+
"@backstage/plugin-user-settings": "^0.3.2",
2628
"@backstage/test-utils": "^0.1.9",
2729
"@backstage/theme": "^0.2.5",
2830
"@material-ui/core": "^4.11.0",

packages/app/src/App.tsx

+3-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
import React from 'react';
22
import { Navigate, Route } from 'react-router';
3-
import {
4-
AlertDisplay,
5-
createApp,
6-
FlatRoutes,
7-
OAuthRequestDialog,
8-
} from '@backstage/core';
93
import { ApiExplorerPage } from '@backstage/plugin-api-docs';
104
import {
115
catalogPlugin,
@@ -28,6 +22,9 @@ import { entityPage } from './components/catalog/EntityPage';
2822
import { Root } from './components/Root';
2923
import * as plugins from './plugins';
3024

25+
import { AlertDisplay, OAuthRequestDialog } from '@backstage/core-components';
26+
import { createApp, FlatRoutes } from '@backstage/core-app-api';
27+
3128
const app = createApp({
3229
apis,
3330
plugins: Object.values(plugins),

packages/app/src/apis.ts

+12-10
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,3 @@
1-
import {
2-
createApiFactory,
3-
githubAuthApiRef,
4-
discoveryApiRef,
5-
oauthRequestApiRef,
6-
GithubAuth,
7-
errorApiRef,
8-
configApiRef,
9-
AnyApiFactory,
10-
} from '@backstage/core';
111
import {
122
graphQlBrowseApiRef,
133
GraphQLEndpoints,
@@ -23,6 +13,18 @@ import {
2313
} from '@backstage/integration-react';
2414
import { exampleTools } from './tools';
2515

16+
import {
17+
createApiFactory,
18+
githubAuthApiRef,
19+
discoveryApiRef,
20+
oauthRequestApiRef,
21+
errorApiRef,
22+
configApiRef,
23+
AnyApiFactory,
24+
} from '@backstage/core-plugin-api';
25+
26+
import { GithubAuth } from '@backstage/core-app-api';
27+
2628
export const apis: AnyApiFactory[] = [
2729
createApiFactory({
2830
api: scmIntegrationsApiRef,

packages/app/src/components/Root/Root.tsx

+5-5
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ import LibraryBooks from '@material-ui/icons/LibraryBooks';
88
import MoneyIcon from '@material-ui/icons/MonetizationOn';
99
import LogoFull from './LogoFull';
1010
import LogoIcon from './LogoIcon';
11+
import { NavLink } from 'react-router-dom';
12+
import { GraphiQLIcon } from '@backstage/plugin-graphiql';
13+
import { Settings as SidebarSettings } from '@backstage/plugin-user-settings';
14+
import { SidebarSearch } from '@backstage/plugin-search';
1115
import {
1216
Sidebar,
1317
SidebarPage,
@@ -16,11 +20,7 @@ import {
1620
SidebarItem,
1721
SidebarDivider,
1822
SidebarSpace,
19-
} from '@backstage/core';
20-
import { NavLink } from 'react-router-dom';
21-
import { GraphiQLIcon } from '@backstage/plugin-graphiql';
22-
import { Settings as SidebarSettings } from '@backstage/plugin-user-settings';
23-
import { SidebarSearch } from '@backstage/plugin-search';
23+
} from '@backstage/core-components';
2424

2525
const useSidebarLogoStyles = makeStyles({
2626
root: {

packages/app/src/components/catalog/EntityPage.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ import {
5353
} from '@backstage/plugin-org';
5454
import { EntityTechdocsContent } from '@backstage/plugin-techdocs';
5555
import { EntityTodoContent } from '@backstage/plugin-todo';
56-
import { EmptyState } from '@backstage/core';
56+
import { EmptyState } from '@backstage/core-components';
5757

5858
const EntityLayoutWrapper = (props: { children?: React.ReactNode }) => {
5959
const [badgesDialogOpen, setBadgesDialogOpen] = useState(false);

packages/backend/package.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,17 @@
1919
"dependencies": {
2020
"@backstage/backend-common": "^0.8.0",
2121
"@backstage/catalog-client": "^0.3.8",
22-
"@backstage/catalog-model": "^0.8.0",
22+
"@backstage/catalog-model": "^0.9.0",
2323
"@backstage/config": "^0.1.4",
2424
"@backstage/errors": "^0.1.1",
2525
"@backstage/plugin-app-backend": "^0.3.10",
2626
"@backstage/plugin-auth-backend": "^0.3.6",
2727
"@backstage/plugin-badges-backend": "^0.1.1",
28-
"@backstage/plugin-catalog-backend": "^0.10.0",
28+
"@backstage/plugin-catalog-backend": "^0.13.1",
2929
"@backstage/plugin-proxy-backend": "^0.2.6",
30-
"@backstage/plugin-search-backend": "^0.1.2",
31-
"@backstage/plugin-search-backend-node": "^0.1.2",
32-
"@backstage/plugin-techdocs-backend": "^0.8.1",
30+
"@backstage/plugin-search-backend": "^0.2.3",
31+
"@backstage/plugin-search-backend-node": "^0.4.0",
32+
"@backstage/plugin-techdocs-backend": "^0.9.0",
3333
"@backstage/plugin-todo-backend": "^0.1.2",
3434
"app": "^0.0.0",
3535
"dockerode": "^3.2.1",
@@ -39,7 +39,7 @@
3939
"winston": "^3.2.1"
4040
},
4141
"devDependencies": {
42-
"@backstage/cli": "^0.6.0",
42+
"@backstage/cli": "^0.7.6",
4343
"@types/dockerode": "^3.2.1",
4444
"@types/express": "^4.17.6",
4545
"@types/express-serve-static-core": "^4.17.5",

packages/backend/src/plugins/catalog.ts

+7-12
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,28 @@
1-
import { useHotCleanup } from '@backstage/backend-common';
21
import {
32
CatalogBuilder,
43
createRouter,
5-
runPeriodically,
64
} from '@backstage/plugin-catalog-backend';
75
import { Router } from 'express';
86
import { PluginEnvironment } from '../types';
97

108
export default async function createPlugin(
119
env: PluginEnvironment,
1210
): Promise<Router> {
13-
const builder = new CatalogBuilder(env);
11+
const builder = await CatalogBuilder.create(env);
12+
1413
const {
1514
entitiesCatalog,
16-
locationsCatalog,
17-
higherOrderOperation,
1815
locationAnalyzer,
19-
} = await builder.build();
16+
locationService,
17+
processingEngine,
18+
} = await builder.setRefreshIntervalSeconds(30).build();
2019

21-
useHotCleanup(
22-
module,
23-
runPeriodically(() => higherOrderOperation.refreshAllLocations(), 100000),
24-
);
20+
await processingEngine.start();
2521

2622
return await createRouter({
2723
entitiesCatalog,
28-
locationsCatalog,
29-
higherOrderOperation,
3024
locationAnalyzer,
25+
locationService,
3126
logger: env.logger,
3227
config: env.config,
3328
});

packages/backend/src/plugins/search.ts

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ export default async function createPlugin({
1515
const indexBuilder = new IndexBuilder({ logger, searchEngine });
1616

1717
indexBuilder.addCollator({
18-
type: 'software-catalog',
1918
defaultRefreshIntervalSeconds: 600,
2019
collator: new DefaultCatalogCollator({ discovery }),
2120
});

0 commit comments

Comments
 (0)