don't
5
fork

Configure Feed

Select the types of activity you want to include in your feed.

refactor: cleanup-up cli

Signed-off-by: tjh <did:plc:65gha4t3avpfpzmvpbwovss7>

+38 -19
+2
crates/identity/Cargo.toml
··· 2 2 name = "identity" 3 3 version.workspace = true 4 4 authors.workspace = true 5 + repository.workspace = true 6 + license.workspace = true 5 7 edition.workspace = true 6 8 publish.workspace = true 7 9
+4 -1
crates/knot/Cargo.toml
··· 1 1 [package] 2 2 name = "knot" 3 + description = "An alternative Tangled knot-server" 3 4 version.workspace = true 4 - edition.workspace = true 5 5 authors.workspace = true 6 + repository.workspace = true 7 + license.workspace = true 8 + edition.workspace = true 6 9 publish.workspace = true 7 10 8 11 [dependencies]
+28 -16
crates/knot/src/cli.rs
··· 3 3 use std::{path::PathBuf, str::FromStr}; 4 4 5 5 #[derive(Debug, Parser)] 6 + #[command(about, author, version)] 6 7 pub struct Arguments { 7 - /// Address(s) to bind the public API. 8 + /// Knot-server FQDN. 9 + #[arg(long, short, env = "KNOT_SERVER_NAME")] 10 + pub name: String, 11 + 12 + /// Knot-owner handle or DID. 13 + #[arg(long, short, env = "KNOT_SERVER_OWNER")] 14 + pub owner: HandleOrDid, 15 + 16 + /// Base path for repositories. 8 17 #[arg( 9 18 long, 10 19 short, 20 + env = "KNOT_SERVER_BASE", 21 + default_value = default_repository_base().into_os_string() 22 + )] 23 + pub repos: PathBuf, 24 + 25 + /// Public API address(s). 26 + #[arg( 27 + long, 28 + short = 'A', 11 29 env = "KNOT_SERVER_ADDR", 12 30 default_value = "localhost:5556" 13 31 )] 14 32 pub addr: Vec<String>, 15 33 16 - /// FQDN of the knot server. 17 - #[arg(long, env = "KNOT_SERVER_NAME")] 18 - pub name: String, 19 - 20 - /// DID or handle of the knot server owner. 21 - #[arg(long, env = "KNOT_SERVER_OWNER")] 22 - pub owner: HandleOrDid, 23 - 24 - /// Base directory to serve repositories from. 25 - #[arg(long, env = "KNOT_SERVER_BASE", default_value = default_repository_base().into_os_string())] 26 - pub repos: PathBuf, 27 - 28 - /// Port number for the real knotserver. 29 - #[arg(long, env = "KNOT_SERVER_UPSTREAM")] 34 + /// Port number of the real knot-server. 35 + #[arg(long, short = 'U', env = "KNOT_SERVER_UPSTREAM")] 30 36 pub upstream_port: Option<u16>, 31 37 } 32 38 33 39 fn default_repository_base() -> PathBuf { 34 - std::env::current_dir().unwrap_or_default() 40 + match std::env::current_dir() { 41 + Ok(path) => path, 42 + Err(error) => { 43 + tracing::error!(?error, "failed to read current working directory"); 44 + PathBuf::from(".") 45 + } 46 + } 35 47 } 36 48 37 49 pub fn parse() -> Arguments {
+1 -1
crates/service_auth/Cargo.toml
··· 1 1 [package] 2 2 name = "service_auth" 3 3 version.workspace = true 4 - edition.workspace = true 5 4 authors.workspace = true 6 5 repository.workspace = true 7 6 license.workspace = true 7 + edition.workspace = true 8 8 publish.workspace = true 9 9 10 10 [dependencies]
+2
crates/xrpc/Cargo.toml
··· 2 2 name = "xrpc" 3 3 version.workspace = true 4 4 authors.workspace = true 5 + repository.workspace = true 6 + license.workspace = true 5 7 edition.workspace = true 6 8 publish.workspace = true 7 9
+1 -1
crates/xrpc/readme.md
··· 1 - # xrpc_macro 1 + # xrpc 2 2 3 3 Helpers for raw-dogging XRPC APIs in axum.