Merge pull request #31166 from schultzp2020/constructor-parameters
refactor: convert constructor parameter properties for erasableSyntaxOnly compatibility
This commit is contained in:
@@ -121,7 +121,10 @@ export const generateSettingsHash = (
|
||||
export class DatabaseNotificationsStore implements NotificationsStore {
|
||||
private readonly isSQLite = false;
|
||||
|
||||
private constructor(private readonly db: Knex) {
|
||||
private readonly db: Knex;
|
||||
|
||||
private constructor(db: Knex) {
|
||||
this.db = db;
|
||||
this.isSQLite = this.db.client.config.client.includes('sqlite3');
|
||||
}
|
||||
|
||||
|
||||
@@ -47,10 +47,13 @@ const partitionEntityRefs = (refs: string[]): string[][] => {
|
||||
export class DefaultNotificationRecipientResolver
|
||||
implements NotificationRecipientResolver
|
||||
{
|
||||
constructor(
|
||||
private readonly auth: AuthService,
|
||||
private readonly catalog: CatalogService,
|
||||
) {}
|
||||
private readonly auth: AuthService;
|
||||
private readonly catalog: CatalogService;
|
||||
|
||||
constructor(auth: AuthService, catalog: CatalogService) {
|
||||
this.auth = auth;
|
||||
this.catalog = catalog;
|
||||
}
|
||||
|
||||
async resolveNotificationRecipients(options: {
|
||||
entityRefs: string[];
|
||||
|
||||
@@ -26,13 +26,19 @@ import { ForwardedError } from '@backstage/errors';
|
||||
export class NotificationCleaner {
|
||||
private readonly retention: HumanDuration = { years: 1 };
|
||||
private readonly enabled: boolean = true;
|
||||
private readonly scheduler: SchedulerService;
|
||||
private readonly logger: LoggerService;
|
||||
private readonly database: NotificationsStore;
|
||||
|
||||
constructor(
|
||||
config: Config,
|
||||
private readonly scheduler: SchedulerService,
|
||||
private readonly logger: LoggerService,
|
||||
private readonly database: NotificationsStore,
|
||||
scheduler: SchedulerService,
|
||||
logger: LoggerService,
|
||||
database: NotificationsStore,
|
||||
) {
|
||||
this.scheduler = scheduler;
|
||||
this.logger = logger;
|
||||
this.database = database;
|
||||
if (config.has('notifications.retention')) {
|
||||
const retentionConfig = config.get('notifications.retention');
|
||||
if (typeof retentionConfig === 'boolean' && !retentionConfig) {
|
||||
|
||||
Reference in New Issue
Block a user