Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependency Injection #9085

Merged
merged 185 commits into from
Sep 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
185 commits
Select commit Hold shift + click to select a range
26cdacb
wip
syuilo Sep 6, 2022
7e98af5
wip
syuilo Sep 7, 2022
9362e35
Merge branch 'develop' into di
syuilo Sep 8, 2022
a1ca7d1
Merge branch 'jest' into di
syuilo Sep 8, 2022
01df97d
wip
syuilo Sep 8, 2022
defa821
wip
syuilo Sep 9, 2022
2a92432
Merge branch 'jest' of https://github.com/misskey-dev/misskey into di
syuilo Sep 10, 2022
9b9a11b
wip
syuilo Sep 10, 2022
5b54fe4
Update chart.ts
syuilo Sep 10, 2022
4e90b74
wip
syuilo Sep 10, 2022
7586788
Merge branch 'jest' of https://github.com/misskey-dev/misskey into di
syuilo Sep 10, 2022
5ac68fb
wip
syuilo Sep 10, 2022
0e44278
Merge branch 'jest' of https://github.com/misskey-dev/misskey into di
syuilo Sep 10, 2022
6b30a62
wip
syuilo Sep 10, 2022
2fd506c
wip
syuilo Sep 11, 2022
c20f26c
wip
syuilo Sep 11, 2022
2cb4425
wip
syuilo Sep 11, 2022
f7499fc
wip
syuilo Sep 11, 2022
467e0fe
wip
syuilo Sep 11, 2022
8cc44cd
Update resolver.ts
syuilo Sep 11, 2022
a8be7e6
wip
syuilo Sep 11, 2022
5c56817
wip
syuilo Sep 11, 2022
943a6f8
wip
syuilo Sep 11, 2022
607220f
wip
syuilo Sep 11, 2022
7cc1908
wip
syuilo Sep 11, 2022
050deee
wip
syuilo Sep 11, 2022
f42ff47
Update AppLockService.ts
syuilo Sep 11, 2022
cd287ff
wip
syuilo Sep 11, 2022
836be94
wip
syuilo Sep 11, 2022
a613007
wip
syuilo Sep 11, 2022
a6d1bb0
wip
syuilo Sep 11, 2022
b8c50ec
wip
syuilo Sep 11, 2022
d2d593b
wip
syuilo Sep 11, 2022
e8ce817
wip
syuilo Sep 11, 2022
41349a7
wip
syuilo Sep 11, 2022
ca61948
wip
syuilo Sep 11, 2022
cdc44d5
wip
syuilo Sep 12, 2022
e96029c
wip
syuilo Sep 12, 2022
946a2a9
wip
syuilo Sep 12, 2022
5a7fcc8
wip
syuilo Sep 12, 2022
10e1431
wip
syuilo Sep 12, 2022
e754190
wip
syuilo Sep 12, 2022
9fd72cb
wip
syuilo Sep 12, 2022
ecb0e6b
wip
syuilo Sep 12, 2022
0fb812e
wip
syuilo Sep 12, 2022
c64966b
wip
syuilo Sep 12, 2022
dd1a108
wip
syuilo Sep 12, 2022
e5c64dc
Update ApRequestService.ts
syuilo Sep 12, 2022
b7c156f
Update HttpRequestService.ts
syuilo Sep 12, 2022
9248494
wip
syuilo Sep 12, 2022
bc46be3
wip
syuilo Sep 12, 2022
1fc76ec
wip
syuilo Sep 12, 2022
e2ce8df
Update ApInboxService.ts
syuilo Sep 12, 2022
91c8433
Update resolver.ts
syuilo Sep 12, 2022
e097ab2
wip
syuilo Sep 12, 2022
eb99014
wip
syuilo Sep 12, 2022
a537c9a
wip
syuilo Sep 12, 2022
57f5a80
wip
syuilo Sep 12, 2022
50f9329
wip
syuilo Sep 13, 2022
a1e2af8
wip
syuilo Sep 13, 2022
130442b
wip
syuilo Sep 13, 2022
d954756
wip
syuilo Sep 13, 2022
fbad838
wip
syuilo Sep 13, 2022
ccf67eb
wip
syuilo Sep 13, 2022
00baf2e
wip
syuilo Sep 13, 2022
1af4a07
wip
syuilo Sep 13, 2022
059537c
wip
syuilo Sep 13, 2022
2477ca8
Update ApInboxService.ts
syuilo Sep 13, 2022
a5d8790
wip
syuilo Sep 13, 2022
20dc752
wip
syuilo Sep 13, 2022
70b637a
wip
syuilo Sep 13, 2022
fee749b
wip
syuilo Sep 13, 2022
fd087b5
wip
syuilo Sep 13, 2022
add33c6
wip
syuilo Sep 13, 2022
354e4b6
Update ApPersonService.ts
syuilo Sep 13, 2022
ec579d9
Update ApPersonService.ts
syuilo Sep 13, 2022
c444831
wip
syuilo Sep 13, 2022
304fcb5
wip
syuilo Sep 13, 2022
aed72c5
wip
syuilo Sep 13, 2022
36d664b
wip
syuilo Sep 13, 2022
4d91bc4
wip
syuilo Sep 13, 2022
c3ec889
wip
syuilo Sep 13, 2022
eb3209c
wip
syuilo Sep 13, 2022
d507abe
wip
syuilo Sep 13, 2022
d3a2f4e
wip
syuilo Sep 13, 2022
f6cb8fc
wip
syuilo Sep 13, 2022
1f1255b
wip
syuilo Sep 13, 2022
36a11d5
wip
syuilo Sep 13, 2022
54d4660
wip
syuilo Sep 13, 2022
625a541
wip
syuilo Sep 14, 2022
66a568a
wip
syuilo Sep 14, 2022
9ffb5b6
wip
syuilo Sep 14, 2022
9e04003
wip
syuilo Sep 14, 2022
079a729
wip
syuilo Sep 14, 2022
5cc87c2
wip
syuilo Sep 14, 2022
55e0d53
wip
syuilo Sep 14, 2022
25838f8
wip
syuilo Sep 14, 2022
88b6d86
wip
syuilo Sep 14, 2022
908e558
wip
syuilo Sep 14, 2022
b18490a
wip
syuilo Sep 14, 2022
ea4678d
Update show.ts
syuilo Sep 14, 2022
21b2015
wip
syuilo Sep 14, 2022
8da6c74
wip
syuilo Sep 14, 2022
7d0df81
wip
syuilo Sep 14, 2022
2c17957
wip
syuilo Sep 14, 2022
216957d
wip
syuilo Sep 14, 2022
d8c5982
wip
syuilo Sep 14, 2022
e722f1d
Update index.ts
syuilo Sep 14, 2022
d30d293
wip
syuilo Sep 14, 2022
c618070
wip
syuilo Sep 14, 2022
657192c
wipo
syuilo Sep 14, 2022
c814c7c
wip
syuilo Sep 14, 2022
50603d5
wip
syuilo Sep 14, 2022
d9b45d6
wip
syuilo Sep 15, 2022
169552b
wip
syuilo Sep 15, 2022
7890b3b
wip
syuilo Sep 15, 2022
c4bc058
wip
syuilo Sep 15, 2022
a7156bc
wip
syuilo Sep 15, 2022
fd14ecb
wip
syuilo Sep 15, 2022
adccfda
wip
syuilo Sep 15, 2022
f1b3007
wip
syuilo Sep 15, 2022
e646b9d
wip
syuilo Sep 15, 2022
0b68fc7
wip
syuilo Sep 15, 2022
b92da09
wip
syuilo Sep 15, 2022
3daebca
wip
syuilo Sep 15, 2022
20a7be1
wip
syuilo Sep 15, 2022
5bc95ee
wip
syuilo Sep 15, 2022
7f88cbe
wip
syuilo Sep 15, 2022
55f393f
wip
syuilo Sep 15, 2022
74de42b
wip
syuilo Sep 15, 2022
ed1d74a
wip
syuilo Sep 15, 2022
ca8abfc
wip
syuilo Sep 15, 2022
8058cc9
wip
syuilo Sep 15, 2022
f21613c
wip
syuilo Sep 15, 2022
92710a4
wip
syuilo Sep 15, 2022
b5cb435
o
syuilo Sep 15, 2022
7819cdf
a
syuilo Sep 15, 2022
f78a33e
wip
syuilo Sep 15, 2022
737cdef
Update app.module.ts
syuilo Sep 15, 2022
ec2b08b
wip
syuilo Sep 15, 2022
f14914e
wip
syuilo Sep 15, 2022
b01906f
Update index.ts
syuilo Sep 15, 2022
4cfd0d9
wip
syuilo Sep 15, 2022
2e793b0
wip
syuilo Sep 15, 2022
d036c9f
Update NodeinfoServerService.ts
syuilo Sep 15, 2022
cae8b76
wip
syuilo Sep 15, 2022
f9127e8
wip
syuilo Sep 16, 2022
fe126f5
wip
syuilo Sep 16, 2022
8bad44d
wip
syuilo Sep 16, 2022
80bd586
Update DownloadService.ts
syuilo Sep 16, 2022
99c0d35
Update VideoProcessingService.ts
syuilo Sep 16, 2022
13041c4
Update MessagingService.ts
syuilo Sep 16, 2022
a26b7e0
Update MessagingService.ts
syuilo Sep 16, 2022
a8950f0
wip
syuilo Sep 16, 2022
0629504
Update timeline.ts
syuilo Sep 16, 2022
4e36e5f
Update NoteCreateService.ts
syuilo Sep 16, 2022
7490197
Update update.ts
syuilo Sep 16, 2022
3cbe560
Update upload-from-url.ts
syuilo Sep 16, 2022
c0c4587
Update update.ts
syuilo Sep 16, 2022
dc96a44
wip
syuilo Sep 16, 2022
d2d67cd
Update messages.ts
syuilo Sep 16, 2022
cab46f8
Update messaging.ts
syuilo Sep 16, 2022
57a0dfc
Update search.ts
syuilo Sep 16, 2022
16dafb2
Update timeline.ts
syuilo Sep 16, 2022
d03066e
Update state.ts
syuilo Sep 16, 2022
fa2a086
Update config.ts
syuilo Sep 16, 2022
dd5e3a5
wip
syuilo Sep 16, 2022
2647e5c
wip
syuilo Sep 16, 2022
99f2c76
wip
syuilo Sep 16, 2022
c762a4d
Update CoreModule.ts
syuilo Sep 16, 2022
4b47451
wip
syuilo Sep 16, 2022
567b4ac
Update ServerModule.ts
syuilo Sep 16, 2022
80935d2
wip
syuilo Sep 16, 2022
5ddf4ec
Update ServerService.ts
syuilo Sep 16, 2022
ede750e
Update EndpointsModule.ts
syuilo Sep 16, 2022
7079fee
wip
syuilo Sep 16, 2022
25b5bcd
Update QueueProcessorModule.ts
syuilo Sep 16, 2022
2591f4d
wip
syuilo Sep 16, 2022
6950677
wip
syuilo Sep 16, 2022
9e68e2d
:rocket:
syuilo Sep 16, 2022
889a7e3
:accept:
syuilo Sep 16, 2022
de47bc9
Update HttpRequestService.ts
syuilo Sep 16, 2022
69c3503
:v:
syuilo Sep 16, 2022
a43d541
:sparkles:
syuilo Sep 16, 2022
244ee18
:100:
syuilo Sep 16, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 3 additions & 1 deletion packages/backend/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"main": "./index.js",
"private": true,
"type": "module",
"scripts": {
Expand All @@ -25,6 +24,8 @@
"@koa/cors": "3.1.0",
"@koa/multer": "3.0.0",
"@koa/router": "9.0.1",
"@nestjs/common": "9.0.11",
"@nestjs/core": "9.0.11",
"@peertube/http-signature": "1.7.0",
"@sinonjs/fake-timers": "9.1.2",
"@syuilo/aiscript": "0.11.1",
Expand Down Expand Up @@ -98,6 +99,7 @@
"rename": "1.0.4",
"rndstr": "1.0.0",
"rss-parser": "3.12.0",
"rxjs": "7.5.6",
"s-age": "1.1.2",
"sanitize-html": "2.7.1",
"semver": "7.3.7",
Expand Down
17 changes: 17 additions & 0 deletions packages/backend/src/AppModule.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { Module } from '@nestjs/common';
import { QueueModule } from '@/services/queue/QueueModule.js';
import { CoreModule } from './services/CoreModule.js';
import { ServerModule } from './server/ServerModule.js';
import { GlobalModule } from './GlobalModule.js';
import { QueueProcessorModule } from './queue/QueueProcessorModule.js';

@Module({
imports: [
GlobalModule,
CoreModule,
QueueModule,
ServerModule,
QueueProcessorModule,
],
})
export class AppModule {}
35 changes: 35 additions & 0 deletions packages/backend/src/GlobalModule.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import { Global, Module } from '@nestjs/common';
import { DI } from './di-symbols.js';
import { loadConfig } from './config.js';
import { db } from './db/postgre.js';
import { redisClient, redisSubscriber } from './db/redis.js';
import { RepositoryModule } from './RepositoryModule.js';
import type { Provider } from '@nestjs/common';

const $config: Provider = {
provide: DI.config,
useValue: loadConfig(),
};

const $db: Provider = {
provide: DI.db,
useValue: db,
};

const $redis: Provider = {
provide: DI.redis,
useValue: redisClient,
};

const $redisSubscriber: Provider = {
provide: DI.redisSubscriber,
useValue: redisSubscriber,
};

@Global()
@Module({
imports: [RepositoryModule],
providers: [$config, $db, $redis, $redisSubscriber],
exports: [$config, $db, $redis, $redisSubscriber, RepositoryModule],
})
export class GlobalModule {}
Loading