mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-09-22 19:53:48 +08:00
refactor(server): plugin modules (#5630)
- [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
This commit is contained in:
@@ -3,15 +3,15 @@
|
||||
import { TestingModule } from '@nestjs/testing';
|
||||
import ava, { type TestFn } from 'ava';
|
||||
|
||||
import { AuthService } from '../src/modules/auth';
|
||||
import { AuthService } from '../src/core/auth';
|
||||
import {
|
||||
QuotaManagementService,
|
||||
QuotaModule,
|
||||
Quotas,
|
||||
QuotaService,
|
||||
QuotaType,
|
||||
} from '../src/modules/quota';
|
||||
import { StorageModule } from '../src/modules/storage';
|
||||
} from '../src/core/quota';
|
||||
import { StorageModule } from '../src/core/storage';
|
||||
import { createTestingModule } from './utils';
|
||||
|
||||
const test = ava as TestFn<{
|
||||
|
||||
Reference in New Issue
Block a user