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-storage-explorer - Removed usages and references of @backstage/backend-common #1977

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
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@backstage-community/plugin-azure-storage-explorer-backend': patch
---

Removed usages and references of `@backstage/backend-common`
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
| @backstage/plugin-permission-common | package.json | error |
| @backstage/plugin-permission-node | package.json | error |
| @backstage/plugin-auth-node | package.json | error |
| @backstage/backend-common | package.json | error |
| @backstage/catalog-client | package.json | error |
| @backstage/backend-tasks | package.json | error |
| @backstage/config | package.json | error |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
},
"dependencies": {
"@backstage-community/plugin-azure-storage-explorer-backend": "workspace:^",
"@backstage/backend-common": "^0.25.0",
"@backstage/backend-defaults": "^0.5.2",
"@backstage/backend-tasks": "^0.6.1",
"@backstage/catalog-client": "^1.7.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,18 @@
"dependencies": {
"@azure/identity": "4.4.1",
"@azure/storage-blob": "12.24.0",
"@backstage/backend-common": "^0.25.0",
"@backstage/backend-plugin-api": "^1.0.1",
"@backstage/config": "^1.2.0",
"@backstage/errors": "^1.2.4",
"@types/express": "*",
"express": "^4.17.1",
"express-promise-router": "^4.1.0",
"node-fetch": "^2.6.7",
"winston": "^3.2.1",
"yn": "^4.0.0"
},
"devDependencies": {
"@backstage/backend-defaults": "^0.5.2",
"@backstage/backend-test-utils": "1.0.2",
"@backstage/cli": "^0.28.0",
"@backstage/plugin-auth-backend": "^0.23.1",
"@backstage/plugin-auth-backend-module-guest-provider": "^0.2.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).

```ts
/// <reference types="express" />

import { BackendFeature } from '@backstage/backend-plugin-api';
import { Config } from '@backstage/config';
import { Logger } from 'winston';
import { LoggerService } from '@backstage/backend-plugin-api';
import { Router } from 'express';

// @public (undocumented)
Expand All @@ -20,7 +22,7 @@ export interface RouterOptions {
// (undocumented)
config: Config;
// (undocumented)
logger: Logger;
logger: LoggerService;
}

// (No @packageDocumentation comment for this package)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { loggerToWinstonLogger } from '@backstage/backend-common';

import {
coreServices,
createBackendPlugin,
Expand All @@ -33,7 +33,7 @@ export const azureStoragePlugin = createBackendPlugin({
async init({ config, logger, httpRouter }) {
httpRouter.use(
await createRouter({
logger: loggerToWinstonLogger(logger),
logger: logger,
config,
}),
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Logger } from 'winston';

import { AzureStorageProvider } from './AzureStorageProvider';
import { Config } from '@backstage/config';
import Router from 'express-promise-router';
import express from 'express';
import { NotFoundError } from '@backstage/errors';
import { errorHandler } from '@backstage/backend-common';
import { LoggerService } from '@backstage/backend-plugin-api';

export interface AzureStorageEnv {
logger: Logger;
logger: LoggerService;
config: Config;
}

Expand Down Expand Up @@ -59,7 +59,7 @@ export class AzureStorageBuilder {

protected buildRouter(
azureStorageProvider: AzureStorageProvider,
logger: Logger,
logger: LoggerService,
): express.Router {
const router = Router();
router.use(express.json());
Expand Down Expand Up @@ -118,8 +118,6 @@ export class AzureStorageBuilder {
},
);

router.use(errorHandler());

return router;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { getVoidLogger } from '@backstage/backend-common';

import { mockServices } from '@backstage/backend-test-utils';
import express from 'express';
import request from 'supertest';
import { ConfigReader } from '@backstage/config';
Expand All @@ -25,7 +26,7 @@ describe('createRouter', () => {

beforeAll(async () => {
const router = await createRouter({
logger: getVoidLogger(),
logger: mockServices.rootLogger(),
config: new ConfigReader({
azureStorage: {
blobContainers: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
* limitations under the License.
*/
import { Config } from '@backstage/config';
import { Logger } from 'winston';
import { AzureStorageBuilder } from './AzureStorageBuilder';
import { LoggerService } from '@backstage/backend-plugin-api';

/** @public */
export interface RouterOptions {
logger: Logger;
logger: LoggerService;
config: Config;
}

Expand Down
Loading
Loading