chore(server): bump server dependencies (#3899)

* chore(server): bump server dependencies

* fix: test
This commit is contained in:
Alex
2023-08-28 14:41:57 -05:00
committed by GitHub
parent 26c43617d1
commit d0a06739d8
15 changed files with 6769 additions and 5037 deletions

View File

@@ -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();
}

View File

@@ -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,
});

View File

@@ -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,

View File

@@ -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);
}

View File

@@ -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 = {

View File

@@ -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,

View File

@@ -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) {

View File

@@ -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,

View File

@@ -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()];

View File

@@ -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),