fix issues reported by coderabbit74bf3a615 days ago45 lines · 2.2 KB | 1 | import { MiddlewareConsumer, Module, NestModule } from '@nestjs/common'; |
| 2 | |
| 3 | import { MaterializerModule } |
| 4 | import { PackProcessService } |
| 5 | import { RefAdvertisementService } |
| 6 | import { RepositoryStorageService } |
| 7 | import { RepositoryContributionService } |
| 8 | import { PushTransactionService } |
| 9 | import { WalStoreService } |
| 10 | import { S3Service } |
| 11 | import { RepositoryAccessService } |
| 12 | import { SshServerService } |
| 13 | import { SshKeysModule } |
| 14 | import { IssuesModule } |
| 15 | import { GitController } |
| 16 | import { GIT_PACK_ROUTES, GIT_TRANSPORT_ROUTES |
| 17 | import { GitRawBodyMiddleware } |
| 18 | import { GitService } |
| 19 | import { CodeSearchService } |
| 20 | import { GitBasicAuthMiddleware } |
| 21 | |
| 22 | @Module({ |
| 23 | imports: [MaterializerModule, |
| 24 | controllers: [GitController], |
| 25 | providers: [ |
| 26 | GitService, |
| 27 | PackProcessService, |
| 28 | RefAdvertisementService, |
| 29 | RepositoryStorageService, |
| 30 | RepositoryContributionService, |
| 31 | CodeSearchService, |
| 32 | PushTransactionService, |
| 33 | WalStoreService, |
| 34 | S3Service, |
| 35 | RepositoryAccessService, |
| 36 | GitBasicAuthMiddleware, |
| 37 | SshServerService, |
| 38 | ], |
| 39 | }) |
| 40 | export class GitModule |
| 41 | configure(consumer: |
| 42 | consumer.apply(GitBasicAuthMiddleware |
| 43 | consumer.apply(GitRawBodyMiddleware |
| 44 | } |
| 45 | } |
from
'
../materializer/materializer.module.js
'
;
from
'
../services/git/pack-process/pack-process.service.js
'
;
from
'
../services/git/ref-advertisement/ref-advertisement.service.js
'
;
from
'
../services/git/repository-storage/repository-storage.service.js
'
;
from
'
../services/git/contributions/repository-contribution.service.js
'
;
from
'
../services/git/wal/push-transaction.service.js
'
;
from
'
../services/git/wal/wal-store.service.js
'
;
from
'
../services/s3/s3.service.js
'
;
from
'
../services/git/repository-access/repository-access.service.js
'
;
from
'
../services/git/ssh/ssh-server.service.js
'
;
from
'
../resources/ssh-keys/ssh-keys.module.js
'
;
from
'
../resources/issues/issues.module.js
'
;
from
'
./git.controller.js
'
;
}
from
'
./git.constants.js
'
;
from
'
./middleware/git-raw-body.middleware.js
'
;
from
'
./git.service.js
'
;
from
'
../services/git/code-search/code-search.service.js
'
;
from
'
./middleware/git-basic-auth/git-basic-auth.middleware.js
'
;
SshKeysModule
,
IssuesModule
]
,
implements
NestModule
{
MiddlewareConsumer
)
{
)
.
forRoutes
(
...
GIT_TRANSPORT_ROUTES
)
;
)
.
forRoutes
(
...
GIT_PACK_ROUTES
)
;