Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

azure-sites - Removed usages and references of @backstage/backend-common #1978

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions workspaces/azure-sites/.changeset/rude-papayas-pay.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@backstage-community/plugin-azure-sites-backend': patch
---

Removed usages and references of `@backstage/backend-common`
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
"@azure/arm-resourcegraph": "^4.2.1",
"@azure/identity": "^4.0.0",
"@backstage-community/plugin-azure-sites-common": "workspace:^",
"@backstage/backend-common": "^0.25.0",
"@backstage/backend-plugin-api": "^1.0.1",
"@backstage/catalog-client": "^1.7.1",
"@backstage/config": "^1.2.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,15 @@ export function createRouter(options: RouterOptions): Promise<express.Router>;
// @public (undocumented)
export interface RouterOptions {
// (undocumented)
auth?: AuthService;
auth: AuthService;
// (undocumented)
azureSitesApi: AzureSitesApi;
// (undocumented)
catalogApi: CatalogApi;
// (undocumented)
discovery: DiscoveryService;
// (undocumented)
httpAuth?: HttpAuthService;
httpAuth: HttpAuthService;
// (undocumented)
logger: LoggerService;
// (undocumented)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@
* limitations under the License.
*/

import {
createLegacyAuthAdapters,
errorHandler,
} from '@backstage/backend-common';
import express from 'express';
import Router from 'express-promise-router';

Expand Down Expand Up @@ -47,16 +43,16 @@ export interface RouterOptions {
catalogApi: CatalogApi;
permissions: PermissionsService;
discovery: DiscoveryService;
auth?: AuthService;
httpAuth?: HttpAuthService;
auth: AuthService;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mmm how could adopter instantiate this plugin using the legacy backend system? 🤔

httpAuth: HttpAuthService;
}

/** @public */
export async function createRouter(
options: RouterOptions,
): Promise<express.Router> {
const { logger, azureSitesApi, permissions, catalogApi } = options;
const { auth, httpAuth } = createLegacyAuthAdapters(options);
const { logger, azureSitesApi, permissions, catalogApi, auth, httpAuth } =
options;

const permissionIntegrationRouter = createPermissionIntegrationRouter({
permissions: azureSitesPermissions,
Expand Down Expand Up @@ -194,6 +190,6 @@ export async function createRouter(
}
},
);
router.use(errorHandler());

return router;
}
1 change: 0 additions & 1 deletion workspaces/azure-sites/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2611,7 +2611,6 @@ __metadata:
"@azure/arm-resourcegraph": ^4.2.1
"@azure/identity": ^4.0.0
"@backstage-community/plugin-azure-sites-common": "workspace:^"
"@backstage/backend-common": ^0.25.0
"@backstage/backend-defaults": ^0.5.2
"@backstage/backend-plugin-api": ^1.0.1
"@backstage/catalog-client": ^1.7.1
Expand Down
Loading