mirror of
https://github.com/immich-app/immich.git
synced 2024-12-29 15:11:58 +00:00
parent
40e079a247
commit
4b29bccc7c
36 changed files with 47 additions and 47 deletions
|
@ -1,4 +1,5 @@
|
||||||
import { dirname, join, resolve } from 'node:path';
|
import { dirname, join, resolve } from 'node:path';
|
||||||
|
import { SystemConfigCore } from 'src/cores/system-config.core';
|
||||||
import { APP_MEDIA_LOCATION } from 'src/domain/domain.constant';
|
import { APP_MEDIA_LOCATION } from 'src/domain/domain.constant';
|
||||||
import { IAssetRepository } from 'src/domain/repositories/asset.repository';
|
import { IAssetRepository } from 'src/domain/repositories/asset.repository';
|
||||||
import { ICryptoRepository } from 'src/domain/repositories/crypto.repository';
|
import { ICryptoRepository } from 'src/domain/repositories/crypto.repository';
|
||||||
|
@ -6,7 +7,6 @@ import { IMoveRepository } from 'src/domain/repositories/move.repository';
|
||||||
import { IPersonRepository } from 'src/domain/repositories/person.repository';
|
import { IPersonRepository } from 'src/domain/repositories/person.repository';
|
||||||
import { IStorageRepository } from 'src/domain/repositories/storage.repository';
|
import { IStorageRepository } from 'src/domain/repositories/storage.repository';
|
||||||
import { ISystemConfigRepository } from 'src/domain/repositories/system-config.repository';
|
import { ISystemConfigRepository } from 'src/domain/repositories/system-config.repository';
|
||||||
import { SystemConfigCore } from 'src/domain/system-config/system-config.core';
|
|
||||||
import { AssetEntity } from 'src/infra/entities/asset.entity';
|
import { AssetEntity } from 'src/infra/entities/asset.entity';
|
||||||
import { AssetPathType, PathType, PersonPathType } from 'src/infra/entities/move.entity';
|
import { AssetPathType, PathType, PersonPathType } from 'src/infra/entities/move.entity';
|
||||||
import { PersonEntity } from 'src/infra/entities/person.entity';
|
import { PersonEntity } from 'src/infra/entities/person.entity';
|
|
@ -1,5 +1,5 @@
|
||||||
import { Inject, Injectable } from '@nestjs/common';
|
import { Inject, Injectable } from '@nestjs/common';
|
||||||
import { AccessCore, Permission } from 'src/domain/access/access.core';
|
import { AccessCore, Permission } from 'src/cores/access.core';
|
||||||
import {
|
import {
|
||||||
ActivityCreateDto,
|
ActivityCreateDto,
|
||||||
ActivityDto,
|
ActivityDto,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { BadRequestException, Inject, Injectable } from '@nestjs/common';
|
import { BadRequestException, Inject, Injectable } from '@nestjs/common';
|
||||||
import { AccessCore, Permission } from 'src/domain/access/access.core';
|
import { AccessCore, Permission } from 'src/cores/access.core';
|
||||||
import {
|
import {
|
||||||
AlbumCountResponseDto,
|
AlbumCountResponseDto,
|
||||||
AlbumResponseDto,
|
AlbumResponseDto,
|
||||||
|
|
|
@ -3,7 +3,9 @@ import _ from 'lodash';
|
||||||
import { DateTime, Duration } from 'luxon';
|
import { DateTime, Duration } from 'luxon';
|
||||||
import { extname } from 'node:path';
|
import { extname } from 'node:path';
|
||||||
import sanitize from 'sanitize-filename';
|
import sanitize from 'sanitize-filename';
|
||||||
import { AccessCore, Permission } from 'src/domain/access/access.core';
|
import { AccessCore, Permission } from 'src/cores/access.core';
|
||||||
|
import { StorageCore, StorageFolder } from 'src/cores/storage.core';
|
||||||
|
import { SystemConfigCore } from 'src/cores/system-config.core';
|
||||||
import { AssetJobName, AssetJobsDto } from 'src/domain/asset/dto/asset-ids.dto';
|
import { AssetJobName, AssetJobsDto } from 'src/domain/asset/dto/asset-ids.dto';
|
||||||
import { UpdateStackParentDto } from 'src/domain/asset/dto/asset-stack.dto';
|
import { UpdateStackParentDto } from 'src/domain/asset/dto/asset-stack.dto';
|
||||||
import { AssetStatsDto, mapStats } from 'src/domain/asset/dto/asset-statistics.dto';
|
import { AssetStatsDto, mapStats } from 'src/domain/asset/dto/asset-statistics.dto';
|
||||||
|
@ -32,8 +34,6 @@ import { IPartnerRepository } from 'src/domain/repositories/partner.repository';
|
||||||
import { IStorageRepository } from 'src/domain/repositories/storage.repository';
|
import { IStorageRepository } from 'src/domain/repositories/storage.repository';
|
||||||
import { ISystemConfigRepository } from 'src/domain/repositories/system-config.repository';
|
import { ISystemConfigRepository } from 'src/domain/repositories/system-config.repository';
|
||||||
import { IUserRepository } from 'src/domain/repositories/user.repository';
|
import { IUserRepository } from 'src/domain/repositories/user.repository';
|
||||||
import { StorageCore, StorageFolder } from 'src/domain/storage/storage.core';
|
|
||||||
import { SystemConfigCore } from 'src/domain/system-config/system-config.core';
|
|
||||||
import { AssetEntity } from 'src/infra/entities/asset.entity';
|
import { AssetEntity } from 'src/infra/entities/asset.entity';
|
||||||
import { LibraryType } from 'src/infra/entities/library.entity';
|
import { LibraryType } from 'src/infra/entities/library.entity';
|
||||||
import { ImmichLogger } from 'src/infra/logger';
|
import { ImmichLogger } from 'src/infra/logger';
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
import { BadRequestException, Inject, Injectable } from '@nestjs/common';
|
import { BadRequestException, Inject, Injectable } from '@nestjs/common';
|
||||||
import { DateTime } from 'luxon';
|
import { DateTime } from 'luxon';
|
||||||
import { resolve } from 'node:path';
|
import { resolve } from 'node:path';
|
||||||
import { AccessCore, Permission } from 'src/domain/access/access.core';
|
import { AccessCore, Permission } from 'src/cores/access.core';
|
||||||
|
import { StorageCore, StorageFolder } from 'src/cores/storage.core';
|
||||||
import {
|
import {
|
||||||
AuditDeletesDto,
|
AuditDeletesDto,
|
||||||
AuditDeletesResponseDto,
|
AuditDeletesResponseDto,
|
||||||
|
@ -21,7 +22,6 @@ import { JobStatus } from 'src/domain/repositories/job.repository';
|
||||||
import { IPersonRepository } from 'src/domain/repositories/person.repository';
|
import { IPersonRepository } from 'src/domain/repositories/person.repository';
|
||||||
import { IStorageRepository } from 'src/domain/repositories/storage.repository';
|
import { IStorageRepository } from 'src/domain/repositories/storage.repository';
|
||||||
import { IUserRepository } from 'src/domain/repositories/user.repository';
|
import { IUserRepository } from 'src/domain/repositories/user.repository';
|
||||||
import { StorageCore, StorageFolder } from 'src/domain/storage/storage.core';
|
|
||||||
import { DatabaseAction } from 'src/infra/entities/audit.entity';
|
import { DatabaseAction } from 'src/infra/entities/audit.entity';
|
||||||
import { AssetPathType, PersonPathType, UserPathType } from 'src/infra/entities/move.entity';
|
import { AssetPathType, PersonPathType, UserPathType } from 'src/infra/entities/move.entity';
|
||||||
import { ImmichLogger } from 'src/infra/logger';
|
import { ImmichLogger } from 'src/infra/logger';
|
||||||
|
|
|
@ -10,7 +10,9 @@ import cookieParser from 'cookie';
|
||||||
import { DateTime } from 'luxon';
|
import { DateTime } from 'luxon';
|
||||||
import { IncomingHttpHeaders } from 'node:http';
|
import { IncomingHttpHeaders } from 'node:http';
|
||||||
import { ClientMetadata, Issuer, UserinfoResponse, custom, generators } from 'openid-client';
|
import { ClientMetadata, Issuer, UserinfoResponse, custom, generators } from 'openid-client';
|
||||||
import { AccessCore, Permission } from 'src/domain/access/access.core';
|
import { AccessCore, Permission } from 'src/cores/access.core';
|
||||||
|
import { SystemConfigCore } from 'src/cores/system-config.core';
|
||||||
|
import { UserCore } from 'src/cores/user.core';
|
||||||
import {
|
import {
|
||||||
AuthType,
|
AuthType,
|
||||||
IMMICH_ACCESS_COOKIE,
|
IMMICH_ACCESS_COOKIE,
|
||||||
|
@ -42,9 +44,7 @@ import { ISharedLinkRepository } from 'src/domain/repositories/shared-link.repos
|
||||||
import { ISystemConfigRepository } from 'src/domain/repositories/system-config.repository';
|
import { ISystemConfigRepository } from 'src/domain/repositories/system-config.repository';
|
||||||
import { IUserTokenRepository } from 'src/domain/repositories/user-token.repository';
|
import { IUserTokenRepository } from 'src/domain/repositories/user-token.repository';
|
||||||
import { IUserRepository } from 'src/domain/repositories/user.repository';
|
import { IUserRepository } from 'src/domain/repositories/user.repository';
|
||||||
import { SystemConfigCore } from 'src/domain/system-config/system-config.core';
|
|
||||||
import { UserResponseDto, mapUser } from 'src/domain/user/response-dto/user-response.dto';
|
import { UserResponseDto, mapUser } from 'src/domain/user/response-dto/user-response.dto';
|
||||||
import { UserCore } from 'src/domain/user/user.core';
|
|
||||||
import { SystemConfig } from 'src/infra/entities/system-config.entity';
|
import { SystemConfig } from 'src/infra/entities/system-config.entity';
|
||||||
import { UserEntity } from 'src/infra/entities/user.entity';
|
import { UserEntity } from 'src/infra/entities/user.entity';
|
||||||
import { ImmichLogger } from 'src/infra/logger';
|
import { ImmichLogger } from 'src/infra/logger';
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { BadRequestException, Inject, Injectable } from '@nestjs/common';
|
import { BadRequestException, Inject, Injectable } from '@nestjs/common';
|
||||||
import { parse } from 'node:path';
|
import { parse } from 'node:path';
|
||||||
import { AccessCore, Permission } from 'src/domain/access/access.core';
|
import { AccessCore, Permission } from 'src/cores/access.core';
|
||||||
import { AssetIdsDto } from 'src/domain/asset/dto/asset-ids.dto';
|
import { AssetIdsDto } from 'src/domain/asset/dto/asset-ids.dto';
|
||||||
import { AuthDto } from 'src/domain/auth/auth.dto';
|
import { AuthDto } from 'src/domain/auth/auth.dto';
|
||||||
import { mimeTypes } from 'src/domain/domain.constant';
|
import { mimeTypes } from 'src/domain/domain.constant';
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import { BadRequestException } from '@nestjs/common';
|
import { BadRequestException } from '@nestjs/common';
|
||||||
|
import { FeatureFlag, SystemConfigCore } from 'src/cores/system-config.core';
|
||||||
import { JobCommand, JobName, QueueName } from 'src/domain/job/job.constants';
|
import { JobCommand, JobName, QueueName } from 'src/domain/job/job.constants';
|
||||||
import { JobService } from 'src/domain/job/job.service';
|
import { JobService } from 'src/domain/job/job.service';
|
||||||
import { IAssetRepository } from 'src/domain/repositories/asset.repository';
|
import { IAssetRepository } from 'src/domain/repositories/asset.repository';
|
||||||
|
@ -6,7 +7,6 @@ import { ICommunicationRepository } from 'src/domain/repositories/communication.
|
||||||
import { IJobRepository, JobHandler, JobItem, JobStatus } from 'src/domain/repositories/job.repository';
|
import { IJobRepository, JobHandler, JobItem, JobStatus } from 'src/domain/repositories/job.repository';
|
||||||
import { IPersonRepository } from 'src/domain/repositories/person.repository';
|
import { IPersonRepository } from 'src/domain/repositories/person.repository';
|
||||||
import { ISystemConfigRepository } from 'src/domain/repositories/system-config.repository';
|
import { ISystemConfigRepository } from 'src/domain/repositories/system-config.repository';
|
||||||
import { FeatureFlag, SystemConfigCore } from 'src/domain/system-config/system-config.core';
|
|
||||||
import { SystemConfig, SystemConfigKey } from 'src/infra/entities/system-config.entity';
|
import { SystemConfig, SystemConfigKey } from 'src/infra/entities/system-config.entity';
|
||||||
import { assetStub } from 'test/fixtures/asset.stub';
|
import { assetStub } from 'test/fixtures/asset.stub';
|
||||||
import { newAssetRepositoryMock } from 'test/repositories/asset.repository.mock';
|
import { newAssetRepositoryMock } from 'test/repositories/asset.repository.mock';
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import { BadRequestException, Inject, Injectable } from '@nestjs/common';
|
import { BadRequestException, Inject, Injectable } from '@nestjs/common';
|
||||||
|
import { FeatureFlag, SystemConfigCore } from 'src/cores/system-config.core';
|
||||||
import { mapAsset } from 'src/domain/asset/response-dto/asset-response.dto';
|
import { mapAsset } from 'src/domain/asset/response-dto/asset-response.dto';
|
||||||
import { ConcurrentQueueName, JobCommand, JobName, QueueName } from 'src/domain/job/job.constants';
|
import { ConcurrentQueueName, JobCommand, JobName, QueueName } from 'src/domain/job/job.constants';
|
||||||
import { AllJobStatusResponseDto, JobCommandDto, JobStatusDto } from 'src/domain/job/job.dto';
|
import { AllJobStatusResponseDto, JobCommandDto, JobStatusDto } from 'src/domain/job/job.dto';
|
||||||
|
@ -7,7 +8,6 @@ import { ClientEvent, ICommunicationRepository } from 'src/domain/repositories/c
|
||||||
import { IJobRepository, JobHandler, JobItem, JobStatus, QueueCleanType } from 'src/domain/repositories/job.repository';
|
import { IJobRepository, JobHandler, JobItem, JobStatus, QueueCleanType } from 'src/domain/repositories/job.repository';
|
||||||
import { IPersonRepository } from 'src/domain/repositories/person.repository';
|
import { IPersonRepository } from 'src/domain/repositories/person.repository';
|
||||||
import { ISystemConfigRepository } from 'src/domain/repositories/system-config.repository';
|
import { ISystemConfigRepository } from 'src/domain/repositories/system-config.repository';
|
||||||
import { FeatureFlag, SystemConfigCore } from 'src/domain/system-config/system-config.core';
|
|
||||||
import { AssetType } from 'src/infra/entities/asset.entity';
|
import { AssetType } from 'src/infra/entities/asset.entity';
|
||||||
import { ImmichLogger } from 'src/infra/logger';
|
import { ImmichLogger } from 'src/infra/logger';
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@ import { BadRequestException } from '@nestjs/common';
|
||||||
import { when } from 'jest-when';
|
import { when } from 'jest-when';
|
||||||
import { R_OK } from 'node:constants';
|
import { R_OK } from 'node:constants';
|
||||||
import { Stats } from 'node:fs';
|
import { Stats } from 'node:fs';
|
||||||
|
import { SystemConfigCore } from 'src/cores/system-config.core';
|
||||||
import { JobName } from 'src/domain/job/job.constants';
|
import { JobName } from 'src/domain/job/job.constants';
|
||||||
import { ILibraryFileJob, ILibraryRefreshJob } from 'src/domain/job/job.interface';
|
import { ILibraryFileJob, ILibraryRefreshJob } from 'src/domain/job/job.interface';
|
||||||
import { mapLibrary } from 'src/domain/library/library.dto';
|
import { mapLibrary } from 'src/domain/library/library.dto';
|
||||||
|
@ -13,7 +14,6 @@ import { IJobRepository, JobStatus } from 'src/domain/repositories/job.repositor
|
||||||
import { ILibraryRepository } from 'src/domain/repositories/library.repository';
|
import { ILibraryRepository } from 'src/domain/repositories/library.repository';
|
||||||
import { IStorageRepository, StorageEventType } from 'src/domain/repositories/storage.repository';
|
import { IStorageRepository, StorageEventType } from 'src/domain/repositories/storage.repository';
|
||||||
import { ISystemConfigRepository } from 'src/domain/repositories/system-config.repository';
|
import { ISystemConfigRepository } from 'src/domain/repositories/system-config.repository';
|
||||||
import { SystemConfigCore } from 'src/domain/system-config/system-config.core';
|
|
||||||
import { AssetType } from 'src/infra/entities/asset.entity';
|
import { AssetType } from 'src/infra/entities/asset.entity';
|
||||||
import { LibraryType } from 'src/infra/entities/library.entity';
|
import { LibraryType } from 'src/infra/entities/library.entity';
|
||||||
import { SystemConfig, SystemConfigKey } from 'src/infra/entities/system-config.entity';
|
import { SystemConfig, SystemConfigKey } from 'src/infra/entities/system-config.entity';
|
||||||
|
|
|
@ -6,6 +6,8 @@ import { EventEmitter } from 'node:events';
|
||||||
import { Stats } from 'node:fs';
|
import { Stats } from 'node:fs';
|
||||||
import path, { basename, parse } from 'node:path';
|
import path, { basename, parse } from 'node:path';
|
||||||
import picomatch from 'picomatch';
|
import picomatch from 'picomatch';
|
||||||
|
import { StorageCore } from 'src/cores/storage.core';
|
||||||
|
import { SystemConfigCore } from 'src/cores/system-config.core';
|
||||||
import { mimeTypes } from 'src/domain/domain.constant';
|
import { mimeTypes } from 'src/domain/domain.constant';
|
||||||
import { JOBS_ASSET_PAGINATION_SIZE, JobName } from 'src/domain/job/job.constants';
|
import { JOBS_ASSET_PAGINATION_SIZE, JobName } from 'src/domain/job/job.constants';
|
||||||
import { IBaseJob, IEntityJob, ILibraryFileJob, ILibraryRefreshJob } from 'src/domain/job/job.interface';
|
import { IBaseJob, IEntityJob, ILibraryFileJob, ILibraryRefreshJob } from 'src/domain/job/job.interface';
|
||||||
|
@ -29,8 +31,6 @@ import { IJobRepository, JobStatus } from 'src/domain/repositories/job.repositor
|
||||||
import { ILibraryRepository } from 'src/domain/repositories/library.repository';
|
import { ILibraryRepository } from 'src/domain/repositories/library.repository';
|
||||||
import { IStorageRepository, StorageEventType } from 'src/domain/repositories/storage.repository';
|
import { IStorageRepository, StorageEventType } from 'src/domain/repositories/storage.repository';
|
||||||
import { ISystemConfigRepository } from 'src/domain/repositories/system-config.repository';
|
import { ISystemConfigRepository } from 'src/domain/repositories/system-config.repository';
|
||||||
import { StorageCore } from 'src/domain/storage/storage.core';
|
|
||||||
import { SystemConfigCore } from 'src/domain/system-config/system-config.core';
|
|
||||||
import { AssetType } from 'src/infra/entities/asset.entity';
|
import { AssetType } from 'src/infra/entities/asset.entity';
|
||||||
import { LibraryEntity, LibraryType } from 'src/infra/entities/library.entity';
|
import { LibraryEntity, LibraryType } from 'src/infra/entities/library.entity';
|
||||||
import { ImmichLogger } from 'src/infra/logger';
|
import { ImmichLogger } from 'src/infra/logger';
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
import { Inject, Injectable, UnsupportedMediaTypeException } from '@nestjs/common';
|
import { Inject, Injectable, UnsupportedMediaTypeException } from '@nestjs/common';
|
||||||
|
import { StorageCore, StorageFolder } from 'src/cores/storage.core';
|
||||||
|
import { SystemConfigCore } from 'src/cores/system-config.core';
|
||||||
import { JOBS_ASSET_PAGINATION_SIZE, JobName, QueueName } from 'src/domain/job/job.constants';
|
import { JOBS_ASSET_PAGINATION_SIZE, JobName, QueueName } from 'src/domain/job/job.constants';
|
||||||
import { IBaseJob, IEntityJob } from 'src/domain/job/job.interface';
|
import { IBaseJob, IEntityJob } from 'src/domain/job/job.interface';
|
||||||
import {
|
import {
|
||||||
|
@ -24,9 +26,7 @@ import { IMoveRepository } from 'src/domain/repositories/move.repository';
|
||||||
import { IPersonRepository } from 'src/domain/repositories/person.repository';
|
import { IPersonRepository } from 'src/domain/repositories/person.repository';
|
||||||
import { IStorageRepository } from 'src/domain/repositories/storage.repository';
|
import { IStorageRepository } from 'src/domain/repositories/storage.repository';
|
||||||
import { ISystemConfigRepository } from 'src/domain/repositories/system-config.repository';
|
import { ISystemConfigRepository } from 'src/domain/repositories/system-config.repository';
|
||||||
import { StorageCore, StorageFolder } from 'src/domain/storage/storage.core';
|
|
||||||
import { SystemConfigFFmpegDto } from 'src/domain/system-config/dto/system-config-ffmpeg.dto';
|
import { SystemConfigFFmpegDto } from 'src/domain/system-config/dto/system-config-ffmpeg.dto';
|
||||||
import { SystemConfigCore } from 'src/domain/system-config/system-config.core';
|
|
||||||
import { AssetEntity, AssetType } from 'src/infra/entities/asset.entity';
|
import { AssetEntity, AssetType } from 'src/infra/entities/asset.entity';
|
||||||
import { AssetPathType } from 'src/infra/entities/move.entity';
|
import { AssetPathType } from 'src/infra/entities/move.entity';
|
||||||
import {
|
import {
|
||||||
|
|
|
@ -6,6 +6,8 @@ import { Duration } from 'luxon';
|
||||||
import { constants } from 'node:fs/promises';
|
import { constants } from 'node:fs/promises';
|
||||||
import path from 'node:path';
|
import path from 'node:path';
|
||||||
import { Subscription } from 'rxjs';
|
import { Subscription } from 'rxjs';
|
||||||
|
import { StorageCore } from 'src/cores/storage.core';
|
||||||
|
import { FeatureFlag, SystemConfigCore } from 'src/cores/system-config.core';
|
||||||
import { JOBS_ASSET_PAGINATION_SIZE, JobName, QueueName } from 'src/domain/job/job.constants';
|
import { JOBS_ASSET_PAGINATION_SIZE, JobName, QueueName } from 'src/domain/job/job.constants';
|
||||||
import { IBaseJob, IEntityJob, ISidecarWriteJob } from 'src/domain/job/job.interface';
|
import { IBaseJob, IEntityJob, ISidecarWriteJob } from 'src/domain/job/job.interface';
|
||||||
import { IAlbumRepository } from 'src/domain/repositories/album.repository';
|
import { IAlbumRepository } from 'src/domain/repositories/album.repository';
|
||||||
|
@ -20,8 +22,6 @@ import { IMoveRepository } from 'src/domain/repositories/move.repository';
|
||||||
import { IPersonRepository } from 'src/domain/repositories/person.repository';
|
import { IPersonRepository } from 'src/domain/repositories/person.repository';
|
||||||
import { IStorageRepository } from 'src/domain/repositories/storage.repository';
|
import { IStorageRepository } from 'src/domain/repositories/storage.repository';
|
||||||
import { ISystemConfigRepository } from 'src/domain/repositories/system-config.repository';
|
import { ISystemConfigRepository } from 'src/domain/repositories/system-config.repository';
|
||||||
import { StorageCore } from 'src/domain/storage/storage.core';
|
|
||||||
import { FeatureFlag, SystemConfigCore } from 'src/domain/system-config/system-config.core';
|
|
||||||
import { AssetEntity, AssetType } from 'src/infra/entities/asset.entity';
|
import { AssetEntity, AssetType } from 'src/infra/entities/asset.entity';
|
||||||
import { ExifEntity } from 'src/infra/entities/exif.entity';
|
import { ExifEntity } from 'src/infra/entities/exif.entity';
|
||||||
import { ImmichLogger } from 'src/infra/logger';
|
import { ImmichLogger } from 'src/infra/logger';
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { BadRequestException, Inject, Injectable } from '@nestjs/common';
|
import { BadRequestException, Inject, Injectable } from '@nestjs/common';
|
||||||
import { AccessCore, Permission } from 'src/domain/access/access.core';
|
import { AccessCore, Permission } from 'src/cores/access.core';
|
||||||
import { AuthDto } from 'src/domain/auth/auth.dto';
|
import { AuthDto } from 'src/domain/auth/auth.dto';
|
||||||
import { PartnerResponseDto, UpdatePartnerDto } from 'src/domain/partner/partner.dto';
|
import { PartnerResponseDto, UpdatePartnerDto } from 'src/domain/partner/partner.dto';
|
||||||
import { IAccessRepository } from 'src/domain/repositories/access.repository';
|
import { IAccessRepository } from 'src/domain/repositories/access.repository';
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
import { BadRequestException, Inject, Injectable, NotFoundException } from '@nestjs/common';
|
import { BadRequestException, Inject, Injectable, NotFoundException } from '@nestjs/common';
|
||||||
import { AccessCore, Permission } from 'src/domain/access/access.core';
|
import { AccessCore, Permission } from 'src/cores/access.core';
|
||||||
|
import { StorageCore } from 'src/cores/storage.core';
|
||||||
|
import { SystemConfigCore } from 'src/cores/system-config.core';
|
||||||
import { BulkIdErrorReason, BulkIdResponseDto } from 'src/domain/asset/response-dto/asset-ids-response.dto';
|
import { BulkIdErrorReason, BulkIdResponseDto } from 'src/domain/asset/response-dto/asset-ids-response.dto';
|
||||||
import { AssetResponseDto, mapAsset } from 'src/domain/asset/response-dto/asset-response.dto';
|
import { AssetResponseDto, mapAsset } from 'src/domain/asset/response-dto/asset-response.dto';
|
||||||
import { AuthDto } from 'src/domain/auth/auth.dto';
|
import { AuthDto } from 'src/domain/auth/auth.dto';
|
||||||
|
@ -33,8 +35,6 @@ import { IPersonRepository, UpdateFacesData } from 'src/domain/repositories/pers
|
||||||
import { ISearchRepository } from 'src/domain/repositories/search.repository';
|
import { ISearchRepository } from 'src/domain/repositories/search.repository';
|
||||||
import { IStorageRepository } from 'src/domain/repositories/storage.repository';
|
import { IStorageRepository } from 'src/domain/repositories/storage.repository';
|
||||||
import { ISystemConfigRepository } from 'src/domain/repositories/system-config.repository';
|
import { ISystemConfigRepository } from 'src/domain/repositories/system-config.repository';
|
||||||
import { StorageCore } from 'src/domain/storage/storage.core';
|
|
||||||
import { SystemConfigCore } from 'src/domain/system-config/system-config.core';
|
|
||||||
import { PersonPathType } from 'src/infra/entities/move.entity';
|
import { PersonPathType } from 'src/infra/entities/move.entity';
|
||||||
import { PersonEntity } from 'src/infra/entities/person.entity';
|
import { PersonEntity } from 'src/infra/entities/person.entity';
|
||||||
import { ImmichLogger } from 'src/infra/logger';
|
import { ImmichLogger } from 'src/infra/logger';
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import { Inject, Injectable } from '@nestjs/common';
|
import { Inject, Injectable } from '@nestjs/common';
|
||||||
|
import { FeatureFlag, SystemConfigCore } from 'src/cores/system-config.core';
|
||||||
import { AssetResponseDto, mapAsset } from 'src/domain/asset/response-dto/asset-response.dto';
|
import { AssetResponseDto, mapAsset } from 'src/domain/asset/response-dto/asset-response.dto';
|
||||||
import { AuthDto } from 'src/domain/auth/auth.dto';
|
import { AuthDto } from 'src/domain/auth/auth.dto';
|
||||||
import { PersonResponseDto } from 'src/domain/person/person.dto';
|
import { PersonResponseDto } from 'src/domain/person/person.dto';
|
||||||
|
@ -20,7 +21,6 @@ import {
|
||||||
mapPlaces,
|
mapPlaces,
|
||||||
} from 'src/domain/search/dto/search.dto';
|
} from 'src/domain/search/dto/search.dto';
|
||||||
import { SearchResponseDto } from 'src/domain/search/response-dto/search-response.dto';
|
import { SearchResponseDto } from 'src/domain/search/response-dto/search-response.dto';
|
||||||
import { FeatureFlag, SystemConfigCore } from 'src/domain/system-config/system-config.core';
|
|
||||||
import { AssetOrder } from 'src/infra/entities/album.entity';
|
import { AssetOrder } from 'src/infra/entities/album.entity';
|
||||||
import { AssetEntity } from 'src/infra/entities/asset.entity';
|
import { AssetEntity } from 'src/infra/entities/asset.entity';
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import { ApiProperty, ApiResponseProperty } from '@nestjs/swagger';
|
import { ApiProperty, ApiResponseProperty } from '@nestjs/swagger';
|
||||||
import type { DateTime } from 'luxon';
|
import type { DateTime } from 'luxon';
|
||||||
|
import { FeatureFlags } from 'src/cores/system-config.core';
|
||||||
import { IVersion, VersionType } from 'src/domain/domain.constant';
|
import { IVersion, VersionType } from 'src/domain/domain.constant';
|
||||||
import { SystemConfigThemeDto } from 'src/domain/system-config/dto/system-config-theme.dto';
|
import { SystemConfigThemeDto } from 'src/domain/system-config/dto/system-config-theme.dto';
|
||||||
import { FeatureFlags } from 'src/domain/system-config/system-config.core';
|
|
||||||
|
|
||||||
export class ServerPingResponse {
|
export class ServerPingResponse {
|
||||||
@ApiResponseProperty({ type: String, example: 'pong' })
|
@ApiResponseProperty({ type: String, example: 'pong' })
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
import { Inject, Injectable } from '@nestjs/common';
|
import { Inject, Injectable } from '@nestjs/common';
|
||||||
import { DateTime } from 'luxon';
|
import { DateTime } from 'luxon';
|
||||||
|
import { StorageCore, StorageFolder } from 'src/cores/storage.core';
|
||||||
|
import { SystemConfigCore } from 'src/cores/system-config.core';
|
||||||
import { Version, isDev, mimeTypes, serverVersion } from 'src/domain/domain.constant';
|
import { Version, isDev, mimeTypes, serverVersion } from 'src/domain/domain.constant';
|
||||||
import { ClientEvent, ICommunicationRepository } from 'src/domain/repositories/communication.repository';
|
import { ClientEvent, ICommunicationRepository } from 'src/domain/repositories/communication.repository';
|
||||||
import { IServerInfoRepository } from 'src/domain/repositories/server-info.repository';
|
import { IServerInfoRepository } from 'src/domain/repositories/server-info.repository';
|
||||||
|
@ -16,8 +18,6 @@ import {
|
||||||
ServerStatsResponseDto,
|
ServerStatsResponseDto,
|
||||||
UsageByUserDto,
|
UsageByUserDto,
|
||||||
} from 'src/domain/server-info/server-info.dto';
|
} from 'src/domain/server-info/server-info.dto';
|
||||||
import { StorageCore, StorageFolder } from 'src/domain/storage/storage.core';
|
|
||||||
import { SystemConfigCore } from 'src/domain/system-config/system-config.core';
|
|
||||||
import { SystemMetadataKey } from 'src/infra/entities/system-metadata.entity';
|
import { SystemMetadataKey } from 'src/infra/entities/system-metadata.entity';
|
||||||
import { ImmichLogger } from 'src/infra/logger';
|
import { ImmichLogger } from 'src/infra/logger';
|
||||||
import { asHumanReadable } from 'src/utils';
|
import { asHumanReadable } from 'src/utils';
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { BadRequestException, ForbiddenException, Inject, Injectable, UnauthorizedException } from '@nestjs/common';
|
import { BadRequestException, ForbiddenException, Inject, Injectable, UnauthorizedException } from '@nestjs/common';
|
||||||
import { AccessCore, Permission } from 'src/domain/access/access.core';
|
import { AccessCore, Permission } from 'src/cores/access.core';
|
||||||
import { AssetIdsDto } from 'src/domain/asset/dto/asset-ids.dto';
|
import { AssetIdsDto } from 'src/domain/asset/dto/asset-ids.dto';
|
||||||
import { AssetIdErrorReason, AssetIdsResponseDto } from 'src/domain/asset/response-dto/asset-ids-response.dto';
|
import { AssetIdErrorReason, AssetIdsResponseDto } from 'src/domain/asset/response-dto/asset-ids-response.dto';
|
||||||
import { AuthDto } from 'src/domain/auth/auth.dto';
|
import { AuthDto } from 'src/domain/auth/auth.dto';
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import { Inject, Injectable } from '@nestjs/common';
|
import { Inject, Injectable } from '@nestjs/common';
|
||||||
|
import { SystemConfigCore } from 'src/cores/system-config.core';
|
||||||
import { JOBS_ASSET_PAGINATION_SIZE, JobName, QueueName } from 'src/domain/job/job.constants';
|
import { JOBS_ASSET_PAGINATION_SIZE, JobName, QueueName } from 'src/domain/job/job.constants';
|
||||||
import { IBaseJob, IEntityJob } from 'src/domain/job/job.interface';
|
import { IBaseJob, IEntityJob } from 'src/domain/job/job.interface';
|
||||||
import { IAssetRepository, WithoutProperty } from 'src/domain/repositories/asset.repository';
|
import { IAssetRepository, WithoutProperty } from 'src/domain/repositories/asset.repository';
|
||||||
|
@ -7,7 +8,6 @@ import { IJobRepository, JobStatus } from 'src/domain/repositories/job.repositor
|
||||||
import { IMachineLearningRepository } from 'src/domain/repositories/machine-learning.repository';
|
import { IMachineLearningRepository } from 'src/domain/repositories/machine-learning.repository';
|
||||||
import { ISearchRepository } from 'src/domain/repositories/search.repository';
|
import { ISearchRepository } from 'src/domain/repositories/search.repository';
|
||||||
import { ISystemConfigRepository } from 'src/domain/repositories/system-config.repository';
|
import { ISystemConfigRepository } from 'src/domain/repositories/system-config.repository';
|
||||||
import { SystemConfigCore } from 'src/domain/system-config/system-config.core';
|
|
||||||
import { ImmichLogger } from 'src/infra/logger';
|
import { ImmichLogger } from 'src/infra/logger';
|
||||||
import { usePagination } from 'src/utils';
|
import { usePagination } from 'src/utils';
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import { when } from 'jest-when';
|
import { when } from 'jest-when';
|
||||||
import { Stats } from 'node:fs';
|
import { Stats } from 'node:fs';
|
||||||
|
import { SystemConfigCore, defaults } from 'src/cores/system-config.core';
|
||||||
import { IAlbumRepository } from 'src/domain/repositories/album.repository';
|
import { IAlbumRepository } from 'src/domain/repositories/album.repository';
|
||||||
import { IAssetRepository } from 'src/domain/repositories/asset.repository';
|
import { IAssetRepository } from 'src/domain/repositories/asset.repository';
|
||||||
import { ICryptoRepository } from 'src/domain/repositories/crypto.repository';
|
import { ICryptoRepository } from 'src/domain/repositories/crypto.repository';
|
||||||
|
@ -11,7 +12,6 @@ import { IStorageRepository } from 'src/domain/repositories/storage.repository';
|
||||||
import { ISystemConfigRepository } from 'src/domain/repositories/system-config.repository';
|
import { ISystemConfigRepository } from 'src/domain/repositories/system-config.repository';
|
||||||
import { IUserRepository } from 'src/domain/repositories/user.repository';
|
import { IUserRepository } from 'src/domain/repositories/user.repository';
|
||||||
import { StorageTemplateService } from 'src/domain/storage-template/storage-template.service';
|
import { StorageTemplateService } from 'src/domain/storage-template/storage-template.service';
|
||||||
import { SystemConfigCore, defaults } from 'src/domain/system-config/system-config.core';
|
|
||||||
import { AssetPathType } from 'src/infra/entities/move.entity';
|
import { AssetPathType } from 'src/infra/entities/move.entity';
|
||||||
import { SystemConfig, SystemConfigKey } from 'src/infra/entities/system-config.entity';
|
import { SystemConfig, SystemConfigKey } from 'src/infra/entities/system-config.entity';
|
||||||
import { assetStub } from 'test/fixtures/asset.stub';
|
import { assetStub } from 'test/fixtures/asset.stub';
|
||||||
|
|
|
@ -4,6 +4,8 @@ import handlebar from 'handlebars';
|
||||||
import { DateTime } from 'luxon';
|
import { DateTime } from 'luxon';
|
||||||
import path from 'node:path';
|
import path from 'node:path';
|
||||||
import sanitize from 'sanitize-filename';
|
import sanitize from 'sanitize-filename';
|
||||||
|
import { StorageCore, StorageFolder } from 'src/cores/storage.core';
|
||||||
|
import { SystemConfigCore } from 'src/cores/system-config.core';
|
||||||
import { JOBS_ASSET_PAGINATION_SIZE } from 'src/domain/job/job.constants';
|
import { JOBS_ASSET_PAGINATION_SIZE } from 'src/domain/job/job.constants';
|
||||||
import { IEntityJob } from 'src/domain/job/job.interface';
|
import { IEntityJob } from 'src/domain/job/job.interface';
|
||||||
import { IAlbumRepository } from 'src/domain/repositories/album.repository';
|
import { IAlbumRepository } from 'src/domain/repositories/album.repository';
|
||||||
|
@ -17,7 +19,6 @@ import { IPersonRepository } from 'src/domain/repositories/person.repository';
|
||||||
import { IStorageRepository } from 'src/domain/repositories/storage.repository';
|
import { IStorageRepository } from 'src/domain/repositories/storage.repository';
|
||||||
import { ISystemConfigRepository } from 'src/domain/repositories/system-config.repository';
|
import { ISystemConfigRepository } from 'src/domain/repositories/system-config.repository';
|
||||||
import { IUserRepository } from 'src/domain/repositories/user.repository';
|
import { IUserRepository } from 'src/domain/repositories/user.repository';
|
||||||
import { StorageCore, StorageFolder } from 'src/domain/storage/storage.core';
|
|
||||||
import {
|
import {
|
||||||
supportedDayTokens,
|
supportedDayTokens,
|
||||||
supportedHourTokens,
|
supportedHourTokens,
|
||||||
|
@ -27,7 +28,6 @@ import {
|
||||||
supportedWeekTokens,
|
supportedWeekTokens,
|
||||||
supportedYearTokens,
|
supportedYearTokens,
|
||||||
} from 'src/domain/system-config/system-config.constants';
|
} from 'src/domain/system-config/system-config.constants';
|
||||||
import { SystemConfigCore } from 'src/domain/system-config/system-config.core';
|
|
||||||
import { AssetEntity, AssetType } from 'src/infra/entities/asset.entity';
|
import { AssetEntity, AssetType } from 'src/infra/entities/asset.entity';
|
||||||
import { AssetPathType } from 'src/infra/entities/move.entity';
|
import { AssetPathType } from 'src/infra/entities/move.entity';
|
||||||
import { SystemConfig } from 'src/infra/entities/system-config.entity';
|
import { SystemConfig } from 'src/infra/entities/system-config.entity';
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import { Inject, Injectable } from '@nestjs/common';
|
import { Inject, Injectable } from '@nestjs/common';
|
||||||
|
import { StorageCore, StorageFolder } from 'src/cores/storage.core';
|
||||||
import { IDeleteFilesJob } from 'src/domain/job/job.interface';
|
import { IDeleteFilesJob } from 'src/domain/job/job.interface';
|
||||||
import { JobStatus } from 'src/domain/repositories/job.repository';
|
import { JobStatus } from 'src/domain/repositories/job.repository';
|
||||||
import { IStorageRepository } from 'src/domain/repositories/storage.repository';
|
import { IStorageRepository } from 'src/domain/repositories/storage.repository';
|
||||||
import { StorageCore, StorageFolder } from 'src/domain/storage/storage.core';
|
|
||||||
import { ImmichLogger } from 'src/infra/logger';
|
import { ImmichLogger } from 'src/infra/logger';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { BadRequestException } from '@nestjs/common';
|
import { BadRequestException } from '@nestjs/common';
|
||||||
|
import { defaults } from 'src/cores/system-config.core';
|
||||||
import { QueueName } from 'src/domain/job/job.constants';
|
import { QueueName } from 'src/domain/job/job.constants';
|
||||||
import { ICommunicationRepository, ServerEvent } from 'src/domain/repositories/communication.repository';
|
import { ICommunicationRepository, ServerEvent } from 'src/domain/repositories/communication.repository';
|
||||||
import { ISearchRepository } from 'src/domain/repositories/search.repository';
|
import { ISearchRepository } from 'src/domain/repositories/search.repository';
|
||||||
import { ISystemConfigRepository } from 'src/domain/repositories/system-config.repository';
|
import { ISystemConfigRepository } from 'src/domain/repositories/system-config.repository';
|
||||||
import { defaults } from 'src/domain/system-config/system-config.core';
|
|
||||||
import { SystemConfigService } from 'src/domain/system-config/system-config.service';
|
import { SystemConfigService } from 'src/domain/system-config/system-config.service';
|
||||||
import {
|
import {
|
||||||
AudioCodec,
|
AudioCodec,
|
||||||
|
|
|
@ -2,6 +2,7 @@ import { BadRequestException, Inject, Injectable } from '@nestjs/common';
|
||||||
import { OnEvent } from '@nestjs/event-emitter';
|
import { OnEvent } from '@nestjs/event-emitter';
|
||||||
import { instanceToPlain } from 'class-transformer';
|
import { instanceToPlain } from 'class-transformer';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
|
import { SystemConfigCore } from 'src/cores/system-config.core';
|
||||||
import {
|
import {
|
||||||
ClientEvent,
|
ClientEvent,
|
||||||
ICommunicationRepository,
|
ICommunicationRepository,
|
||||||
|
@ -23,7 +24,6 @@ import {
|
||||||
supportedWeekTokens,
|
supportedWeekTokens,
|
||||||
supportedYearTokens,
|
supportedYearTokens,
|
||||||
} from 'src/domain/system-config/system-config.constants';
|
} from 'src/domain/system-config/system-config.constants';
|
||||||
import { SystemConfigCore } from 'src/domain/system-config/system-config.core';
|
|
||||||
import { LogLevel, SystemConfig } from 'src/infra/entities/system-config.entity';
|
import { LogLevel, SystemConfig } from 'src/infra/entities/system-config.entity';
|
||||||
import { ImmichLogger } from 'src/infra/logger';
|
import { ImmichLogger } from 'src/infra/logger';
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { Inject } from '@nestjs/common';
|
import { Inject } from '@nestjs/common';
|
||||||
import { DateTime } from 'luxon';
|
import { DateTime } from 'luxon';
|
||||||
import { AccessCore, Permission } from 'src/domain/access/access.core';
|
import { AccessCore, Permission } from 'src/cores/access.core';
|
||||||
import { BulkIdsDto } from 'src/domain/asset/response-dto/asset-ids-response.dto';
|
import { BulkIdsDto } from 'src/domain/asset/response-dto/asset-ids-response.dto';
|
||||||
import { AuthDto } from 'src/domain/auth/auth.dto';
|
import { AuthDto } from 'src/domain/auth/auth.dto';
|
||||||
import { JOBS_ASSET_PAGINATION_SIZE, JobName } from 'src/domain/job/job.constants';
|
import { JOBS_ASSET_PAGINATION_SIZE, JobName } from 'src/domain/job/job.constants';
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
import { BadRequestException, ForbiddenException, Inject, Injectable, NotFoundException } from '@nestjs/common';
|
import { BadRequestException, ForbiddenException, Inject, Injectable, NotFoundException } from '@nestjs/common';
|
||||||
import { DateTime } from 'luxon';
|
import { DateTime } from 'luxon';
|
||||||
import { randomBytes } from 'node:crypto';
|
import { randomBytes } from 'node:crypto';
|
||||||
|
import { StorageCore, StorageFolder } from 'src/cores/storage.core';
|
||||||
|
import { SystemConfigCore } from 'src/cores/system-config.core';
|
||||||
|
import { UserCore } from 'src/cores/user.core';
|
||||||
import { AuthDto } from 'src/domain/auth/auth.dto';
|
import { AuthDto } from 'src/domain/auth/auth.dto';
|
||||||
import { JobName } from 'src/domain/job/job.constants';
|
import { JobName } from 'src/domain/job/job.constants';
|
||||||
import { IEntityJob } from 'src/domain/job/job.interface';
|
import { IEntityJob } from 'src/domain/job/job.interface';
|
||||||
|
@ -11,8 +14,6 @@ import { ILibraryRepository } from 'src/domain/repositories/library.repository';
|
||||||
import { IStorageRepository } from 'src/domain/repositories/storage.repository';
|
import { IStorageRepository } from 'src/domain/repositories/storage.repository';
|
||||||
import { ISystemConfigRepository } from 'src/domain/repositories/system-config.repository';
|
import { ISystemConfigRepository } from 'src/domain/repositories/system-config.repository';
|
||||||
import { IUserRepository, UserFindOptions } from 'src/domain/repositories/user.repository';
|
import { IUserRepository, UserFindOptions } from 'src/domain/repositories/user.repository';
|
||||||
import { StorageCore, StorageFolder } from 'src/domain/storage/storage.core';
|
|
||||||
import { SystemConfigCore } from 'src/domain/system-config/system-config.core';
|
|
||||||
import { CreateUserDto } from 'src/domain/user/dto/create-user.dto';
|
import { CreateUserDto } from 'src/domain/user/dto/create-user.dto';
|
||||||
import { DeleteUserDto } from 'src/domain/user/dto/delete-user.dto';
|
import { DeleteUserDto } from 'src/domain/user/dto/delete-user.dto';
|
||||||
import { UpdateUserDto } from 'src/domain/user/dto/update-user.dto';
|
import { UpdateUserDto } from 'src/domain/user/dto/update-user.dto';
|
||||||
|
@ -21,7 +22,6 @@ import {
|
||||||
mapCreateProfileImageResponse,
|
mapCreateProfileImageResponse,
|
||||||
} from 'src/domain/user/response-dto/create-profile-image-response.dto';
|
} from 'src/domain/user/response-dto/create-profile-image-response.dto';
|
||||||
import { UserResponseDto, mapUser } from 'src/domain/user/response-dto/user-response.dto';
|
import { UserResponseDto, mapUser } from 'src/domain/user/response-dto/user-response.dto';
|
||||||
import { UserCore } from 'src/domain/user/user.core';
|
|
||||||
import { UserEntity, UserStatus } from 'src/infra/entities/user.entity';
|
import { UserEntity, UserStatus } from 'src/infra/entities/user.entity';
|
||||||
import { ImmichLogger } from 'src/infra/logger';
|
import { ImmichLogger } from 'src/infra/logger';
|
||||||
import { CacheControl, ImmichFileResponse } from 'src/utils';
|
import { CacheControl, ImmichFileResponse } from 'src/utils';
|
||||||
|
|
|
@ -5,7 +5,7 @@ import {
|
||||||
InternalServerErrorException,
|
InternalServerErrorException,
|
||||||
NotFoundException,
|
NotFoundException,
|
||||||
} from '@nestjs/common';
|
} from '@nestjs/common';
|
||||||
import { AccessCore, Permission } from 'src/domain/access/access.core';
|
import { AccessCore, Permission } from 'src/cores/access.core';
|
||||||
import { UploadFile } from 'src/domain/asset/asset.service';
|
import { UploadFile } from 'src/domain/asset/asset.service';
|
||||||
import { AssetResponseDto, mapAsset } from 'src/domain/asset/response-dto/asset-response.dto';
|
import { AssetResponseDto, mapAsset } from 'src/domain/asset/response-dto/asset-response.dto';
|
||||||
import { AuthDto } from 'src/domain/auth/auth.dto';
|
import { AuthDto } from 'src/domain/auth/auth.dto';
|
||||||
|
|
2
server/test/fixtures/library.stub.ts
vendored
2
server/test/fixtures/library.stub.ts
vendored
|
@ -1,6 +1,6 @@
|
||||||
import { join } from 'node:path';
|
import { join } from 'node:path';
|
||||||
|
import { THUMBNAIL_DIR } from 'src/cores/storage.core';
|
||||||
import { APP_MEDIA_LOCATION } from 'src/domain/domain.constant';
|
import { APP_MEDIA_LOCATION } from 'src/domain/domain.constant';
|
||||||
import { THUMBNAIL_DIR } from 'src/domain/storage/storage.core';
|
|
||||||
import { LibraryEntity, LibraryType } from 'src/infra/entities/library.entity';
|
import { LibraryEntity, LibraryType } from 'src/infra/entities/library.entity';
|
||||||
import { userStub } from 'test/fixtures/user.stub';
|
import { userStub } from 'test/fixtures/user.stub';
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { AccessCore } from 'src/domain/access/access.core';
|
import { AccessCore } from 'src/cores/access.core';
|
||||||
import { IAccessRepository } from 'src/domain/repositories/access.repository';
|
import { IAccessRepository } from 'src/domain/repositories/access.repository';
|
||||||
|
|
||||||
export interface IAccessRepositoryMock {
|
export interface IAccessRepositoryMock {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { WatchOptions } from 'chokidar';
|
import { WatchOptions } from 'chokidar';
|
||||||
|
import { StorageCore } from 'src/cores/storage.core';
|
||||||
import { IStorageRepository, StorageEventType, WatchEvents } from 'src/domain/repositories/storage.repository';
|
import { IStorageRepository, StorageEventType, WatchEvents } from 'src/domain/repositories/storage.repository';
|
||||||
import { StorageCore } from 'src/domain/storage/storage.core';
|
|
||||||
|
|
||||||
interface MockWatcherOptions {
|
interface MockWatcherOptions {
|
||||||
items?: Array<{ event: 'change' | 'add' | 'unlink' | 'error'; value: string }>;
|
items?: Array<{ event: 'change' | 'add' | 'unlink' | 'error'; value: string }>;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
import { SystemConfigCore } from 'src/cores/system-config.core';
|
||||||
import { ISystemConfigRepository } from 'src/domain/repositories/system-config.repository';
|
import { ISystemConfigRepository } from 'src/domain/repositories/system-config.repository';
|
||||||
import { SystemConfigCore } from 'src/domain/system-config/system-config.core';
|
|
||||||
|
|
||||||
export const newSystemConfigRepositoryMock = (reset = true): jest.Mocked<ISystemConfigRepository> => {
|
export const newSystemConfigRepositoryMock = (reset = true): jest.Mocked<ISystemConfigRepository> => {
|
||||||
if (reset) {
|
if (reset) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
import { UserCore } from 'src/cores/user.core';
|
||||||
import { IUserRepository } from 'src/domain/repositories/user.repository';
|
import { IUserRepository } from 'src/domain/repositories/user.repository';
|
||||||
import { UserCore } from 'src/domain/user/user.core';
|
|
||||||
|
|
||||||
export const newUserRepositoryMock = (reset = true): jest.Mocked<IUserRepository> => {
|
export const newUserRepositoryMock = (reset = true): jest.Mocked<IUserRepository> => {
|
||||||
if (reset) {
|
if (reset) {
|
||||||
|
|
Loading…
Reference in a new issue