xecute-cli 0.1.3

NestJS-style project and resource generator for Xecute
//! Root dependency-injection module and generated resource registrations.
//! Keep the xecute markers intact so CLI generators can register new modules.

use axum::Router;
use xecute::{InjectError, ModuleGraph, module};
// xecute:modules

/// Root application dependency-injection boundary.
#[module(imports = [
    // xecute:imports
])]
pub struct AppModule;

impl AppModule {
    /// Resolve registered controllers and compose their HTTP routes.
    pub fn router() -> Result<Router, InjectError> {
        let container = ModuleGraph::new(vec![
            Self::definition(),
            // xecute:definitions
        ])
        .build()?;
        let _ = &container;
        let router = Router::new();
        // xecute:routes
        Ok(router)
    }
}