Skip to content

Commit 3d4b67a

Browse files
author
Tim Hansen
committed
Bump packages
1 parent b3bdf56 commit 3d4b67a

File tree

11 files changed

+1531
-1054
lines changed

11 files changed

+1531
-1054
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# macOS
2+
.DS_Store
3+
14
# Logs
25
logs
36
*.log

.prettierignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
dist
2+
dist-types
3+
coverage
4+
.vscode

app-config.yaml

-2
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,6 @@ costInsights:
9595
# app-config.heroku.yaml replaces these values
9696
# These configs here are required for config validation in CI to pass
9797
techdocs:
98-
requestUrl: ''
99-
storageUrl: ''
10098
builder: 'external'
10199
generators:
102100
techdocs: 'local'

package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
"lint": "lerna run lint --since origin/master --",
2020
"lint:all": "lerna run lint --",
2121
"create-plugin": "backstage-cli create-plugin --scope internal --no-private",
22-
"remove-plugin": "backstage-cli remove-plugin"
22+
"remove-plugin": "backstage-cli remove-plugin",
23+
"prettier:check": "prettier --check ."
2324
},
2425
"workspaces": {
2526
"packages": [
@@ -32,7 +33,7 @@
3233
"@spotify/prettier-config": "^7.0.0",
3334
"concurrently": "^6.0.0",
3435
"lerna": "^3.20.2",
35-
"prettier": "^1.19.1"
36+
"prettier": "^2.3.2"
3637
},
3738
"prettier": "@spotify/prettier-config",
3839
"lint-staged": {

packages/app/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"private": true,
55
"bundled": true,
66
"dependencies": {
7-
"@backstage/core-components": "^0.2.0",
7+
"@backstage/core-components": "^0.4.0",
88
"@backstage/core-app-api": "^0.1.6",
99
"@backstage/core-plugin-api": "^0.1.4",
1010
"@backstage/catalog-model": "^0.9.0",
@@ -22,7 +22,7 @@
2222
"@backstage/plugin-org": "^0.3.11",
2323
"@backstage/plugin-search": "^0.4.5",
2424
"@backstage/plugin-tech-radar": "^0.4.3",
25-
"@backstage/plugin-techdocs": "^0.10.2",
25+
"@backstage/plugin-techdocs": "^0.11.1",
2626
"@backstage/plugin-todo": "^0.1.0",
2727
"@backstage/plugin-user-settings": "^0.3.2",
2828
"@backstage/test-utils": "^0.1.9",
@@ -42,7 +42,7 @@
4242
"@testing-library/user-event": "^12.0.7",
4343
"@types/jest": "^26.0.7",
4444
"@types/node": "^12.0.0",
45-
"@types/react-dom": "^16.9.8",
45+
"@types/react-dom": "*",
4646
"cross-env": "^7.0.0",
4747
"cypress": "^4.2.0",
4848
"eslint-plugin-cypress": "^2.10.3",

packages/app/src/App.tsx

+17-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,12 @@ import { explorePlugin, ExplorePage } from '@backstage/plugin-explore';
1515
import { GraphiQLPage } from '@backstage/plugin-graphiql';
1616
import { SearchPage } from '@backstage/plugin-search';
1717
import { TechRadarPage } from '@backstage/plugin-tech-radar';
18-
import { TechdocsPage } from '@backstage/plugin-techdocs';
18+
import {
19+
DefaultTechDocsHome,
20+
TechDocsIndexPage,
21+
techdocsPlugin,
22+
TechDocsReaderPage,
23+
} from '@backstage/plugin-techdocs';
1924
import { UserSettingsPage } from '@backstage/plugin-user-settings';
2025
import { apis } from './apis';
2126
import { entityPage } from './components/catalog/EntityPage';
@@ -32,6 +37,9 @@ const app = createApp({
3237
bind(explorePlugin.externalRoutes, {
3338
catalogEntity: catalogPlugin.routes.catalogEntity,
3439
});
40+
bind(catalogPlugin.externalRoutes, {
41+
viewTechDoc: techdocsPlugin.routes.docRoot,
42+
});
3543
},
3644
});
3745

@@ -40,7 +48,7 @@ const AppRouter = app.getRouter();
4048

4149
const routes = (
4250
<FlatRoutes>
43-
<Navigate key="/" to="/catalog" replace />
51+
<Navigate key="/" to="catalog" replace />
4452
<Route path="/api-docs" element={<ApiExplorerPage />} />
4553
<Route path="/catalog" element={<CatalogIndexPage />} />
4654
<Route
@@ -58,7 +66,13 @@ const routes = (
5866
path="/cost-insights/labeling-jobs"
5967
element={<CostInsightsLabelDataflowInstructionsPage />}
6068
/>
61-
<Route path="/docs" element={<TechdocsPage />} />
69+
<Route path="/docs" element={<TechDocsIndexPage />}>
70+
+ <DefaultTechDocsHome />+{' '}
71+
</Route>
72+
<Route
73+
path="/docs/:namespace/:kind/:name/*"
74+
element={<TechDocsReaderPage />}
75+
/>
6276
<Route path="/explore" element={<ExplorePage />} />
6377
<Route path="/graphiql" element={<GraphiQLPage />} />
6478
<Route path="/search" element={<SearchPage />} />

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export const Root = ({ children }: PropsWithChildren<{}>) => (
6262
<SidebarSearch />
6363
<SidebarDivider />
6464
{/* Global nav, not org-specific */}
65-
<SidebarItem icon={HomeIcon} to="/catalog" text="Home" />
65+
<SidebarItem icon={HomeIcon} to="catalog" text="Home" />
6666
<SidebarItem icon={ExtensionIcon} to="api-docs" text="APIs" />
6767
<SidebarItem icon={LibraryBooks} to="docs" text="Docs" />
6868
<SidebarItem icon={LayersIcon} to="explore" text="Explore" />

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

+48-19
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,14 @@ import {
3535
EntityHasSystemsCard,
3636
EntityLayout,
3737
EntityLinksCard,
38+
EntityOrphanWarning,
39+
EntityProcessingErrorsPanel,
3840
EntitySwitch,
3941
EntitySystemDiagramCard,
42+
hasCatalogProcessingErrors,
4043
isComponentType,
4144
isKind,
45+
isOrphan,
4246
} from '@backstage/plugin-catalog';
4347
import {
4448
EntityGithubActionsContent,
@@ -81,6 +85,25 @@ const EntityLayoutWrapper = (props: { children?: React.ReactNode }) => {
8185
);
8286
};
8387

88+
const entityWarningContent = (
89+
<>
90+
<EntitySwitch>
91+
<EntitySwitch.Case if={isOrphan}>
92+
<Grid item xs={12}>
93+
<EntityOrphanWarning />
94+
</Grid>
95+
</EntitySwitch.Case>
96+
</EntitySwitch>
97+
<EntitySwitch>
98+
<EntitySwitch.Case if={hasCatalogProcessingErrors}>
99+
<Grid item xs={12}>
100+
<EntityProcessingErrorsPanel />
101+
</Grid>
102+
</EntitySwitch.Case>
103+
</EntitySwitch>
104+
</>
105+
);
106+
84107
export const cicdContent = (
85108
<EntitySwitch>
86109
<EntitySwitch.Case if={isGithubActionsAvailable}>
@@ -109,7 +132,7 @@ export const cicdContent = (
109132
const cicdCard = (
110133
<EntitySwitch>
111134
<EntitySwitch.Case if={isGithubActionsAvailable}>
112-
<Grid item sm={6}>
135+
<Grid item xs={12} sm={6}>
113136
<EntityRecentGithubActionsRunsCard limit={4} variant="gridItem" />
114137
</Grid>
115138
</EntitySwitch.Case>
@@ -118,17 +141,18 @@ const cicdCard = (
118141

119142
const overviewContent = (
120143
<Grid container spacing={3} alignItems="stretch">
121-
<Grid item md={6}>
144+
{entityWarningContent}
145+
<Grid item xs={12} md={6}>
122146
<EntityAboutCard variant="gridItem" />
123147
</Grid>
124148

125-
<Grid item md={4} sm={6}>
149+
<Grid item xs={12} md={4} sm={6}>
126150
<EntityLinksCard />
127151
</Grid>
128152

129153
{cicdCard}
130154

131-
<Grid item md={6}>
155+
<Grid item xs={12} md={6}>
132156
<EntityHasSubcomponentsCard variant="gridItem" />
133157
</Grid>
134158
</Grid>
@@ -146,21 +170,21 @@ const serviceEntityPage = (
146170

147171
<EntityLayout.Route path="/api" title="API">
148172
<Grid container spacing={3} alignItems="stretch">
149-
<Grid item md={6}>
173+
<Grid item xs={12} md={6}>
150174
<EntityProvidedApisCard />
151175
</Grid>
152-
<Grid item md={6}>
176+
<Grid item xs={12} md={6}>
153177
<EntityConsumedApisCard />
154178
</Grid>
155179
</Grid>
156180
</EntityLayout.Route>
157181

158182
<EntityLayout.Route path="/dependencies" title="Dependencies">
159183
<Grid container spacing={3} alignItems="stretch">
160-
<Grid item md={6}>
184+
<Grid item xs={12} md={6}>
161185
<EntityDependsOnComponentsCard variant="gridItem" />
162186
</Grid>
163-
<Grid item md={6}>
187+
<Grid item xs={12} md={6}>
164188
<EntityDependsOnResourcesCard variant="gridItem" />
165189
</Grid>
166190
</Grid>
@@ -188,10 +212,10 @@ const websiteEntityPage = (
188212

189213
<EntityLayout.Route path="/dependencies" title="Dependencies">
190214
<Grid container spacing={3} alignItems="stretch">
191-
<Grid item md={6}>
215+
<Grid item xs={12} md={6}>
192216
<EntityDependsOnComponentsCard variant="gridItem" />
193217
</Grid>
194-
<Grid item md={6}>
218+
<Grid item xs={12} md={6}>
195219
<EntityDependsOnResourcesCard variant="gridItem" />
196220
</Grid>
197221
</Grid>
@@ -241,14 +265,15 @@ const apiPage = (
241265
<EntityLayoutWrapper>
242266
<EntityLayout.Route path="/" title="Overview">
243267
<Grid container spacing={3}>
244-
<Grid item md={6}>
268+
{entityWarningContent}
269+
<Grid item xs={12} md={6}>
245270
<EntityAboutCard />
246271
</Grid>
247272
<Grid container item md={12}>
248-
<Grid item md={6}>
273+
<Grid item xs={12} md={6}>
249274
<EntityProvidingComponentsCard />
250275
</Grid>
251-
<Grid item md={6}>
276+
<Grid item xs={12} md={6}>
252277
<EntityConsumingComponentsCard />
253278
</Grid>
254279
</Grid>
@@ -269,6 +294,7 @@ const userPage = (
269294
<EntityLayoutWrapper>
270295
<EntityLayout.Route path="/" title="Overview">
271296
<Grid container spacing={3}>
297+
{entityWarningContent}
272298
<Grid item xs={12} md={6}>
273299
<EntityUserProfileCard variant="gridItem" />
274300
</Grid>
@@ -284,6 +310,7 @@ const groupPage = (
284310
<EntityLayoutWrapper>
285311
<EntityLayout.Route path="/" title="Overview">
286312
<Grid container spacing={3}>
313+
{entityWarningContent}
287314
<Grid item xs={12} md={6}>
288315
<EntityGroupProfileCard variant="gridItem" />
289316
</Grid>
@@ -302,16 +329,17 @@ const systemPage = (
302329
<EntityLayoutWrapper>
303330
<EntityLayout.Route path="/" title="Overview">
304331
<Grid container spacing={3} alignItems="stretch">
305-
<Grid item md={6}>
332+
{entityWarningContent}
333+
<Grid item xs={12} md={6}>
306334
<EntityAboutCard variant="gridItem" />
307335
</Grid>
308-
<Grid item md={6}>
336+
<Grid item xs={12} md={6}>
309337
<EntityHasComponentsCard variant="gridItem" />
310338
</Grid>
311-
<Grid item md={6}>
339+
<Grid item xs={12} md={6}>
312340
<EntityHasApisCard variant="gridItem" />
313341
</Grid>
314-
<Grid item md={6}>
342+
<Grid item xs={12} md={6}>
315343
<EntityHasResourcesCard variant="gridItem" />
316344
</Grid>
317345
</Grid>
@@ -326,10 +354,11 @@ const domainPage = (
326354
<EntityLayoutWrapper>
327355
<EntityLayout.Route path="/" title="Overview">
328356
<Grid container spacing={3} alignItems="stretch">
329-
<Grid item md={6}>
357+
{entityWarningContent}
358+
<Grid item xs={12} md={6}>
330359
<EntityAboutCard variant="gridItem" />
331360
</Grid>
332-
<Grid item md={6}>
361+
<Grid item xs={12} md={6}>
333362
<EntityHasSystemsCard variant="gridItem" />
334363
</Grid>
335364
</Grid>

packages/backend/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"migrate:create": "knex migrate:make -x ts"
1818
},
1919
"dependencies": {
20-
"@backstage/backend-common": "^0.8.0",
20+
"@backstage/backend-common": "^0.9.1",
2121
"@backstage/catalog-client": "^0.3.8",
2222
"@backstage/catalog-model": "^0.9.0",
2323
"@backstage/config": "^0.1.4",
@@ -29,7 +29,7 @@
2929
"@backstage/plugin-proxy-backend": "^0.2.6",
3030
"@backstage/plugin-search-backend": "^0.2.3",
3131
"@backstage/plugin-search-backend-node": "^0.4.0",
32-
"@backstage/plugin-techdocs-backend": "^0.9.0",
32+
"@backstage/plugin-techdocs-backend": "^0.10.1",
3333
"@backstage/plugin-todo-backend": "^0.1.2",
3434
"app": "^0.0.0",
3535
"dockerode": "^3.2.1",

packages/backend/src/plugins/catalog.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export default async function createPlugin(
1515
locationAnalyzer,
1616
locationService,
1717
processingEngine,
18-
} = await builder.setRefreshIntervalSeconds(30).build();
18+
} = await builder.build();
1919

2020
await processingEngine.start();
2121

0 commit comments

Comments
 (0)