forte-cli 0.4.3

CLI for the Forte fullstack web framework
use anyhow::Result;
use std::path::PathBuf;

use super::project_config::read_project_id;

pub async fn run(project_dir: PathBuf, print: bool) -> Result<()> {
    let project_id = read_project_id(&project_dir)?;
    let resolved = fn0_deploy::resolve_app_url(&project_id).await?;

    if let Some(note) = &resolved.note {
        eprintln!("note: {note}");
    }
    println!("{}", resolved.url);

    if !print {
        open::that_detached(&resolved.url)?;
    }
    Ok(())
}