Skip to content

Commit

Permalink
chore: release of accentuate plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
dweber019 committed Mar 24, 2024
1 parent 502a9b0 commit 8ec9410
Show file tree
Hide file tree
Showing 89 changed files with 7,180 additions and 4,969 deletions.
7 changes: 7 additions & 0 deletions .changeset/large-moles-deliver.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@dweber019/backstage-plugin-accentuate-backend': patch
'@dweber019/backstage-plugin-accentuate-common': patch
'@dweber019/backstage-plugin-accentuate': patch
---

Initial release of accentuate plugins.
13 changes: 13 additions & 0 deletions .changeset/soft-deers-float.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
'@dweber019/backstage-plugin-api-docs-module-wsdl-backend': patch
'@dweber019/backstage-plugin-api-docs-spectral-linter': patch
'@dweber019/backstage-plugin-api-docs-module-wsdl': patch
'@dweber019/backstage-plugin-accentuate-backend': patch
'@dweber019/backstage-plugin-accentuate-common': patch
'@dweber019/backstage-plugin-endoflife-backend': patch
'@dweber019/backstage-plugin-accentuate': patch
'@dweber019/backstage-plugin-endoflife': patch
'@dweber019/backstage-plugin-tips': patch
---

Update to backstage 1.24.2.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- [API docs Spectral linter](plugins/api-docs-spectral-linter)
- [End of life](plugins/endoflife)
- [Tips](plugins/tips)
- [Accentuate](plugins/accentuate)

## Update backstage deps

Expand Down
7 changes: 6 additions & 1 deletion app-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ scaffolder:

catalog:
rules:
- allow: [Component, System, API, Resource, Location]
- allow: [Component, System, API, Resource, Location, User, Group]
locations:
# Local example data, file locations are relative to the backend process, typically `packages/backend`
- type: file
Expand All @@ -85,7 +85,12 @@ catalog:
- type: file
target: ../../plugins/api-docs-spectral-linter/dev/openapi-zalando-example-api.yaml

- type: file
target: ../../plugins/accentuate-backend/examples/all.yaml

spectralLinter:
openApiRulesetUrl: https://gist.githubusercontent.com/dweber019/a368819668a76363849db6378792e907/raw/backstage-spectral-linter-openapi-ruleset.yaml
asyncApiRulesetUrl: https://gist.githubusercontent.com/dweber019/a368819668a76363849db6378792e907/raw/backstage-spectral-linter-asyncapi-ruleset.yaml

