fix stream env
Some checks are pending
Deploy ailog / build-and-deploy (push) Waiting to run

This commit is contained in:
2025-06-12 19:59:19 +09:00
parent acce1d5af3
commit 5ce03098bd
6 changed files with 304 additions and 11 deletions

View File

@ -85,6 +85,11 @@ enum Commands {
#[command(subcommand)]
command: StreamCommands,
},
/// OAuth app management
Oauth {
#[command(subcommand)]
command: OauthCommands,
},
}
#[derive(Subcommand)]
@ -101,6 +106,8 @@ enum AuthCommands {
enum StreamCommands {
/// Start monitoring ATProto streams
Start {
/// Path to the blog project directory
project_dir: Option<PathBuf>,
/// Run as daemon
#[arg(short, long)]
daemon: bool,
@ -113,6 +120,15 @@ enum StreamCommands {
Test,
}
#[derive(Subcommand)]
enum OauthCommands {
/// Build OAuth app
Build {
/// Path to the blog project directory
project_dir: PathBuf,
},
}
#[tokio::main]
async fn main() -> Result<()> {
let cli = Cli::parse();
@ -159,8 +175,8 @@ async fn main() -> Result<()> {
}
Commands::Stream { command } => {
match command {
StreamCommands::Start { daemon } => {
commands::stream::start(daemon).await?;
StreamCommands::Start { project_dir, daemon } => {
commands::stream::start(project_dir, daemon).await?;
}
StreamCommands::Stop => {
commands::stream::stop().await?;
@ -173,6 +189,13 @@ async fn main() -> Result<()> {
}
}
}
Commands::Oauth { command } => {
match command {
OauthCommands::Build { project_dir } => {
commands::oauth::build(project_dir).await?;
}
}
}
}
Ok(())