diff --git a/Cargo.lock b/Cargo.lock index 7a915a0..80ff28d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -140,6 +140,7 @@ name = "authdb" version = "0.1.0" dependencies = [ "base64ct", + "clap", "cool_asserts", "serde 1.0.188", "sha2", @@ -926,6 +927,7 @@ dependencies = [ name = "file-service" version = "0.2.0" dependencies = [ + "authdb", "base64ct", "build_html", "bytes", @@ -944,6 +946,7 @@ dependencies = [ "pretty_env_logger", "serde 1.0.188", "serde_json", + "sha2", "tempdir", "thiserror", "tokio", diff --git a/authdb/Cargo.toml b/authdb/Cargo.toml index 2ba9123..66b4cbf 100644 --- a/authdb/Cargo.toml +++ b/authdb/Cargo.toml @@ -5,8 +5,17 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +[lib] +name = "authdb" +path = "src/lib.rs" + +[[bin]] +name = "auth-cli" +path = "src/bin/cli.rs" + [dependencies] base64ct = { version = "1", features = [ "alloc" ] } +clap = { version = "4", features = [ "derive" ] } serde = { version = "1.0", features = ["derive"] } sha2 = { version = "0.10" } sqlx = { version = "0.7", features = [ "runtime-tokio", "sqlite" ] } diff --git a/file-service/src/bin/cli.rs b/authdb/src/bin/cli.rs similarity index 96% rename from file-service/src/bin/cli.rs rename to authdb/src/bin/cli.rs index 4978dcc..7ea3d26 100644 --- a/file-service/src/bin/cli.rs +++ b/authdb/src/bin/cli.rs @@ -1,5 +1,5 @@ +use authdb::{AuthDB, Username}; use clap::{Parser, Subcommand}; -use file_service::{AuthDB, Username}; use std::path::PathBuf; #[derive(Subcommand, Debug)]