accentuate:
allowedKinds: ['User', 'Group', 'Component', 'Resource', 'System', 'Domain']
2 changes: 1 addition & 1 deletion backstage.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "1.22.2"
"version": "1.24.2"
}
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,16 @@
"@changesets/cli": "^2.18.0"
},
"devDependencies": {
"@backstage/cli": "^0.25.1",
"@backstage/e2e-test-utils": "^0.1.0",
"@backstage/cli": "^0.26.1",
"@backstage/e2e-test-utils": "^0.1.1",
"@playwright/test": "^1.32.3",
"@spotify/prettier-config": "^12.0.0",
"concurrently": "^8.0.0",
"lerna": "^7.3.0",
"lint-staged": "^13.0.3",
"node-gyp": "^9.0.0",
"prettier": "^2.3.2",
"typescript": "~5.2.0"
"typescript": "5.0.4"
},
"resolutions": {
"@types/react": "^18",
Expand Down
51 changes: 26 additions & 25 deletions packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,31 @@
},
"bundled": true,
"dependencies": {
"@backstage/app-defaults": "^1.4.7",
"@backstage/catalog-model": "^1.4.3",
"@backstage/cli": "^0.25.1",
"@backstage/core-app-api": "^1.11.3",
"@backstage/core-components": "^0.13.10",
"@backstage/core-plugin-api": "^1.8.2",
"@backstage/integration-react": "^1.1.23",
"@backstage/plugin-api-docs": "^0.10.3",
"@backstage/plugin-catalog": "^1.16.1",
"@backstage/plugin-catalog-common": "^1.0.20",
"@backstage/plugin-catalog-graph": "^0.3.3",
"@backstage/plugin-catalog-import": "^0.10.5",
"@backstage/plugin-catalog-react": "^1.9.3",
"@backstage/plugin-org": "^0.6.19",
"@backstage/plugin-permission-react": "^0.4.19",
"@backstage/plugin-scaffolder": "^1.17.1",
"@backstage/plugin-search": "^1.4.5",
"@backstage/plugin-search-react": "^1.7.5",
"@backstage/plugin-tech-radar": "^0.6.12",
"@backstage/plugin-techdocs": "^1.9.3",
"@backstage/plugin-techdocs-module-addons-contrib": "^1.1.4",
"@backstage/plugin-techdocs-react": "^1.1.15",
"@backstage/plugin-user-settings": "^0.8.0",
"@backstage/theme": "^0.5.0",
"@backstage/app-defaults": "^1.5.2",
"@backstage/catalog-model": "^1.4.5",
"@backstage/cli": "^0.26.1",
"@backstage/core-app-api": "^1.12.2",
"@backstage/core-components": "^0.14.2",
"@backstage/core-plugin-api": "^1.9.1",
"@backstage/integration-react": "^1.1.25",
"@backstage/plugin-api-docs": "^0.11.2",
"@backstage/plugin-catalog": "^1.18.1",
"@backstage/plugin-catalog-common": "^1.0.22",
"@backstage/plugin-catalog-graph": "^0.4.2",
"@backstage/plugin-catalog-import": "^0.10.8",
"@backstage/plugin-catalog-react": "^1.11.1",
"@backstage/plugin-org": "^0.6.22",
"@backstage/plugin-permission-react": "^0.4.21",
"@backstage/plugin-scaffolder": "^1.19.1",
"@backstage/plugin-search": "^1.4.8",
"@backstage/plugin-search-react": "^1.7.8",
"@backstage/plugin-tech-radar": "^0.7.1",
"@backstage/plugin-techdocs": "^1.10.2",
"@backstage/plugin-techdocs-module-addons-contrib": "^1.1.7",
"@backstage/plugin-techdocs-react": "^1.2.1",
"@backstage/plugin-user-settings": "^0.8.3",
"@backstage/theme": "^0.5.2",
"@dweber019/backstage-plugin-accentuate": "^0.0.0",
"@dweber019/backstage-plugin-api-docs-module-wsdl": "^0.0.5",
"@dweber019/backstage-plugin-api-docs-spectral-linter": "^0.2.11",
"@dweber019/backstage-plugin-endoflife": "^0.0.3",
Expand All @@ -45,7 +46,7 @@
"react-use": "^17.2.4"
},
"devDependencies": {
"@backstage/test-utils": "^1.4.7",
"@backstage/test-utils": "^1.5.2",
"@playwright/test": "^1.32.3",
"@testing-library/dom": "^9.0.0",
"@testing-library/jest-dom": "^6.0.0",
Expand Down
2 changes: 2 additions & 0 deletions packages/app/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ import { AppRouter, FlatRoutes } from '@backstage/core-app-api';
import { CatalogGraphPage } from '@backstage/plugin-catalog-graph';
import { RequirePermission } from '@backstage/plugin-permission-react';
import { catalogEntityCreatePermission } from '@backstage/plugin-catalog-common/alpha';
import { AccentuatePage } from '@dweber019/backstage-plugin-accentuate';

const app = createApp({
apis,
Expand Down Expand Up @@ -103,6 +104,7 @@ const routes = (
</Route>
<Route path="/settings" element={<UserSettingsPage />} />
<Route path="/catalog-graph" element={<CatalogGraphPage />} />
<Route path="/accentuate" element={<AccentuatePage />} />
</FlatRoutes>
);

Expand Down
2 changes: 2 additions & 0 deletions packages/app/src/components/Root/Root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { makeStyles } from '@material-ui/core';
import HomeIcon from '@material-ui/icons/Home';
import ExtensionIcon from '@material-ui/icons/Extension';
import MapIcon from '@material-ui/icons/MyLocation';
import BrushIcon from '@material-ui/icons/Brush';
import LibraryBooks from '@material-ui/icons/LibraryBooks';
import CreateComponentIcon from '@material-ui/icons/AddCircleOutline';
import LogoFull from './LogoFull';
Expand Down Expand Up @@ -73,6 +74,7 @@ export const Root = ({ children }: PropsWithChildren<{}>) => (
<SidebarDivider />
<SidebarScrollWrapper>
<SidebarItem icon={MapIcon} to="tech-radar" text="Tech Radar" />
<SidebarItem icon={BrushIcon} to="accentuate" text="Accentuate" />
</SidebarScrollWrapper>
</SidebarGroup>
<SidebarSpace />
Expand Down
21 changes: 17 additions & 4 deletions packages/app/src/components/catalog/EntityPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ import {
isEndOfLifeAvailable,
} from '@dweber019/backstage-plugin-endoflife';
import { EntityTipsDialog } from '@dweber019/backstage-plugin-tips';
import {
EntityAccentuateInfo,
isAccentuateEnabled,
EntityLayoutWrapper,
} from '@dweber019/backstage-plugin-accentuate';

const techdocsContent = <EntityTechdocsContent />;

Expand Down Expand Up @@ -111,6 +116,14 @@ const entityWarningContent = (
</EntitySwitch.Case>
</EntitySwitch>

<EntitySwitch>
<EntitySwitch.Case if={isAccentuateEnabled}>
<Grid item xs={12}>
<EntityAccentuateInfo />
</Grid>
</EntitySwitch.Case>
</EntitySwitch>

<EntityTipsDialog />
</>
);
Expand All @@ -135,7 +148,7 @@ const overviewContent = (
);

const serviceEntityPage = (
<EntityLayout>
<EntityLayoutWrapper>
<EntityLayout.Route path="/" title="Overview">
{overviewContent}
</EntityLayout.Route>
Expand Down Expand Up @@ -177,7 +190,7 @@ const serviceEntityPage = (
>
<EntityEndOfLifeCard />
</EntityLayout.Route>
</EntityLayout>
</EntityLayoutWrapper>
);

const websiteEntityPage = (
Expand Down Expand Up @@ -249,7 +262,7 @@ const componentPage = (
);

const apiPage = (
<EntityLayout>
<EntityLayoutWrapper>
<EntityLayout.Route path="/" title="Overview">
<Grid container spacing={3}>
{entityWarningContent}
Expand Down Expand Up @@ -288,7 +301,7 @@ const apiPage = (
>
<EntityApiDocsSpectralLinterContent />
</EntityLayout.Route>
</EntityLayout>
</EntityLayoutWrapper>
);

const userPage = (
Expand Down
43 changes: 22 additions & 21 deletions packages/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,27 @@
"build-image": "docker build ../.. -f Dockerfile --tag backstage"
},
"dependencies": {
"@backstage/backend-common": "^0.20.1",
"@backstage/backend-tasks": "^0.5.14",
"@backstage/catalog-client": "^1.5.2",
"@backstage/catalog-model": "^1.4.3",
"@backstage/config": "^1.1.1",
"@backstage/plugin-app-backend": "^0.3.57",
"@backstage/plugin-auth-backend": "^0.20.3",
"@backstage/plugin-auth-node": "^0.4.3",
"@backstage/plugin-catalog-backend": "^1.16.2",
"@backstage/plugin-catalog-backend-module-scaffolder-entity-model": "^0.1.6",
"@backstage/plugin-permission-common": "^0.7.12",
"@backstage/plugin-permission-node": "^0.7.20",
"@backstage/plugin-proxy-backend": "^0.4.7",
"@backstage/plugin-scaffolder-backend": "^1.20.0",
"@backstage/plugin-search-backend": "^1.4.9",
"@backstage/plugin-search-backend-module-catalog": "^0.1.13",
"@backstage/plugin-search-backend-module-pg": "^0.5.18",
"@backstage/plugin-search-backend-module-techdocs": "^0.1.13",
"@backstage/plugin-search-backend-node": "^1.2.13",
"@backstage/plugin-techdocs-backend": "^1.9.2",
"@backstage/backend-common": "^0.21.5",
"@backstage/backend-tasks": "^0.5.20",
"@backstage/catalog-client": "^1.6.2",
"@backstage/catalog-model": "^1.4.5",
"@backstage/config": "^1.2.0",
"@backstage/plugin-app-backend": "^0.3.63",
"@backstage/plugin-auth-backend": "^0.22.2",
"@backstage/plugin-auth-node": "^0.4.10",
"@backstage/plugin-catalog-backend": "^1.20.0",
"@backstage/plugin-catalog-backend-module-scaffolder-entity-model": "^0.1.13",
"@backstage/plugin-permission-common": "^0.7.13",
"@backstage/plugin-permission-node": "^0.7.26",
"@backstage/plugin-proxy-backend": "^0.4.13",
"@backstage/plugin-scaffolder-backend": "^1.22.2",
"@backstage/plugin-search-backend": "^1.5.5",
"@backstage/plugin-search-backend-module-catalog": "^0.1.20",
"@backstage/plugin-search-backend-module-pg": "^0.5.24",
"@backstage/plugin-search-backend-module-techdocs": "^0.1.20",
"@backstage/plugin-search-backend-node": "^1.2.19",
"@backstage/plugin-techdocs-backend": "^1.10.2",
"@dweber019/backstage-plugin-accentuate-backend": "^0.0.0",
"@dweber019/backstage-plugin-api-docs-module-wsdl-backend": "^0.0.7",
"@dweber019/backstage-plugin-endoflife-backend": "^0.0.2",
"app": "link:../app",
Expand All @@ -51,7 +52,7 @@
"winston": "^3.2.1"
},
"devDependencies": {
"@backstage/cli": "^0.25.1",
"@backstage/cli": "^0.26.1",
"@types/dockerode": "^3.3.0",
"@types/express": "^4.17.6",
"@types/express-serve-static-core": "^4.17.5",
Expand Down
5 changes: 4 additions & 1 deletion packages/backend/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import { ServerPermissionClient } from '@backstage/plugin-permission-node';
import { DefaultIdentityClient } from '@backstage/plugin-auth-node';
import apiDocsModuleWsdlDoc from './plugins/apiDocsModuleWsdl';
import endOfLife from './plugins/endoflife';
import accentuate from './plugins/accentuate';

function makeCreateEnv(config: Config) {
const root = getRootLogger();
Expand Down Expand Up @@ -91,9 +92,10 @@ async function main() {
createEnv('apiDocsModuleWsdl'),
);
const endOfLifeEnv = useHotMemoize(module, () => createEnv('endoflife'));
const accentuateEnv = useHotMemoize(module, () => createEnv('accentuate'));

const apiRouter = Router();
apiRouter.use('/catalog', await catalog(catalogEnv));
apiRouter.use('/catalog', await catalog(catalogEnv, accentuateEnv));
apiRouter.use('/scaffolder', await scaffolder(scaffolderEnv));
apiRouter.use('/auth', await auth(authEnv));
apiRouter.use('/techdocs', await techdocs(techdocsEnv));
Expand All @@ -104,6 +106,7 @@ async function main() {
await apiDocsModuleWsdlDoc(apiDocsModuleWsdlDocEnv),
);
apiRouter.use('/endoflife', await endOfLife(endOfLifeEnv));
apiRouter.use('/accentuate', await accentuate(accentuateEnv));

// Add backends ABOVE this line; this 404 handler is the catch-all fallback
apiRouter.use(notFoundHandler());
Expand Down
13 changes: 13 additions & 0 deletions packages/backend/src/plugins/accentuate.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { createRouter } from '@dweber019/backstage-plugin-accentuate-backend';
import { Router } from 'express';
import { PluginEnvironment } from '../types';

export default async function createPlugin(
env: PluginEnvironment,
): Promise<Router> {
return await createRouter({
logger: env.logger,
database: env.database,
identity: env.identity,
});
}
5 changes: 5 additions & 0 deletions packages/backend/src/plugins/catalog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,17 @@ import { CatalogBuilder } from '@backstage/plugin-catalog-backend';
import { ScaffolderEntitiesProcessor } from '@backstage/plugin-catalog-backend-module-scaffolder-entity-model';
import { Router } from 'express';
import { PluginEnvironment } from '../types';
import { AccentuateEntitiesProcessor } from '@dweber019/backstage-plugin-accentuate-backend';

export default async function createPlugin(
env: PluginEnvironment,
envAccentuate: PluginEnvironment,
): Promise<Router> {
const builder = await CatalogBuilder.create(env);
builder.addProcessor(new ScaffolderEntitiesProcessor());
builder.addProcessor(
await AccentuateEntitiesProcessor.fromEnv(envAccentuate),
);
const { processingEngine, router } = await builder.build();
await processingEngine.start();
return router;
Expand Down
1 change: 1 addition & 0 deletions plugins/accentuate-backend/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('@backstage/cli/config/eslint-factory')(__dirname);
Loading

0 comments on commit 8ec9410

Please sign in to comment.