Cover admin events, notifications, reviews, search VOs, listings (property, media, events, price/geo/address VOs), auth events, payment events, subscription events, and analytics events. Raises domain test coverage from ~24% to ~75%. Co-Authored-By: Paperclip <noreply@paperclip.ing>
32 lines
1.0 KiB
TypeScript
32 lines
1.0 KiB
TypeScript
import { Module, type DynamicModule, type Provider } from '@nestjs/common';
|
|
import { McpRegistryService } from './mcp-registry.service';
|
|
import { McpTransportController } from './mcp-transport.controller';
|
|
import { MCP_MODULE_OPTIONS } from './mcp.constants';
|
|
|
|
export interface McpModuleOptions {
|
|
aiServiceBaseUrl: string;
|
|
typesenseCollectionName?: string;
|
|
/** When true, the built-in McpTransportController is NOT registered — useful when the host app provides its own authenticated controller. */
|
|
skipDefaultController?: boolean;
|
|
}
|
|
|
|
export { MCP_MODULE_OPTIONS };
|
|
|
|
@Module({})
|
|
export class McpModule {
|
|
static forRoot(options: McpModuleOptions): DynamicModule {
|
|
const optionsProvider: Provider = {
|
|
provide: MCP_MODULE_OPTIONS,
|
|
useValue: options,
|
|
};
|
|
|
|
return {
|
|
module: McpModule,
|
|
controllers: options.skipDefaultController ? [] : [McpTransportController],
|
|
providers: [optionsProvider, McpRegistryService],
|
|
exports: [McpRegistryService],
|
|
global: false,
|
|
};
|
|
}
|
|
}
|