Skip to content

Commit

Permalink
feat: update backstage
Browse files Browse the repository at this point in the history
  • Loading branch information
dweber019 committed Aug 24, 2024
1 parent 68ce37e commit f549958
Show file tree
Hide file tree
Showing 32 changed files with 1,331 additions and 1,173 deletions.
16 changes: 16 additions & 0 deletions .changeset/wicked-dogs-speak.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
'@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-relations-backend': patch
'@dweber019/backstage-plugin-simple-icons': patch
'@dweber019/backstage-plugin-accentuate': patch
'@dweber019/backstage-plugin-endoflife': patch
'@dweber019/backstage-plugin-relations': patch
'@dweber019/backstage-plugin-tips': patch
---

Update backstage to 1.30.2.
2 changes: 1 addition & 1 deletion backstage.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "1.29.2"
"version": "1.30.2"
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"@changesets/cli": "^2.18.0"
},
"devDependencies": {
"@backstage/cli": "^0.26.11",
"@backstage/cli": "^0.27.0",
"@backstage/e2e-test-utils": "^0.1.1",
"@playwright/test": "^1.32.3",
"@spotify/prettier-config": "^12.0.0",
Expand Down
44 changes: 22 additions & 22 deletions packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,28 @@
},
"bundled": true,
"dependencies": {
"@backstage/app-defaults": "^1.5.9",
"@backstage/catalog-model": "^1.5.0",
"@backstage/cli": "^0.26.11",
"@backstage/core-app-api": "^1.14.1",
"@backstage/core-components": "^0.14.9",
"@backstage/app-defaults": "^1.5.10",
"@backstage/catalog-model": "^1.6.0",
"@backstage/cli": "^0.27.0",
"@backstage/core-app-api": "^1.14.2",
"@backstage/core-components": "^0.14.10",
"@backstage/core-plugin-api": "^1.9.3",
"@backstage/integration-react": "^1.1.29",
"@backstage/plugin-api-docs": "^0.11.7",
"@backstage/plugin-catalog": "^1.21.1",
"@backstage/plugin-catalog-common": "^1.0.25",
"@backstage/plugin-catalog-graph": "^0.4.7",
"@backstage/plugin-catalog-import": "^0.12.1",
"@backstage/plugin-catalog-react": "^1.12.2",
"@backstage/plugin-org": "^0.6.27",
"@backstage/plugin-permission-react": "^0.4.24",
"@backstage/plugin-scaffolder": "^1.23.0",
"@backstage/plugin-search": "^1.4.14",
"@backstage/plugin-search-react": "^1.7.13",
"@backstage/plugin-techdocs": "^1.10.7",
"@backstage/plugin-techdocs-module-addons-contrib": "^1.1.12",
"@backstage/plugin-techdocs-react": "^1.2.6",
"@backstage/plugin-user-settings": "^0.8.10",
"@backstage/integration-react": "^1.1.30",
"@backstage/plugin-api-docs": "^0.11.8",
"@backstage/plugin-catalog": "^1.22.0",
"@backstage/plugin-catalog-common": "^1.0.26",
"@backstage/plugin-catalog-graph": "^0.4.8",
"@backstage/plugin-catalog-import": "^0.12.2",
"@backstage/plugin-catalog-react": "^1.12.3",
"@backstage/plugin-org": "^0.6.28",
"@backstage/plugin-permission-react": "^0.4.25",
"@backstage/plugin-scaffolder": "^1.24.0",
"@backstage/plugin-search": "^1.4.15",
"@backstage/plugin-search-react": "^1.7.14",
"@backstage/plugin-techdocs": "^1.10.8",
"@backstage/plugin-techdocs-module-addons-contrib": "^1.1.13",
"@backstage/plugin-techdocs-react": "^1.2.7",
"@backstage/plugin-user-settings": "^0.8.11",
"@backstage/theme": "^0.5.6",
"@dweber019/backstage-plugin-accentuate": "^0.0.7",
"@dweber019/backstage-plugin-api-docs-module-wsdl": "^0.0.12",
Expand All @@ -52,7 +52,7 @@
"react-use": "^17.2.4"
},
"devDependencies": {
"@backstage/test-utils": "^1.5.9",
"@backstage/test-utils": "^1.5.10",
"@playwright/test": "^1.32.3",
"@testing-library/dom": "^9.0.0",
"@testing-library/jest-dom": "^6.0.0",
Expand Down
50 changes: 25 additions & 25 deletions packages/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,31 +24,31 @@
"build-image": "docker build ../.. -f Dockerfile --tag backstage"
},
"dependencies": {
"@backstage/backend-common": "^0.23.3",
"@backstage/backend-defaults": "^0.4.1",
"@backstage/backend-tasks": "^0.5.27",
"@backstage/catalog-client": "^1.6.5",
"@backstage/catalog-model": "^1.5.0",
"@backstage/backend-common": "^0.24.0",
"@backstage/backend-defaults": "^0.4.3",
"@backstage/backend-tasks": "^0.6.0",
"@backstage/catalog-client": "^1.6.6",
"@backstage/catalog-model": "^1.6.0",
"@backstage/config": "^1.2.0",
"@backstage/plugin-app-backend": "^0.3.71",
"@backstage/plugin-auth-backend": "^0.22.9",
"@backstage/plugin-auth-backend-module-guest-provider": "^0.1.8",
"@backstage/plugin-auth-node": "^0.4.17",
"@backstage/plugin-catalog-backend": "^1.24.0",
"@backstage/plugin-catalog-backend-module-logs": "^0.0.1",
"@backstage/plugin-catalog-backend-module-scaffolder-entity-model": "^0.1.20",
"@backstage/plugin-permission-backend": "^0.5.46",
"@backstage/plugin-permission-backend-module-allow-all-policy": "^0.1.19",
"@backstage/plugin-permission-common": "^0.8.0",
"@backstage/plugin-permission-node": "^0.8.0",
"@backstage/plugin-proxy-backend": "^0.5.3",
"@backstage/plugin-scaffolder-backend": "^1.23.0",
"@backstage/plugin-search-backend": "^1.5.14",
"@backstage/plugin-search-backend-module-catalog": "^0.1.28",
"@backstage/plugin-search-backend-module-pg": "^0.5.32",
"@backstage/plugin-search-backend-module-techdocs": "^0.1.27",
"@backstage/plugin-search-backend-node": "^1.2.27",
"@backstage/plugin-techdocs-backend": "^1.10.9",
"@backstage/plugin-app-backend": "^0.3.72",
"@backstage/plugin-auth-backend": "^0.22.10",
"@backstage/plugin-auth-backend-module-guest-provider": "^0.1.9",
"@backstage/plugin-auth-node": "^0.5.0",
"@backstage/plugin-catalog-backend": "^1.25.0",
"@backstage/plugin-catalog-backend-module-logs": "^0.0.2",
"@backstage/plugin-catalog-backend-module-scaffolder-entity-model": "^0.1.21",
"@backstage/plugin-permission-backend": "^0.5.47",
"@backstage/plugin-permission-backend-module-allow-all-policy": "^0.1.20",
"@backstage/plugin-permission-common": "^0.8.1",
"@backstage/plugin-permission-node": "^0.8.1",
"@backstage/plugin-proxy-backend": "^0.5.4",
"@backstage/plugin-scaffolder-backend": "^1.24.0",
"@backstage/plugin-search-backend": "^1.5.15",
"@backstage/plugin-search-backend-module-catalog": "^0.2.0",
"@backstage/plugin-search-backend-module-pg": "^0.5.33",
"@backstage/plugin-search-backend-module-techdocs": "^0.2.0",
"@backstage/plugin-search-backend-node": "^1.3.0",
"@backstage/plugin-techdocs-backend": "^1.10.11",
"@dweber019/backstage-plugin-accentuate-backend": "^0.0.6",
"@dweber019/backstage-plugin-api-docs-module-wsdl-backend": "^0.0.13",
"@dweber019/backstage-plugin-endoflife-backend": "^0.0.8",
Expand All @@ -62,7 +62,7 @@
"winston": "^3.2.1"
},
"devDependencies": {
"@backstage/cli": "^0.26.11",
"@backstage/cli": "^0.27.0",
"@types/express": "^4.17.6",
"@types/express-serve-static-core": "^4.17.5",
"@types/luxon": "^2.0.4"
Expand Down
23 changes: 0 additions & 23 deletions packages/backend/src/index.test.ts

This file was deleted.

50 changes: 25 additions & 25 deletions packages/backend/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
import { Logger } from 'winston';
import { Config } from '@backstage/config';
import {
PluginCacheManager,
PluginDatabaseManager,
PluginEndpointDiscovery,
TokenManager,
UrlReader,
} from '@backstage/backend-common';
import { PluginTaskScheduler } from '@backstage/backend-tasks';
import { PermissionEvaluator } from '@backstage/plugin-permission-common';
import { IdentityApi } from '@backstage/plugin-auth-node';

export type PluginEnvironment = {
logger: Logger;
database: PluginDatabaseManager;
cache: PluginCacheManager;
config: Config;
reader: UrlReader;
discovery: PluginEndpointDiscovery;
tokenManager: TokenManager;
scheduler: PluginTaskScheduler;
permissions: PermissionEvaluator;
identity: IdentityApi;
};
// import { Logger } from 'winston';
// import { Config } from '@backstage/config';
// import {
// PluginCacheManager,
// PluginDatabaseManager,
// PluginEndpointDiscovery,
// TokenManager,
// UrlReader,
// } from '@backstage/backend-common';
// import { PluginTaskScheduler } from '@backstage/backend-tasks';
// import { PermissionEvaluator } from '@backstage/plugin-permission-common';
// import { IdentityApi } from '@backstage/plugin-auth-node';
//
// export type PluginEnvironment = {
// logger: Logger;
// database: PluginDatabaseManager;
// cache: PluginCacheManager;
// config: Config;
// reader: UrlReader;
// discovery: PluginEndpointDiscovery;
// tokenManager: TokenManager;
// scheduler: PluginTaskScheduler;
// permissions: PermissionEvaluator;
// identity: IdentityApi;
// };
13 changes: 7 additions & 6 deletions plugins/accentuate-backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,14 @@
"postpack": "backstage-cli package postpack"
},
"dependencies": {
"@backstage/backend-common": "^0.23.3",
"@backstage/backend-plugin-api": "^0.7.0",
"@backstage/catalog-model": "^1.5.0",
"@backstage/backend-common": "^0.24.0",
"@backstage/backend-defaults": "^0.4.3",
"@backstage/backend-plugin-api": "^0.8.0",
"@backstage/catalog-model": "^1.6.0",
"@backstage/config": "^1.2.0",
"@backstage/errors": "^1.2.4",
"@backstage/plugin-auth-node": "^0.4.17",
"@backstage/plugin-catalog-node": "^1.12.4",
"@backstage/plugin-auth-node": "^0.5.0",
"@backstage/plugin-catalog-node": "^1.12.5",
"@backstage/types": "^1.1.1",
"@dweber019/backstage-plugin-accentuate-common": "^0.0.6",
"@types/express": "^4.17.6",
Expand All @@ -54,7 +55,7 @@
"yn": "^4.0.0"
},
"devDependencies": {
"@backstage/cli": "^0.26.11",
"@backstage/cli": "^0.27.0",
"@types/supertest": "^2.0.8",
"supertest": "^6.1.3"
},
Expand Down
6 changes: 3 additions & 3 deletions plugins/accentuate-backend/src/api/AccentuateBackendClient.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Logger } from 'winston';
import { AccentuateBackendStore } from '../db';
import { JsonObject } from '@backstage/types';
import { RawDbRow } from '../db/AccentuateBackendDatabase';
import { DateTime } from 'luxon';
import { LoggerService } from '@backstage/backend-plugin-api';

