0
0

fix(backend): サービスが二重にインスタンス化されるのを修正

This commit is contained in:
syuilo 2022-09-18 06:24:30 +09:00
parent 6b639f186d
commit 1cb85c5c76

View File

@ -116,119 +116,119 @@ import { QueueService } from './QueueService.js';
import type { Provider } from '@nestjs/common';
//#region 文字列ベースでのinjection用(循環参照対応のため)
const $AccountUpdateService: Provider = { provide: 'AccountUpdateService', useClass: AccountUpdateService };
const $AiService: Provider = { provide: 'AiService', useClass: AiService };
const $AntennaService: Provider = { provide: 'AntennaService', useClass: AntennaService };
const $AppLockService: Provider = { provide: 'AppLockService', useClass: AppLockService };
const $CaptchaService: Provider = { provide: 'CaptchaService', useClass: CaptchaService };
const $CreateNotificationService: Provider = { provide: 'CreateNotificationService', useClass: CreateNotificationService };
const $CreateSystemUserService: Provider = { provide: 'CreateSystemUserService', useClass: CreateSystemUserService };
const $CustomEmojiService: Provider = { provide: 'CustomEmojiService', useClass: CustomEmojiService };
const $DeleteAccountService: Provider = { provide: 'DeleteAccountService', useClass: DeleteAccountService };
const $DownloadService: Provider = { provide: 'DownloadService', useClass: DownloadService };
const $DriveService: Provider = { provide: 'DriveService', useClass: DriveService };
const $EmailService: Provider = { provide: 'EmailService', useClass: EmailService };
const $FederatedInstanceService: Provider = { provide: 'FederatedInstanceService', useClass: FederatedInstanceService };
const $FetchInstanceMetadataService: Provider = { provide: 'FetchInstanceMetadataService', useClass: FetchInstanceMetadataService };
const $GlobalEventService: Provider = { provide: 'GlobalEventService', useClass: GlobalEventService };
const $HashtagService: Provider = { provide: 'HashtagService', useClass: HashtagService };
const $HttpRequestService: Provider = { provide: 'HttpRequestService', useClass: HttpRequestService };
const $IdService: Provider = { provide: 'IdService', useClass: IdService };
const $ImageProcessingService: Provider = { provide: 'ImageProcessingService', useClass: ImageProcessingService };
const $InstanceActorService: Provider = { provide: 'InstanceActorService', useClass: InstanceActorService };
const $InternalStorageService: Provider = { provide: 'InternalStorageService', useClass: InternalStorageService };
const $MessagingService: Provider = { provide: 'MessagingService', useClass: MessagingService };
const $MetaService: Provider = { provide: 'MetaService', useClass: MetaService };
const $MfmService: Provider = { provide: 'MfmService', useClass: MfmService };
const $ModerationLogService: Provider = { provide: 'ModerationLogService', useClass: ModerationLogService };
const $NoteCreateService: Provider = { provide: 'NoteCreateService', useClass: NoteCreateService };
const $NoteDeleteService: Provider = { provide: 'NoteDeleteService', useClass: NoteDeleteService };
const $NotePiningService: Provider = { provide: 'NotePiningService', useClass: NotePiningService };
const $NoteReadService: Provider = { provide: 'NoteReadService', useClass: NoteReadService };
const $NotificationService: Provider = { provide: 'NotificationService', useClass: NotificationService };
const $PollService: Provider = { provide: 'PollService', useClass: PollService };
const $ProxyAccountService: Provider = { provide: 'ProxyAccountService', useClass: ProxyAccountService };
const $PushNotificationService: Provider = { provide: 'PushNotificationService', useClass: PushNotificationService };
const $QueryService: Provider = { provide: 'QueryService', useClass: QueryService };
const $ReactionService: Provider = { provide: 'ReactionService', useClass: ReactionService };
const $RelayService: Provider = { provide: 'RelayService', useClass: RelayService };
const $S3Service: Provider = { provide: 'S3Service', useClass: S3Service };
const $SignupService: Provider = { provide: 'SignupService', useClass: SignupService };
const $TwoFactorAuthenticationService: Provider = { provide: 'TwoFactorAuthenticationService', useClass: TwoFactorAuthenticationService };
const $UserBlockingService: Provider = { provide: 'UserBlockingService', useClass: UserBlockingService };
const $UserCacheService: Provider = { provide: 'UserCacheService', useClass: UserCacheService };
const $UserFollowingService: Provider = { provide: 'UserFollowingService', useClass: UserFollowingService };
const $UserKeypairStoreService: Provider = { provide: 'UserKeypairStoreService', useClass: UserKeypairStoreService };
const $UserListService: Provider = { provide: 'UserListService', useClass: UserListService };
const $UserMutingService: Provider = { provide: 'UserMutingService', useClass: UserMutingService };
const $UserSuspendService: Provider = { provide: 'UserSuspendService', useClass: UserSuspendService };
const $VideoProcessingService: Provider = { provide: 'VideoProcessingService', useClass: VideoProcessingService };
const $WebhookService: Provider = { provide: 'WebhookService', useClass: WebhookService };
const $UtilityService: Provider = { provide: 'UtilityService', useClass: UtilityService };
const $FileInfoService: Provider = { provide: 'FileInfoService', useClass: FileInfoService };
const $FederationChart: Provider = { provide: 'FederationChart', useClass: FederationChart };
const $NotesChart: Provider = { provide: 'NotesChart', useClass: NotesChart };
const $UsersChart: Provider = { provide: 'UsersChart', useClass: UsersChart };
const $ActiveUsersChart: Provider = { provide: 'ActiveUsersChart', useClass: ActiveUsersChart };
const $InstanceChart: Provider = { provide: 'InstanceChart', useClass: InstanceChart };
const $PerUserNotesChart: Provider = { provide: 'PerUserNotesChart', useClass: PerUserNotesChart };
const $DriveChart: Provider = { provide: 'DriveChart', useClass: DriveChart };
const $PerUserReactionsChart: Provider = { provide: 'PerUserReactionsChart', useClass: PerUserReactionsChart };
const $HashtagChart: Provider = { provide: 'HashtagChart', useClass: HashtagChart };
const $PerUserFollowingChart: Provider = { provide: 'PerUserFollowingChart', useClass: PerUserFollowingChart };
const $PerUserDriveChart: Provider = { provide: 'PerUserDriveChart', useClass: PerUserDriveChart };
const $ApRequestChart: Provider = { provide: 'ApRequestChart', useClass: ApRequestChart };
const $ChartManagementService: Provider = { provide: 'ChartManagementService', useClass: ChartManagementService };
const $AccountUpdateService: Provider = { provide: 'AccountUpdateService', useExisting: AccountUpdateService };
const $AiService: Provider = { provide: 'AiService', useExisting: AiService };
const $AntennaService: Provider = { provide: 'AntennaService', useExisting: AntennaService };
const $AppLockService: Provider = { provide: 'AppLockService', useExisting: AppLockService };
const $CaptchaService: Provider = { provide: 'CaptchaService', useExisting: CaptchaService };
const $CreateNotificationService: Provider = { provide: 'CreateNotificationService', useExisting: CreateNotificationService };
const $CreateSystemUserService: Provider = { provide: 'CreateSystemUserService', useExisting: CreateSystemUserService };
const $CustomEmojiService: Provider = { provide: 'CustomEmojiService', useExisting: CustomEmojiService };
const $DeleteAccountService: Provider = { provide: 'DeleteAccountService', useExisting: DeleteAccountService };
const $DownloadService: Provider = { provide: 'DownloadService', useExisting: DownloadService };
const $DriveService: Provider = { provide: 'DriveService', useExisting: DriveService };
const $EmailService: Provider = { provide: 'EmailService', useExisting: EmailService };
const $FederatedInstanceService: Provider = { provide: 'FederatedInstanceService', useExisting: FederatedInstanceService };
const $FetchInstanceMetadataService: Provider = { provide: 'FetchInstanceMetadataService', useExisting: FetchInstanceMetadataService };
const $GlobalEventService: Provider = { provide: 'GlobalEventService', useExisting: GlobalEventService };
const $HashtagService: Provider = { provide: 'HashtagService', useExisting: HashtagService };
const $HttpRequestService: Provider = { provide: 'HttpRequestService', useExisting: HttpRequestService };
const $IdService: Provider = { provide: 'IdService', useExisting: IdService };
const $ImageProcessingService: Provider = { provide: 'ImageProcessingService', useExisting: ImageProcessingService };
const $InstanceActorService: Provider = { provide: 'InstanceActorService', useExisting: InstanceActorService };
const $InternalStorageService: Provider = { provide: 'InternalStorageService', useExisting: InternalStorageService };
const $MessagingService: Provider = { provide: 'MessagingService', useExisting: MessagingService };
const $MetaService: Provider = { provide: 'MetaService', useExisting: MetaService };
const $MfmService: Provider = { provide: 'MfmService', useExisting: MfmService };
const $ModerationLogService: Provider = { provide: 'ModerationLogService', useExisting: ModerationLogService };
const $NoteCreateService: Provider = { provide: 'NoteCreateService', useExisting: NoteCreateService };
const $NoteDeleteService: Provider = { provide: 'NoteDeleteService', useExisting: NoteDeleteService };
const $NotePiningService: Provider = { provide: 'NotePiningService', useExisting: NotePiningService };
const $NoteReadService: Provider = { provide: 'NoteReadService', useExisting: NoteReadService };
const $NotificationService: Provider = { provide: 'NotificationService', useExisting: NotificationService };
const $PollService: Provider = { provide: 'PollService', useExisting: PollService };
const $ProxyAccountService: Provider = { provide: 'ProxyAccountService', useExisting: ProxyAccountService };
const $PushNotificationService: Provider = { provide: 'PushNotificationService', useExisting: PushNotificationService };
const $QueryService: Provider = { provide: 'QueryService', useExisting: QueryService };
const $ReactionService: Provider = { provide: 'ReactionService', useExisting: ReactionService };
const $RelayService: Provider = { provide: 'RelayService', useExisting: RelayService };
const $S3Service: Provider = { provide: 'S3Service', useExisting: S3Service };
const $SignupService: Provider = { provide: 'SignupService', useExisting: SignupService };
const $TwoFactorAuthenticationService: Provider = { provide: 'TwoFactorAuthenticationService', useExisting: TwoFactorAuthenticationService };
const $UserBlockingService: Provider = { provide: 'UserBlockingService', useExisting: UserBlockingService };
const $UserCacheService: Provider = { provide: 'UserCacheService', useExisting: UserCacheService };
const $UserFollowingService: Provider = { provide: 'UserFollowingService', useExisting: UserFollowingService };
const $UserKeypairStoreService: Provider = { provide: 'UserKeypairStoreService', useExisting: UserKeypairStoreService };
const $UserListService: Provider = { provide: 'UserListService', useExisting: UserListService };
const $UserMutingService: Provider = { provide: 'UserMutingService', useExisting: UserMutingService };
const $UserSuspendService: Provider = { provide: 'UserSuspendService', useExisting: UserSuspendService };
const $VideoProcessingService: Provider = { provide: 'VideoProcessingService', useExisting: VideoProcessingService };
const $WebhookService: Provider = { provide: 'WebhookService', useExisting: WebhookService };
const $UtilityService: Provider = { provide: 'UtilityService', useExisting: UtilityService };
const $FileInfoService: Provider = { provide: 'FileInfoService', useExisting: FileInfoService };
const $FederationChart: Provider = { provide: 'FederationChart', useExisting: FederationChart };
const $NotesChart: Provider = { provide: 'NotesChart', useExisting: NotesChart };
const $UsersChart: Provider = { provide: 'UsersChart', useExisting: UsersChart };
const $ActiveUsersChart: Provider = { provide: 'ActiveUsersChart', useExisting: ActiveUsersChart };
const $InstanceChart: Provider = { provide: 'InstanceChart', useExisting: InstanceChart };
const $PerUserNotesChart: Provider = { provide: 'PerUserNotesChart', useExisting: PerUserNotesChart };
const $DriveChart: Provider = { provide: 'DriveChart', useExisting: DriveChart };
const $PerUserReactionsChart: Provider = { provide: 'PerUserReactionsChart', useExisting: PerUserReactionsChart };
const $HashtagChart: Provider = { provide: 'HashtagChart', useExisting: HashtagChart };
const $PerUserFollowingChart: Provider = { provide: 'PerUserFollowingChart', useExisting: PerUserFollowingChart };
const $PerUserDriveChart: Provider = { provide: 'PerUserDriveChart', useExisting: PerUserDriveChart };
const $ApRequestChart: Provider = { provide: 'ApRequestChart', useExisting: ApRequestChart };
const $ChartManagementService: Provider = { provide: 'ChartManagementService', useExisting: ChartManagementService };
const $AbuseUserReportEntityService: Provider = { provide: 'AbuseUserReportEntityService', useClass: AbuseUserReportEntityService };
const $AntennaEntityService: Provider = { provide: 'AntennaEntityService', useClass: AntennaEntityService };
const $AppEntityService: Provider = { provide: 'AppEntityService', useClass: AppEntityService };
const $AuthSessionEntityService: Provider = { provide: 'AuthSessionEntityService', useClass: AuthSessionEntityService };
const $BlockingEntityService: Provider = { provide: 'BlockingEntityService', useClass: BlockingEntityService };
const $ChannelEntityService: Provider = { provide: 'ChannelEntityService', useClass: ChannelEntityService };
const $ClipEntityService: Provider = { provide: 'ClipEntityService', useClass: ClipEntityService };
const $DriveFileEntityService: Provider = { provide: 'DriveFileEntityService', useClass: DriveFileEntityService };
const $DriveFolderEntityService: Provider = { provide: 'DriveFolderEntityService', useClass: DriveFolderEntityService };
const $EmojiEntityService: Provider = { provide: 'EmojiEntityService', useClass: EmojiEntityService };
const $FollowingEntityService: Provider = { provide: 'FollowingEntityService', useClass: FollowingEntityService };
const $FollowRequestEntityService: Provider = { provide: 'FollowRequestEntityService', useClass: FollowRequestEntityService };
const $GalleryLikeEntityService: Provider = { provide: 'GalleryLikeEntityService', useClass: GalleryLikeEntityService };
const $GalleryPostEntityService: Provider = { provide: 'GalleryPostEntityService', useClass: GalleryPostEntityService };
const $HashtagEntityService: Provider = { provide: 'HashtagEntityService', useClass: HashtagEntityService };
const $InstanceEntityService: Provider = { provide: 'InstanceEntityService', useClass: InstanceEntityService };
const $MessagingMessageEntityService: Provider = { provide: 'MessagingMessageEntityService', useClass: MessagingMessageEntityService };
const $ModerationLogEntityService: Provider = { provide: 'ModerationLogEntityService', useClass: ModerationLogEntityService };
const $MutingEntityService: Provider = { provide: 'MutingEntityService', useClass: MutingEntityService };
const $NoteEntityService: Provider = { provide: 'NoteEntityService', useClass: NoteEntityService };
const $NoteFavoriteEntityService: Provider = { provide: 'NoteFavoriteEntityService', useClass: NoteFavoriteEntityService };
const $NoteReactionEntityService: Provider = { provide: 'NoteReactionEntityService', useClass: NoteReactionEntityService };
const $NotificationEntityService: Provider = { provide: 'NotificationEntityService', useClass: NotificationEntityService };
const $PageEntityService: Provider = { provide: 'PageEntityService', useClass: PageEntityService };
const $PageLikeEntityService: Provider = { provide: 'PageLikeEntityService', useClass: PageLikeEntityService };
const $SigninEntityService: Provider = { provide: 'SigninEntityService', useClass: SigninEntityService };
const $UserEntityService: Provider = { provide: 'UserEntityService', useClass: UserEntityService };
const $UserGroupEntityService: Provider = { provide: 'UserGroupEntityService', useClass: UserGroupEntityService };
const $UserGroupInvitationEntityService: Provider = { provide: 'UserGroupInvitationEntityService', useClass: UserGroupInvitationEntityService };
const $UserListEntityService: Provider = { provide: 'UserListEntityService', useClass: UserListEntityService };
const $AbuseUserReportEntityService: Provider = { provide: 'AbuseUserReportEntityService', useExisting: AbuseUserReportEntityService };
const $AntennaEntityService: Provider = { provide: 'AntennaEntityService', useExisting: AntennaEntityService };
const $AppEntityService: Provider = { provide: 'AppEntityService', useExisting: AppEntityService };
const $AuthSessionEntityService: Provider = { provide: 'AuthSessionEntityService', useExisting: AuthSessionEntityService };
const $BlockingEntityService: Provider = { provide: 'BlockingEntityService', useExisting: BlockingEntityService };
const $ChannelEntityService: Provider = { provide: 'ChannelEntityService', useExisting: ChannelEntityService };
const $ClipEntityService: Provider = { provide: 'ClipEntityService', useExisting: ClipEntityService };
const $DriveFileEntityService: Provider = { provide: 'DriveFileEntityService', useExisting: DriveFileEntityService };
const $DriveFolderEntityService: Provider = { provide: 'DriveFolderEntityService', useExisting: DriveFolderEntityService };
const $EmojiEntityService: Provider = { provide: 'EmojiEntityService', useExisting: EmojiEntityService };
const $FollowingEntityService: Provider = { provide: 'FollowingEntityService', useExisting: FollowingEntityService };
const $FollowRequestEntityService: Provider = { provide: 'FollowRequestEntityService', useExisting: FollowRequestEntityService };
const $GalleryLikeEntityService: Provider = { provide: 'GalleryLikeEntityService', useExisting: GalleryLikeEntityService };
const $GalleryPostEntityService: Provider = { provide: 'GalleryPostEntityService', useExisting: GalleryPostEntityService };
const $HashtagEntityService: Provider = { provide: 'HashtagEntityService', useExisting: HashtagEntityService };
const $InstanceEntityService: Provider = { provide: 'InstanceEntityService', useExisting: InstanceEntityService };
const $MessagingMessageEntityService: Provider = { provide: 'MessagingMessageEntityService', useExisting: MessagingMessageEntityService };
const $ModerationLogEntityService: Provider = { provide: 'ModerationLogEntityService', useExisting: ModerationLogEntityService };
const $MutingEntityService: Provider = { provide: 'MutingEntityService', useExisting: MutingEntityService };
const $NoteEntityService: Provider = { provide: 'NoteEntityService', useExisting: NoteEntityService };
const $NoteFavoriteEntityService: Provider = { provide: 'NoteFavoriteEntityService', useExisting: NoteFavoriteEntityService };
const $NoteReactionEntityService: Provider = { provide: 'NoteReactionEntityService', useExisting: NoteReactionEntityService };
const $NotificationEntityService: Provider = { provide: 'NotificationEntityService', useExisting: NotificationEntityService };
const $PageEntityService: Provider = { provide: 'PageEntityService', useExisting: PageEntityService };
const $PageLikeEntityService: Provider = { provide: 'PageLikeEntityService', useExisting: PageLikeEntityService };
const $SigninEntityService: Provider = { provide: 'SigninEntityService', useExisting: SigninEntityService };
const $UserEntityService: Provider = { provide: 'UserEntityService', useExisting: UserEntityService };
const $UserGroupEntityService: Provider = { provide: 'UserGroupEntityService', useExisting: UserGroupEntityService };
const $UserGroupInvitationEntityService: Provider = { provide: 'UserGroupInvitationEntityService', useExisting: UserGroupInvitationEntityService };
const $UserListEntityService: Provider = { provide: 'UserListEntityService', useExisting: UserListEntityService };
const $ApAudienceService: Provider = { provide: 'ApAudienceService', useClass: ApAudienceService };
const $ApDbResolverService: Provider = { provide: 'ApDbResolverService', useClass: ApDbResolverService };
const $ApDeliverManagerService: Provider = { provide: 'ApDeliverManagerService', useClass: ApDeliverManagerService };
const $ApInboxService: Provider = { provide: 'ApInboxService', useClass: ApInboxService };
const $ApLoggerService: Provider = { provide: 'ApLoggerService', useClass: ApLoggerService };
const $ApMfmService: Provider = { provide: 'ApMfmService', useClass: ApMfmService };
const $ApRendererService: Provider = { provide: 'ApRendererService', useClass: ApRendererService };
const $ApRequestService: Provider = { provide: 'ApRequestService', useClass: ApRequestService };
const $ApResolverService: Provider = { provide: 'ApResolverService', useClass: ApResolverService };
const $LdSignatureService: Provider = { provide: 'LdSignatureService', useClass: LdSignatureService };
const $RemoteLoggerService: Provider = { provide: 'RemoteLoggerService', useClass: RemoteLoggerService };
const $ResolveUserService: Provider = { provide: 'ResolveUserService', useClass: ResolveUserService };
const $WebfingerService: Provider = { provide: 'WebfingerService', useClass: WebfingerService };
const $ApImageService: Provider = { provide: 'ApImageService', useClass: ApImageService };
const $ApMentionService: Provider = { provide: 'ApMentionService', useClass: ApMentionService };
const $ApNoteService: Provider = { provide: 'ApNoteService', useClass: ApNoteService };
const $ApPersonService: Provider = { provide: 'ApPersonService', useClass: ApPersonService };
const $ApQuestionService: Provider = { provide: 'ApQuestionService', useClass: ApQuestionService };
const $ApAudienceService: Provider = { provide: 'ApAudienceService', useExisting: ApAudienceService };
const $ApDbResolverService: Provider = { provide: 'ApDbResolverService', useExisting: ApDbResolverService };
const $ApDeliverManagerService: Provider = { provide: 'ApDeliverManagerService', useExisting: ApDeliverManagerService };
const $ApInboxService: Provider = { provide: 'ApInboxService', useExisting: ApInboxService };
const $ApLoggerService: Provider = { provide: 'ApLoggerService', useExisting: ApLoggerService };
const $ApMfmService: Provider = { provide: 'ApMfmService', useExisting: ApMfmService };
const $ApRendererService: Provider = { provide: 'ApRendererService', useExisting: ApRendererService };
const $ApRequestService: Provider = { provide: 'ApRequestService', useExisting: ApRequestService };
const $ApResolverService: Provider = { provide: 'ApResolverService', useExisting: ApResolverService };
const $LdSignatureService: Provider = { provide: 'LdSignatureService', useExisting: LdSignatureService };
const $RemoteLoggerService: Provider = { provide: 'RemoteLoggerService', useExisting: RemoteLoggerService };
const $ResolveUserService: Provider = { provide: 'ResolveUserService', useExisting: ResolveUserService };
const $WebfingerService: Provider = { provide: 'WebfingerService', useExisting: WebfingerService };
const $ApImageService: Provider = { provide: 'ApImageService', useExisting: ApImageService };
const $ApMentionService: Provider = { provide: 'ApMentionService', useExisting: ApMentionService };
const $ApNoteService: Provider = { provide: 'ApNoteService', useExisting: ApNoteService };
const $ApPersonService: Provider = { provide: 'ApPersonService', useExisting: ApPersonService };
const $ApQuestionService: Provider = { provide: 'ApQuestionService', useExisting: ApQuestionService };
//#endregion
@Module({