mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-11 11:58:41 +00:00
- [x] separates modules into `fundamental`, `core`, `plugins`
- [x] optional modules with `@OptionalModule` decorator to install modules with requirements met(`requires`, `if`)
- [x] `module.contributesTo` defines optional features that will be enabled if module registered
- [x] `AFFiNE.plugins.use('payment', {})` to enable a optional/plugin module
- [x] `PaymentModule` is the first plugin module
- [x] GraphQLSchema will not be generated for non-included modules
- [x] Frontend can use `ServerConfigType` query to detect which features are enabled
- [x] override existing provider globally
25 lines
620 B
TypeScript
25 lines
620 B
TypeScript
import { Module } from '@nestjs/common';
|
|
|
|
import { AppModule as BusinessAppModule } from '../app.module';
|
|
import { ConfigModule } from '../fundamentals/config';
|
|
import { CreateCommand, NameQuestion } from './commands/create';
|
|
import { RevertCommand, RunCommand } from './commands/run';
|
|
|
|
@Module({
|
|
imports: [
|
|
ConfigModule.forRoot({
|
|
doc: {
|
|
manager: {
|
|
enableUpdateAutoMerging: false,
|
|
},
|
|
},
|
|
metrics: {
|
|
enabled: false,
|
|
},
|
|
}),
|
|
BusinessAppModule,
|
|
],
|
|
providers: [NameQuestion, CreateCommand, RunCommand, RevertCommand],
|
|
})
|
|
export class CliAppModule {}
|