Refactor services to extend BaseService for improved structure and dependency management

- Update AuthService and RelayHub to extend BaseService, introducing standardized initialization and metadata handling.
- Implement service-specific initialization methods in both services, enhancing error handling and logging.
- Modify NostrmarketService to inherit from BaseService, ensuring consistent dependency management and initialization.
- Refactor market module to dynamically import NostrmarketService, improving service registration and initialization flow.
- Enhance debug logging across services for better traceability during initialization and operation.
This commit is contained in:
padreug 2025-09-05 06:41:19 +02:00
parent 8d4c389f71
commit dc4da570a7
5 changed files with 151 additions and 50 deletions

View file

@ -33,7 +33,10 @@ export const baseModule: ModulePlugin = {
// Initialize core services
await relayHub.initialize(options?.config?.nostr?.relays || [])
await auth.initialize()
await auth.initialize({
waitForDependencies: false, // Auth has no dependencies
maxRetries: 1
})
console.log('✅ Base module installed successfully')
},