hni 0.0.1-alpha-2

ni-compatible package manager command router with node shim
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::core::{
    error::{HniError, HniResult},
    resolve,
    resolve::ResolveContext,
    types::ResolvedExecution,
};

pub fn handle(args: Vec<String>, ctx: &ResolveContext) -> HniResult<Option<ResolvedExecution>> {
    if args.is_empty() {
        return Err(HniError::execution(
            "nlx requires a command to execute.\nTry: nlx create-vite@latest",
        ));
    }

    Ok(Some(resolve::resolve_nlx(args, ctx)?))
}