Skip to content

Commit 99456d5

Browse files
committed
feat(webserver): add hidden HTTP command bridge
1 parent 69dfa2f commit 99456d5

4 files changed

Lines changed: 275 additions & 9 deletions

File tree

Cargo.lock

Lines changed: 40 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ tracing-subscriber = { version = "0.3", features = ["env-filter", "json"] }
3737
iocraft = "0.7.18"
3838
urlencoding = "2.1"
3939
uuid = { version = "1.22", features = ["v4"] }
40+
tiny_http = "0.12"
4041

4142
[dev-dependencies]
4243
insta = "1.46"

src/commands/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ pub mod someday;
1818
pub mod tags;
1919
pub mod today;
2020
pub mod upcoming;
21+
pub mod webserver;
2122

2223
use anyhow::Result;
2324
use clap::{Args, Subcommand};
@@ -122,6 +123,8 @@ pub enum Commands {
122123
Find(find::FindArgs),
123124
#[command(hide = true, about = "Generate shell completion scripts")]
124125
Completions(completions::CompletionsArgs),
126+
#[command(hide = true, about = "Run internal HTTP bridge server")]
127+
Webserver(webserver::WebserverArgs),
125128
}
126129

127130
impl Command for Commands {
@@ -152,6 +155,7 @@ impl Command for Commands {
152155
Commands::SetAuth(args) => args.run_with_ctx(cli, out, ctx),
153156
Commands::Find(args) => args.run_with_ctx(cli, out, ctx),
154157
Commands::Completions(args) => args.run_with_ctx(cli, out, ctx),
158+
Commands::Webserver(args) => args.run_with_ctx(cli, out, ctx),
155159
}
156160
}
157161
}

0 commit comments

Comments
 (0)