mirror of
https://github.com/unraid/api.git
synced 2026-02-05 23:48:59 -06:00
Reorganizes files, but keeps logic (and Nest dependency relationships) unchanged. * **Documentation** * Update README to reflect the new directory structure. * **Refactor** * Update import paths to match the new feature-based directory structure. * Rename `SystemModule` to `NetworkModule` for smaller scope and increased clarity. * Reorganize source code into directories of feature-related concerns. * **Chores** * Delete unused demo configuration and related code for a cleaner codebase. * **Other** * No functional changes to end-user features or behaviors.
27 lines
935 B
TypeScript
27 lines
935 B
TypeScript
import { Inject, Logger, Module } from '@nestjs/common';
|
|
import { ConfigModule, ConfigService } from '@nestjs/config';
|
|
|
|
import { ConnectConfigPersister } from './config/config.persistence.js';
|
|
import { configFeature } from './config/connect.config.js';
|
|
import { MothershipModule } from './mothership-proxy/mothership.module.js';
|
|
import { ConnectModule } from './unraid-connect/connect.module.js';
|
|
|
|
export const adapter = 'nestjs';
|
|
|
|
@Module({
|
|
imports: [ConfigModule.forFeature(configFeature), ConnectModule, MothershipModule],
|
|
providers: [ConnectConfigPersister],
|
|
exports: [],
|
|
})
|
|
class ConnectPluginModule {
|
|
logger = new Logger(ConnectPluginModule.name);
|
|
|
|
constructor(@Inject(ConfigService) private readonly configService: ConfigService) {}
|
|
|
|
onModuleInit() {
|
|
this.logger.log('Connect plugin initialized with %o', this.configService.get('connect'));
|
|
}
|
|
}
|
|
|
|
export const ApiModule = ConnectPluginModule;
|