export interface AccentuateResponse {
entityRef: string;
Expand All @@ -26,9 +26,9 @@ export interface AccentuateBackendApi {
/** @public */
export class AccentuateBackendClient implements AccentuateBackendApi {
// @ts-ignore
private readonly logger: Logger;
private readonly logger: LoggerService;
private readonly store: AccentuateBackendStore;
public constructor(logger: Logger, store: AccentuateBackendStore) {
public constructor(logger: LoggerService, store: AccentuateBackendStore) {
this.logger = logger;
this.store = store;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { resolvePackagePath } from '@backstage/backend-common';
import { resolvePackagePath } from '@backstage/backend-plugin-api';
import { Knex } from 'knex';

export type RawDbRow = {
Expand Down
9 changes: 3 additions & 6 deletions plugins/accentuate-backend/src/plugin.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
import {
DatabaseManager,
loggerToWinstonLogger,
} from '@backstage/backend-common';
import {
coreServices,
createBackendPlugin,
Expand All @@ -10,6 +6,7 @@ import {
import { createRouterFromConfig } from './service/router';
import { catalogProcessingExtensionPoint } from '@backstage/plugin-catalog-node/alpha';
import { AccentuateEntitiesProcessor } from './processor';
import { DatabaseManager } from '@backstage/backend-common';

/**
* @public
Expand All @@ -28,7 +25,7 @@ export const accentuatePlugin = createBackendPlugin({
async init({ logger, config, database, identity, httpRouter }) {
httpRouter.use(
await createRouterFromConfig({
logger: loggerToWinstonLogger(logger),
logger,
config,
database,
identity,
Expand Down Expand Up @@ -58,7 +55,7 @@ export const catalogModuleAccentuateProcessor = createBackendModule({
const databaseService = databaseManager.forPlugin('accentuate');
catalog.addProcessor(
await AccentuateEntitiesProcessor.fromEnv({
logger: loggerToWinstonLogger(logger),
logger,
config,
database: databaseService,
}),
Expand Down
11 changes: 5 additions & 6 deletions plugins/accentuate-backend/src/processor/processor.ts
Original file line number Diff line number Diff line change
@@ -1,30 +1,29 @@
import { CatalogProcessor } from '@backstage/plugin-catalog-node';
import { Entity, stringifyEntityRef } from '@backstage/catalog-model';
import { Logger } from 'winston';
import { AccentuateBackendDatabase } from '../db';
import { AccentuateBackendClient } from '../api';
import deepmerge from 'deepmerge';
import { PluginDatabaseManager } from '@backstage/backend-common';
import {
ANNOTATION_ACCENTUATE_DISABLE,
DEFAULT_ALLOWED_KINDS,
isAllowedKind,
} from '@dweber019/backstage-plugin-accentuate-common';
import { Config } from '@backstage/config';
import { DatabaseService, LoggerService } from '@backstage/backend-plugin-api';

export type PluginEnvironment = {
logger: Logger;
logger: LoggerService;
config: Config;
database: PluginDatabaseManager;
database: DatabaseService;
};

export class AccentuateEntitiesProcessor implements CatalogProcessor {
private readonly logger: Logger;
private readonly logger: LoggerService;
private readonly config: Config;
private readonly accentuateBackendClient: AccentuateBackendClient;

constructor(options: {
logger: Logger;
logger: LoggerService;
config: Config;
accentuateBackendClient: AccentuateBackendClient;
}) {
Expand Down
12 changes: 3 additions & 9 deletions plugins/accentuate-backend/src/service/router.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
import { errorHandler, PluginDatabaseManager } from '@backstage/backend-common';
import express from 'express';
import Router from 'express-promise-router';
import { Logger } from 'winston';
import { AccentuateBackendDatabase } from '../db';
import { AccentuateBackendClient, AccentuateBackendApi } from '../api';
import { Config } from '@backstage/config';
import { InputError } from '@backstage/errors';
import { IdentityApi } from '@backstage/plugin-auth-node';
import { AccentuateInput } from '@dweber019/backstage-plugin-accentuate-common';
import { DatabaseService, LoggerService } from '@backstage/backend-plugin-api';

/** @public */
export interface RouterOptions {
accentuateBackendApi?: AccentuateBackendApi;
logger: Logger;
database: PluginDatabaseManager;
logger: LoggerService;
database: DatabaseService;
identity: IdentityApi;
config?: Config;
}
Expand All @@ -35,10 +34,6 @@ export async function createRouter(
const router = Router();
router.use(express.json());

router.get('/health', (_, response) => {
response.send({ status: 'ok' });
});

router.get('/', async (req, res) => {
if (req.query.entityRef) {
const result = await accentuateBackendClient.get(
Expand Down Expand Up @@ -88,7 +83,6 @@ export async function createRouter(
}
});

router.use(errorHandler());
return router;
}

Expand Down
Loading

0 comments on commit f549958

Please sign in to comment.