Skip to content

Commit

Permalink
prettier fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
gallayl committed Jan 30, 2025
1 parent 2676d36 commit 1795f19
Show file tree
Hide file tree
Showing 19 changed files with 45 additions and 45 deletions.
2 changes: 1 addition & 1 deletion frontend/src/services/dashboards-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { DashboardsApiClient } from './api-clients/dashboards-api-client.js'
@Injectable({ lifetime: 'singleton' })
export class DashboardService {
@Injected(DashboardsApiClient)
private declare readonly dashboardsApiClient: DashboardsApiClient
declare private readonly dashboardsApiClient: DashboardsApiClient

private dashboardCache = new Cache({
capacity: 100,
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/services/drives-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { WebsocketNotificationsService } from './websocket-events.js'
@Injectable({ lifetime: 'singleton' })
export class DrivesService extends EventHub<{ onFilesystemChanged: FileChangeMessage }> {
@Injected(DrivesApiClient)
private declare readonly drivesApiClient: DrivesApiClient
declare private readonly drivesApiClient: DrivesApiClient

private volumesCache = new Cache({
load: async ({ findOptions }: { findOptions?: FindOptions<Drive, Array<keyof Drive>> }) => {
Expand Down Expand Up @@ -118,7 +118,7 @@ export class DrivesService extends EventHub<{ onFilesystemChanged: FileChangeMes
}

@Injected(WebsocketNotificationsService)
private declare readonly socket: WebsocketNotificationsService
declare private readonly socket: WebsocketNotificationsService

private onMessage = ((messageData: WebsocketMessage) => {
if (messageData.type === 'file-change') {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/services/ffprobe-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { DrivesApiClient } from './api-clients/drives-api-client.js'
@Injectable({ lifetime: 'singleton' })
export class FfprobeService {
@Injected(DrivesApiClient)
private declare readonly mediaApiClient: DrivesApiClient
declare private readonly mediaApiClient: DrivesApiClient

public ffprobeCache = new Cache({
capacity: 100,
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/services/install-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Cache } from '@furystack/cache'
@Injectable({ lifetime: 'singleton' })
export class InstallService {
@Injected(InstallApiClient)
private declare readonly apiClient: InstallApiClient
declare private readonly apiClient: InstallApiClient

private cache = new Cache({
load: async () => {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/services/iot-devices-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export class IotDevicesService {
declare readonly websocketNotificationsService: WebsocketNotificationsService

@Injected(IotApiClient)
private declare readonly iotApiClient: IotApiClient
declare private readonly iotApiClient: IotApiClient

private deviceCache = new Cache({
capacity: 100,
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/services/movie-files-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import type { Movie, MovieFile } from 'common'
@Injectable({ lifetime: 'singleton' })
export class MovieFilesService {
@Injected(MediaApiClient)
private declare readonly mediaApiClient: MediaApiClient
declare private readonly mediaApiClient: MediaApiClient

public movieFileCache = new Cache({
capacity: 100,
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/services/movies-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import type { Movie } from 'common'
@Injectable({ lifetime: 'singleton' })
export class MoviesService {
@Injected(MediaApiClient)
private declare readonly mediaApiClient: MediaApiClient
declare private readonly mediaApiClient: MediaApiClient

public movieCache = new Cache({
capacity: 100,
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/services/series-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import type { Series } from 'common'
@Injectable({ lifetime: 'singleton' })
export class SeriesService {
@Injected(MediaApiClient)
private declare readonly mediaApiClient: MediaApiClient
declare private readonly mediaApiClient: MediaApiClient

public seriesCache = new Cache({
capacity: 100,
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/services/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ export class SessionService implements IdentityContext {
}

@Injected(IdentityApiClient)
private declare api: IdentityApiClient
declare private api: IdentityApiClient

@Injected(NotyService)
private declare readonly notys: NotyService
declare private readonly notys: NotyService
}
2 changes: 1 addition & 1 deletion frontend/src/services/watch-progress-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import type { PiRatFile } from 'common'
@Injectable({ lifetime: 'singleton' })
export class WatchProgressService {
@Injected(MediaApiClient)
private declare readonly mediaApiClient: MediaApiClient
declare private readonly mediaApiClient: MediaApiClient

private watchProgressCache = new Cache({
capacity: 100,
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/services/websocket-events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export class WebsocketNotificationsService extends EventHub<{ onMessage: Websock
}

@Injected((i) => getLogger(i).withScope('WebsocketNotificationsService'))
private declare logger: ScopedLogger
declare private logger: ScopedLogger

constructor() {
super()
Expand Down
4 changes: 2 additions & 2 deletions service/src/ffprobe-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export type FfprobeResult = FfprobeData
@Injectable({ lifetime: 'singleton' })
export class FfprobeService {
@Injected((injector) => injector.getInstance(StoreManager).getStoreFor(Drive, 'letter'))
private declare readonly physicalPathStore: PhysicalStore<Drive, 'letter'>
declare private readonly physicalPathStore: PhysicalStore<Drive, 'letter'>

private readonly piRatFileCache = new Cache({
capacity: 100,
Expand Down Expand Up @@ -42,7 +42,7 @@ export class FfprobeService {
})

@Injected(FileWatcherService)
private declare fileWatcherService: FileWatcherService
declare private fileWatcherService: FileWatcherService

public getFfprobeForPiratFile = async (file: PiRatFile) => {
return await this.piRatFileCache.get(file)
Expand Down
6 changes: 3 additions & 3 deletions service/src/install/service-installer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ export class ServiceStatusProvider {
}

@Injected(StoreManager)
public declare storeManager: StoreManager
declare public storeManager: StoreManager

@Injected(PasswordAuthenticator)
public declare authenticator: PasswordAuthenticator
declare public authenticator: PasswordAuthenticator

@Injected(LoggerCollection)
public declare logger: LoggerCollection
declare public logger: LoggerCollection
}
8 changes: 4 additions & 4 deletions service/src/iot/device-availability-hub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ export class DeviceAvailabilityHub extends EventHub<{ connected: Device; disconn
private deviceStatusMap = new Map<string, boolean>()

@Injected((injector) => getLogger(injector).withScope('DeviceAvailabilityHub'))
private declare logger: ScopedLogger
declare private logger: ScopedLogger

@Injected((injector) => injector.getInstance(StoreManager).getStoreFor(Config, 'id'))
private declare configStore: PhysicalStore<Config, 'id', WithOptionalId<Config, 'id'>>
declare private configStore: PhysicalStore<Config, 'id', WithOptionalId<Config, 'id'>>

private getCurrentConfig = async () => {
try {
Expand Down Expand Up @@ -86,10 +86,10 @@ export class DeviceAvailabilityHub extends EventHub<{ connected: Device; disconn
}

@Injected((injector) => injector.getInstance(StoreManager).getStoreFor(Device, 'name'))
private declare deviceStore: PhysicalStore<Device, 'name', WithOptionalId<Device, 'name'>>
declare private deviceStore: PhysicalStore<Device, 'name', WithOptionalId<Device, 'name'>>

@Injected((injector) => injector.getInstance(StoreManager).getStoreFor(DevicePingHistory, 'id'))
private declare devicePingHistoryStore: PhysicalStore<
declare private devicePingHistoryStore: PhysicalStore<
DevicePingHistory,
'id',
WithOptionalId<DevicePingHistory, 'id'>
Expand Down
28 changes: 14 additions & 14 deletions service/src/iot/setup-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,26 @@ import { withRole } from '../authorization/with-role.js'
import { getDefaultDbSettings } from '../get-default-db-options.js'

class DeviceModel extends Model<Device, Device> implements Device {
public declare name: string
public declare ipAddress: string | undefined
public declare macAddress: string | undefined
public declare createdAt: string
public declare updatedAt: string
declare public name: string
declare public ipAddress: string | undefined
declare public macAddress: string | undefined
declare public createdAt: string
declare public updatedAt: string
}

class DeviceAwakeHistoryModel extends Model<DeviceAwakeHistory, DeviceAwakeHistory> implements DeviceAwakeHistory {
public declare id: string
public declare name: string
public declare createdAt: string
public declare success: boolean
declare public id: string
declare public name: string
declare public createdAt: string
declare public success: boolean
}

class DevicePingHistoryModel extends Model<DevicePingHistory, DevicePingHistory> implements DevicePingHistory {
public declare id: string
public declare name: string
public declare createdAt: string
public declare isAvailable: boolean
public declare ping: number
declare public id: string
declare public name: string
declare public createdAt: string
declare public isAvailable: boolean
declare public ping: number
}

export const setupIotStore = async (injector: Injector, logger: ScopedLogger) => {
Expand Down
12 changes: 6 additions & 6 deletions service/src/media/actions/movie-file-maintainer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import { linkMovie } from './link-movie-action.js'
@Injectable({ lifetime: 'singleton' })
export class MovieMaintainerService {
@Injected((i) => getLogger(i).withScope('MovieFileMaintainer'))
private declare logger: ScopedLogger
private declare injector: Injector
declare private logger: ScopedLogger
declare private injector: Injector
private onUnlink = async (file: PiRatFile) => {
try {
const store = this.injector.getInstance(StoreManager).getStoreFor(MovieFile, 'id')
Expand Down Expand Up @@ -83,13 +83,13 @@ export class MovieMaintainerService {
}

@Injected(FileWatcherService)
private declare fileWatcherService: FileWatcherService
declare private fileWatcherService: FileWatcherService

private declare addSubsciption: Disposable
declare private addSubsciption: Disposable

private declare unlinkDirSubscription: Disposable
declare private unlinkDirSubscription: Disposable

private declare unlinkSubscription: Disposable
declare private unlinkSubscription: Disposable

public init(injector: Injector) {
const fileWatcherService = injector.getInstance(FileWatcherService)
Expand Down
2 changes: 1 addition & 1 deletion service/src/media/metadata-services/omdb-client-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export class OmdbClientService {
public config?: OmdbConfig

@Injected((injector) => getLogger(injector).withScope('OMDB Client Service'))
private declare logger: ScopedLogger
declare private logger: ScopedLogger

public async init(injector: Injector) {
await this.logger.verbose({ message: '🎬 Initializing OMDB Service' })
Expand Down
2 changes: 1 addition & 1 deletion service/src/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { EventHub } from '@furystack/utils'
@Injectable({ lifetime: 'singleton' })
export class PiRatRootService extends EventHub<{ initialized: undefined }> {
@Injected((injector) => getLogger(injector).withScope('service'))
private declare logger: ScopedLogger
declare private logger: ScopedLogger

public async init(injector: Injector) {
await this.logger.information({ message: '🐀 Starting PI-RAT service...' })
Expand Down
2 changes: 1 addition & 1 deletion service/src/websocket-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export class WebsocketService {
})
return injector.getInstance(WebSocketApi)
})
private declare webSocketApi: WebSocketApi
declare private webSocketApi: WebSocketApi

public announce = async (
message: WebsocketMessage,
Expand Down

0 comments on commit 1795f19

Please sign in to comment.