mirror of
https://github.com/immich-app/immich.git
synced 2025-12-20 17:25:35 +03:00
chore(server): bump server dependencies (#3899)
* chore(server): bump server dependencies * fix: test
This commit is contained in:
@@ -6,7 +6,10 @@ import { Command, CommandRunner, InquirerService, Question, QuestionSet } from '
|
||||
description: 'Reset the admin password',
|
||||
})
|
||||
export class ResetAdminPasswordCommand extends CommandRunner {
|
||||
constructor(private userService: UserService, private readonly inquirer: InquirerService) {
|
||||
constructor(
|
||||
private userService: UserService,
|
||||
private readonly inquirer: InquirerService,
|
||||
) {
|
||||
super();
|
||||
}
|
||||
|
||||
|
||||
@@ -99,8 +99,8 @@ export class AlbumService {
|
||||
ownerId: authUser.id,
|
||||
albumName: dto.albumName,
|
||||
description: dto.description,
|
||||
sharedUsers: dto.sharedWithUserIds?.map((value) => ({ id: value } as UserEntity)) ?? [],
|
||||
assets: (dto.assetIds || []).map((id) => ({ id } as AssetEntity)),
|
||||
sharedUsers: dto.sharedWithUserIds?.map((value) => ({ id: value }) as UserEntity) ?? [],
|
||||
assets: (dto.assetIds || []).map((id) => ({ id }) as AssetEntity),
|
||||
albumThumbnailAssetId: dto.assetIds?.[0] || null,
|
||||
});
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ const sidecar: Record<string, string[]> = {
|
||||
const isType = (filename: string, r: Record<string, string[]>) => extname(filename).toLowerCase() in r;
|
||||
|
||||
const lookup = (filename: string) =>
|
||||
({ ...image, ...video, ...sidecar }[extname(filename).toLowerCase()]?.[0] ?? 'application/octet-stream');
|
||||
({ ...image, ...video, ...sidecar })[extname(filename).toLowerCase()]?.[0] ?? 'application/octet-stream';
|
||||
|
||||
export const mimeTypes = {
|
||||
image,
|
||||
|
||||
@@ -176,7 +176,10 @@ class BaseConfig implements VideoCodecSWConfig {
|
||||
export class BaseHWConfig extends BaseConfig implements VideoCodecHWConfig {
|
||||
protected devices: string[];
|
||||
|
||||
constructor(protected config: SystemConfigFFmpegDto, devices: string[] = []) {
|
||||
constructor(
|
||||
protected config: SystemConfigFFmpegDto,
|
||||
devices: string[] = [],
|
||||
) {
|
||||
super(config);
|
||||
this.devices = this.validateDevices(devices);
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ interface SyncQueue {
|
||||
export class SearchService {
|
||||
private logger = new Logger(SearchService.name);
|
||||
private enabled = false;
|
||||
private timer: NodeJS.Timer | null = null;
|
||||
private timer: NodeJS.Timeout | null = null;
|
||||
private configCore: SystemConfigCore;
|
||||
|
||||
private albumQueue: SyncQueue = {
|
||||
|
||||
@@ -65,7 +65,7 @@ export class SharedLinkService {
|
||||
userId: authUser.id,
|
||||
type: dto.type,
|
||||
albumId: dto.albumId || null,
|
||||
assets: (dto.assetIds || []).map((id) => ({ id } as AssetEntity)),
|
||||
assets: (dto.assetIds || []).map((id) => ({ id }) as AssetEntity),
|
||||
description: dto.description || null,
|
||||
expiresAt: dto.expiresAt || null,
|
||||
allowUpload: dto.allowUpload ?? true,
|
||||
|
||||
@@ -16,7 +16,10 @@ import { IUserRepository, UserListFilter } from './user.repository';
|
||||
const SALT_ROUNDS = 10;
|
||||
|
||||
export class UserCore {
|
||||
constructor(private userRepository: IUserRepository, private cryptoRepository: ICryptoRepository) {}
|
||||
constructor(
|
||||
private userRepository: IUserRepository,
|
||||
private cryptoRepository: ICryptoRepository,
|
||||
) {}
|
||||
|
||||
async updateUser(authUser: AuthUserDto, id: string, dto: Partial<UserEntity>): Promise<UserEntity> {
|
||||
if (!authUser.isAdmin && authUser.id !== id) {
|
||||
|
||||
@@ -5,7 +5,10 @@ import { IAssetRepository } from './asset-repository';
|
||||
import { CreateAssetDto, ImportAssetDto } from './dto/create-asset.dto';
|
||||
|
||||
export class AssetCore {
|
||||
constructor(private repository: IAssetRepository, private jobRepository: IJobRepository) {}
|
||||
constructor(
|
||||
private repository: IAssetRepository,
|
||||
private jobRepository: IJobRepository,
|
||||
) {}
|
||||
|
||||
async create(
|
||||
authUser: AuthUserDto,
|
||||
|
||||
@@ -80,7 +80,10 @@ export interface AuthRequest extends Request {
|
||||
export class AppGuard implements CanActivate {
|
||||
private logger = new Logger(AppGuard.name);
|
||||
|
||||
constructor(private reflector: Reflector, private authService: AuthService) {}
|
||||
constructor(
|
||||
private reflector: Reflector,
|
||||
private authService: AuthService,
|
||||
) {}
|
||||
|
||||
async canActivate(context: ExecutionContext): Promise<boolean> {
|
||||
const targets = [context.getHandler(), context.getClass()];
|
||||
|
||||
@@ -60,7 +60,10 @@ export class FileUploadInterceptor implements NestInterceptor {
|
||||
};
|
||||
private defaultStorage: StorageEngine;
|
||||
|
||||
constructor(private reflect: Reflector, private assetService: AssetService) {
|
||||
constructor(
|
||||
private reflect: Reflector,
|
||||
private assetService: AssetService,
|
||||
) {
|
||||
this.defaultStorage = diskStorage({
|
||||
filename: this.filename.bind(this),
|
||||
destination: this.destination.bind(this),
|
||||
|
||||
Reference in New Issue
Block a user