mirror of
https://github.com/immich-app/immich.git
synced 2025-01-10 05:46:46 +01:00
ce5966c23d
* feat: activity * regenerate api * fix: make asset owner unable to delete comment * fix: merge * fix: tests * feat: use textarea instead of input * fix: do actions only if the album is shared * fix: placeholder opacity * fix(web): improve messages UI * fix(web): improve input message UI * pr feedback * fix: tests * pr feedback * pr feedback * pr feedback * fix permissions * regenerate api * pr feedback * pr feedback * multiple improvements on web * fix: ui colors * WIP * chore: open api * pr feedback * fix: add comment * chore: clean up * pr feedback * refactor: endpoints * chore: open api * fix: filter by type * fix: e2e * feat: e2e remove own comment * fix: web tests * remove console.log * chore: cleanup * fix: ui tweaks * pr feedback * fix web test * fix: unit tests * chore: remove unused code * revert useless changes * fix: grouping messages * fix: remove nullable on updatedAt * fix: text overflow * styling --------- Co-authored-by: Jason Rasmussen <jrasm91@gmail.com> Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
112 lines
3.6 KiB
TypeScript
112 lines
3.6 KiB
TypeScript
import {
|
|
IAccessRepository,
|
|
IActivityRepository,
|
|
IAlbumRepository,
|
|
IAssetRepository,
|
|
IAuditRepository,
|
|
ICommunicationRepository,
|
|
ICryptoRepository,
|
|
IJobRepository,
|
|
IKeyRepository,
|
|
ILibraryRepository,
|
|
IMachineLearningRepository,
|
|
IMediaRepository,
|
|
IMetadataRepository,
|
|
IMoveRepository,
|
|
IPartnerRepository,
|
|
IPersonRepository,
|
|
ISearchRepository,
|
|
IServerInfoRepository,
|
|
ISharedLinkRepository,
|
|
ISmartInfoRepository,
|
|
IStorageRepository,
|
|
ISystemConfigRepository,
|
|
ITagRepository,
|
|
IUserRepository,
|
|
IUserTokenRepository,
|
|
immichAppConfig,
|
|
} from '@app/domain';
|
|
import { BullModule } from '@nestjs/bullmq';
|
|
import { Global, Module, Provider } from '@nestjs/common';
|
|
import { ConfigModule } from '@nestjs/config';
|
|
import { TypeOrmModule } from '@nestjs/typeorm';
|
|
import { databaseConfig } from './database.config';
|
|
import { databaseEntities } from './entities';
|
|
import { bullConfig, bullQueues } from './infra.config';
|
|
import {
|
|
APIKeyRepository,
|
|
AccessRepository,
|
|
ActivityRepository,
|
|
AlbumRepository,
|
|
AssetRepository,
|
|
AuditRepository,
|
|
CommunicationRepository,
|
|
CryptoRepository,
|
|
FilesystemProvider,
|
|
JobRepository,
|
|
LibraryRepository,
|
|
MachineLearningRepository,
|
|
MediaRepository,
|
|
MetadataRepository,
|
|
MoveRepository,
|
|
PartnerRepository,
|
|
PersonRepository,
|
|
ServerInfoRepository,
|
|
SharedLinkRepository,
|
|
SmartInfoRepository,
|
|
SystemConfigRepository,
|
|
TagRepository,
|
|
TypesenseRepository,
|
|
UserRepository,
|
|
UserTokenRepository,
|
|
} from './repositories';
|
|
|
|
const providers: Provider[] = [
|
|
{ provide: IActivityRepository, useClass: ActivityRepository },
|
|
{ provide: IAccessRepository, useClass: AccessRepository },
|
|
{ provide: IAlbumRepository, useClass: AlbumRepository },
|
|
{ provide: IAssetRepository, useClass: AssetRepository },
|
|
{ provide: IAuditRepository, useClass: AuditRepository },
|
|
{ provide: ICommunicationRepository, useClass: CommunicationRepository },
|
|
{ provide: ICryptoRepository, useClass: CryptoRepository },
|
|
{ provide: IJobRepository, useClass: JobRepository },
|
|
{ provide: ILibraryRepository, useClass: LibraryRepository },
|
|
{ provide: IKeyRepository, useClass: APIKeyRepository },
|
|
{ provide: IMachineLearningRepository, useClass: MachineLearningRepository },
|
|
{ provide: IMetadataRepository, useClass: MetadataRepository },
|
|
{ provide: IMoveRepository, useClass: MoveRepository },
|
|
{ provide: IPartnerRepository, useClass: PartnerRepository },
|
|
{ provide: IPersonRepository, useClass: PersonRepository },
|
|
{ provide: ISearchRepository, useClass: TypesenseRepository },
|
|
{ provide: IServerInfoRepository, useClass: ServerInfoRepository },
|
|
{ provide: ISharedLinkRepository, useClass: SharedLinkRepository },
|
|
{ provide: ISmartInfoRepository, useClass: SmartInfoRepository },
|
|
{ provide: IStorageRepository, useClass: FilesystemProvider },
|
|
{ provide: ISystemConfigRepository, useClass: SystemConfigRepository },
|
|
{ provide: ITagRepository, useClass: TagRepository },
|
|
{ provide: IMediaRepository, useClass: MediaRepository },
|
|
{ provide: IUserRepository, useClass: UserRepository },
|
|
{ provide: IUserTokenRepository, useClass: UserTokenRepository },
|
|
];
|
|
|
|
const imports = [
|
|
ConfigModule.forRoot(immichAppConfig),
|
|
TypeOrmModule.forRoot(databaseConfig),
|
|
TypeOrmModule.forFeature(databaseEntities),
|
|
];
|
|
|
|
const moduleExports = [...providers];
|
|
|
|
if (process.env.IMMICH_TEST_ENV !== 'true') {
|
|
imports.push(BullModule.forRoot(bullConfig));
|
|
imports.push(BullModule.registerQueue(...bullQueues));
|
|
moduleExports.push(BullModule);
|
|
}
|
|
|
|
@Global()
|
|
@Module({
|
|
imports,
|
|
providers: [...providers],
|
|
exports: moduleExports,
|
|
})
|
|
export class InfraModule {}
|