Skip to content

Commit

Permalink
fix(audit-log-node): optimise for the new backend and remove deprecat…
Browse files Browse the repository at this point in the history
…ions (#2283)

fix(audit-log-node): optimize for the new backend and remove deprecations

Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>
  • Loading branch information
AndrienkoAleksandr authored Oct 4, 2024
1 parent 04b222b commit 2c85015
Show file tree
Hide file tree
Showing 5 changed files with 112 additions and 88 deletions.
10 changes: 5 additions & 5 deletions plugins/audit-log-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,13 @@
"tsc": "tsc"
},
"devDependencies": {
"@backstage/backend-common": "0.23.3",
"@backstage/backend-plugin-api": "^0.7.0",
"@backstage/backend-test-utils": "0.4.4",
"@backstage/cli": "0.26.11",
"@backstage/errors": "^1.2.4",
"@backstage/types": "^1.1.1",
"@types/lodash": "4.17.5",
"express": "^4.19.2",
"jest-express": "1.12.0"
},
"files": [
Expand All @@ -52,10 +56,6 @@
"homepage": "https://red.ht/rhdh",
"bugs": "https://github.com/janus-idp/backstage-plugins/issues",
"dependencies": {
"@backstage/backend-plugin-api": "^0.7.0",
"@backstage/errors": "^1.2.4",
"@backstage/types": "^1.1.1",
"express": "^4.19.2",
"lodash": "^4.17.21"
},
"maintainers": [
Expand Down
5 changes: 2 additions & 3 deletions plugins/audit-log-node/src/DefaultAuditLogger.test.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import { getVoidLogger } from '@backstage/backend-common';
import { mockCredentials, mockServices } from '@backstage/backend-test-utils';

import { Request } from 'express';
import type { Request } from 'express';
import { Request as JestRequest } from 'jest-express/lib/request';

import { DefaultAuditLogger } from './DefaultAuditLogger';

describe('DefaultAuditLogger', () => {
const logger = getVoidLogger();
const logger = mockServices.logger.mock();
const loggerSpy: jest.SpyInstance = jest.spyOn(logger, 'info');
const loggerErrorSpy: jest.SpyInstance = jest.spyOn(logger, 'error');

Expand Down
8 changes: 4 additions & 4 deletions plugins/audit-log-node/src/DefaultAuditLogger.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import {
import type {
AuthService,
HttpAuthService,
LoggerService,
} from '@backstage/backend-plugin-api';
import { ErrorLike } from '@backstage/errors';
import { JsonObject, JsonValue } from '@backstage/types';
import type { ErrorLike } from '@backstage/errors';
import type { JsonObject, JsonValue } from '@backstage/types';

import { Request } from 'express';
import type { Request } from 'express';
import { cloneDeep } from 'lodash';

import {
Expand Down
8 changes: 4 additions & 4 deletions plugins/audit-log-node/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import {
import type {
AuthService,
HttpAuthService,
LoggerService,
} from '@backstage/backend-plugin-api';
import { ErrorLike } from '@backstage/errors';
import { JsonValue } from '@backstage/types';
import type { ErrorLike } from '@backstage/errors';
import type { JsonValue } from '@backstage/types';

import { Request } from 'express';
import type { Request } from 'express';

export type ActorDetails = {
actorId: string | null;
Expand Down
169 changes: 97 additions & 72 deletions yarn.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2c85015

Please sign in to comment.