chore: update dependencies and configuration

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I5bab99cb7e7bb2125e7410b54911021a6a6a6964
This commit is contained in:
raf 2026-02-07 20:04:46 +03:00
commit b6012b932f
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
4 changed files with 105 additions and 23 deletions

93
Cargo.lock generated
View file

@ -707,7 +707,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
dependencies = [ dependencies = [
"libc", "libc",
"windows-sys 0.61.2", "windows-sys 0.59.0",
] ]
[[package]] [[package]]
@ -740,7 +740,7 @@ checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be"
[[package]] [[package]]
name = "fc-common" name = "fc-common"
version = "0.1.0" version = "0.2.0-dev"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"argon2", "argon2",
@ -758,17 +758,18 @@ dependencies = [
"sha2", "sha2",
"sqlx", "sqlx",
"tempfile", "tempfile",
"thiserror", "thiserror 2.0.18",
"tokio", "tokio",
"toml", "toml",
"tracing", "tracing",
"tracing-subscriber", "tracing-subscriber",
"urlencoding",
"uuid", "uuid",
] ]
[[package]] [[package]]
name = "fc-evaluator" name = "fc-evaluator"
version = "0.1.0" version = "0.2.0-dev"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"chrono", "chrono",
@ -783,7 +784,7 @@ dependencies = [
"sha2", "sha2",
"sqlx", "sqlx",
"tempfile", "tempfile",
"thiserror", "thiserror 2.0.18",
"tokio", "tokio",
"toml", "toml",
"tracing", "tracing",
@ -793,7 +794,7 @@ dependencies = [
[[package]] [[package]]
name = "fc-migrate-cli" name = "fc-migrate-cli"
version = "0.1.0" version = "0.2.0-dev"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"clap", "clap",
@ -804,7 +805,7 @@ dependencies = [
[[package]] [[package]]
name = "fc-queue-runner" name = "fc-queue-runner"
version = "0.1.0" version = "0.2.0-dev"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"chrono", "chrono",
@ -815,7 +816,7 @@ dependencies = [
"serde_json", "serde_json",
"sqlx", "sqlx",
"tempfile", "tempfile",
"thiserror", "thiserror 2.0.18",
"tokio", "tokio",
"tokio-util", "tokio-util",
"tracing", "tracing",
@ -825,7 +826,7 @@ dependencies = [
[[package]] [[package]]
name = "fc-server" name = "fc-server"
version = "0.1.0" version = "0.2.0-dev"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"askama", "askama",
@ -840,11 +841,14 @@ dependencies = [
"futures", "futures",
"hex", "hex",
"hmac", "hmac",
"oauth2",
"reqwest",
"serde", "serde",
"serde_json", "serde_json",
"sha2", "sha2",
"sqlx", "sqlx",
"thiserror", "subtle",
"thiserror 2.0.18",
"tokio", "tokio",
"tokio-util", "tokio-util",
"tower", "tower",
@ -1661,7 +1665,7 @@ version = "0.50.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5"
dependencies = [ dependencies = [
"windows-sys 0.61.2", "windows-sys 0.59.0",
] ]
[[package]] [[package]]
@ -1710,6 +1714,26 @@ dependencies = [
"libm", "libm",
] ]
[[package]]
name = "oauth2"
version = "5.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "51e219e79014df21a225b1860a479e2dcd7cbd9130f4defd4bd0e191ea31d67d"
dependencies = [
"base64",
"chrono",
"getrandom 0.2.17",
"http",
"rand 0.8.5",
"reqwest",
"serde",
"serde_json",
"serde_path_to_error",
"sha2",
"thiserror 1.0.69",
"url",
]
[[package]] [[package]]
name = "object" name = "object"
version = "0.37.3" version = "0.37.3"
@ -1953,7 +1977,7 @@ dependencies = [
"rustc-hash", "rustc-hash",
"rustls", "rustls",
"socket2", "socket2",
"thiserror", "thiserror 2.0.18",
"tokio", "tokio",
"tracing", "tracing",
"web-time", "web-time",
@ -1974,7 +1998,7 @@ dependencies = [
"rustls", "rustls",
"rustls-pki-types", "rustls-pki-types",
"slab", "slab",
"thiserror", "thiserror 2.0.18",
"tinyvec", "tinyvec",
"tracing", "tracing",
"web-time", "web-time",
@ -1991,7 +2015,7 @@ dependencies = [
"once_cell", "once_cell",
"socket2", "socket2",
"tracing", "tracing",
"windows-sys 0.60.2", "windows-sys 0.59.0",
] ]
[[package]] [[package]]
@ -2233,7 +2257,7 @@ dependencies = [
"errno", "errno",
"libc", "libc",
"linux-raw-sys", "linux-raw-sys",
"windows-sys 0.61.2", "windows-sys 0.59.0",
] ]
[[package]] [[package]]
@ -2520,7 +2544,7 @@ dependencies = [
"serde_json", "serde_json",
"sha2", "sha2",
"smallvec", "smallvec",
"thiserror", "thiserror 2.0.18",
"tokio", "tokio",
"tokio-stream", "tokio-stream",
"tracing", "tracing",
@ -2605,7 +2629,7 @@ dependencies = [
"smallvec", "smallvec",
"sqlx-core", "sqlx-core",
"stringprep", "stringprep",
"thiserror", "thiserror 2.0.18",
"tracing", "tracing",
"uuid", "uuid",
"whoami", "whoami",
@ -2644,7 +2668,7 @@ dependencies = [
"smallvec", "smallvec",
"sqlx-core", "sqlx-core",
"stringprep", "stringprep",
"thiserror", "thiserror 2.0.18",
"tracing", "tracing",
"uuid", "uuid",
"whoami", "whoami",
@ -2670,7 +2694,7 @@ dependencies = [
"serde", "serde",
"serde_urlencoded", "serde_urlencoded",
"sqlx-core", "sqlx-core",
"thiserror", "thiserror 2.0.18",
"tracing", "tracing",
"url", "url",
"uuid", "uuid",
@ -2759,7 +2783,16 @@ dependencies = [
"getrandom 0.3.4", "getrandom 0.3.4",
"once_cell", "once_cell",
"rustix", "rustix",
"windows-sys 0.61.2", "windows-sys 0.59.0",
]
[[package]]
name = "thiserror"
version = "1.0.69"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52"
dependencies = [
"thiserror-impl 1.0.69",
] ]
[[package]] [[package]]
@ -2768,7 +2801,18 @@ version = "2.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4"
dependencies = [ dependencies = [
"thiserror-impl", "thiserror-impl 2.0.18",
]
[[package]]
name = "thiserror-impl"
version = "1.0.69"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"
dependencies = [
"proc-macro2",
"quote",
"syn",
] ]
[[package]] [[package]]
@ -3136,8 +3180,15 @@ dependencies = [
"idna", "idna",
"percent-encoding", "percent-encoding",
"serde", "serde",
"serde_derive",
] ]
[[package]]
name = "urlencoding"
version = "2.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da"
[[package]] [[package]]
name = "utf8_iter" name = "utf8_iter"
version = "1.0.4" version = "1.0.4"

View file

@ -14,7 +14,7 @@ edition = "2024"
license = "MPL-2.0" license = "MPL-2.0"
repository = "https://gitub.com/feel-co/fc" repository = "https://gitub.com/feel-co/fc"
rust-version = "1.91.1" rust-version = "1.91.1"
version = "0.1.0" version = "0.2.0-dev"
[workspace.dependencies] [workspace.dependencies]
# Components # Components
@ -43,13 +43,16 @@ lettre = { version = "0.11.19", default-features = false, features = [
"smtp-transport", "smtp-transport",
"builder", "builder",
] } ] }
libc = "0.2.180"
nix-nar = "0.3.1" nix-nar = "0.3.1"
oauth2 = "5.0.0"
regex = "1.12.3" regex = "1.12.3"
reqwest = { version = "0.12.28", default-features = false, features = [ "json", "rustls-tls" ] } reqwest = { version = "0.12.28", default-features = false, features = [ "json", "rustls-tls" ] }
serde = { version = "1.0.228", features = [ "derive" ] } serde = { version = "1.0.228", features = [ "derive" ] }
serde_json = "1.0.149" serde_json = "1.0.149"
sha2 = "0.10.9" sha2 = "0.10.9"
sqlx = { version = "0.8.6", features = [ "runtime-tokio-rustls", "postgres", "chrono", "uuid", "migrate" ] } sqlx = { version = "0.8.6", features = [ "runtime-tokio-rustls", "postgres", "chrono", "uuid", "migrate" ] }
subtle = "2.6.1"
tempfile = "3.24.0" tempfile = "3.24.0"
thiserror = "2.0.18" thiserror = "2.0.18"
tokio = { version = "1.49.0", features = [ "full" ] } tokio = { version = "1.49.0", features = [ "full" ] }
@ -59,5 +62,5 @@ tower = "0.5.3"
tower-http = { version = "0.6.8", features = [ "cors", "trace", "limit", "fs", "set-header" ] } tower-http = { version = "0.6.8", features = [ "cors", "trace", "limit", "fs", "set-header" ] }
tracing = "0.1.41" tracing = "0.1.41"
tracing-subscriber = { version = "0.3.20", features = [ "env-filter", "json" ] } tracing-subscriber = { version = "0.3.20", features = [ "env-filter", "json" ] }
urlencoding = "2.1.3"
uuid = { version = "1.18.1", features = [ "v4", "serde" ] } uuid = { version = "1.18.1", features = [ "v4", "serde" ] }
libc = "0.2.180"

View file

@ -28,4 +28,5 @@ tokio.workspace = true
toml.workspace = true toml.workspace = true
tracing.workspace = true tracing.workspace = true
tracing-subscriber.workspace = true tracing-subscriber.workspace = true
urlencoding.workspace = true
uuid.workspace = true uuid.workspace = true

View file

@ -21,6 +21,8 @@ pub struct Config {
pub tracing: TracingConfig, pub tracing: TracingConfig,
#[serde(default)] #[serde(default)]
pub declarative: DeclarativeConfig, pub declarative: DeclarativeConfig,
#[serde(default)]
pub oauth: OAuthConfig,
} }
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
@ -82,6 +84,29 @@ pub struct LogConfig {
pub compress: bool, pub compress: bool,
} }
#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(default)]
pub struct OAuthConfig {
pub github: Option<GitHubOAuthConfig>,
}
#[derive(Clone, Serialize, Deserialize)]
pub struct GitHubOAuthConfig {
pub client_id: String,
pub client_secret: String,
pub redirect_uri: String,
}
impl std::fmt::Debug for GitHubOAuthConfig {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.debug_struct("GitHubOAuthConfig")
.field("client_id", &self.client_id)
.field("client_secret", &"[REDACTED]")
.field("redirect_uri", &self.redirect_uri)
.finish()
}
}
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(default)] #[serde(default)]
#[derive(Default)] #[derive(Default)]
@ -90,6 +115,8 @@ pub struct NotificationsConfig {
pub github_token: Option<String>, pub github_token: Option<String>,
pub gitea_url: Option<String>, pub gitea_url: Option<String>,
pub gitea_token: Option<String>, pub gitea_token: Option<String>,
pub gitlab_url: Option<String>,
pub gitlab_token: Option<String>,
pub email: Option<EmailConfig>, pub email: Option<EmailConfig>,
} }