Update dependencies

This commit is contained in:
traxys 2024-03-02 15:56:00 +01:00
parent 37888d5835
commit faeaf43f80
8 changed files with 1356 additions and 951 deletions

2165
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -8,34 +8,32 @@ edition = "2021"
members = [".", "api", "gui", "migration", "web"] members = [".", "api", "gui", "migration", "web"]
[dependencies] [dependencies]
anyhow = "1.0.71" anyhow = "1.0.79"
axum = { version = "0.7.2" } axum = { version = "0.7.4" }
base64 = "0.21.0" base64 = "0.21.7"
jwt-simple = "0.11.5" jwt-simple = "0.12.7"
serde = { version = "1.0.163", features = ["derive"] } serde = { version = "1.0.195", features = ["derive"] }
tokio = { version = "1", features = ["macros", "rt", "rt-multi-thread"] } tokio = { version = "1", features = ["macros", "rt", "rt-multi-thread"] }
tracing = "0.1.37" tracing = "0.1.40"
tracing-subscriber = "0.3.17" tracing-subscriber = "0.3.18"
api = { path = "./api" } api = { path = "./api" }
migration = { path = "./migration" } migration = { path = "./migration" }
thiserror = "1.0.40" thiserror = "1.0.56"
tower-http = { version = "0.5.0", features = ["cors", "fs"] } tower-http = { version = "0.5.1", features = ["cors", "fs"] }
sha2 = "0.10" sha2 = "0.10"
uuid = { version = "1.3", features = ["v4"] } uuid = { version = "1.7", features = ["v4"] }
sea-query = "0.30" sea-query = "0.30"
openidconnect = "3.3.0" openidconnect = "3.4.0"
envious = "0.2.2" envious = "0.2.2"
parking_lot = "0.12.1" parking_lot = "0.12.1"
urlencoding = "2.1.3" urlencoding = "2.1.3"
tower-sessions = { version = "0.8.2", features = [ tower-sessions = "0.10.0"
"postgres-store",
"deletion-task",
] }
tower = "0.4.13" tower = "0.4.13"
time = "0.3.31" time = "0.3.31"
maud = { version = "0.26.0", features = ["axum"] } maud = { version = "0.26.0", features = ["axum"] }
pulldown-cmark = "0.9.3" pulldown-cmark = "0.9.3"
ammonia = "3.3.0" ammonia = "3.3.0"
tower-sessions-sqlx-store = { version = "0.10.0", features = ["postgres"] }
[dependencies.sea-orm] [dependencies.sea-orm]
version = "0.12" version = "0.12"

View file

@ -6,5 +6,5 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies] [dependencies]
serde = { version = "1.0.163", features = ["derive"] } serde = { version = "1.0.195", features = ["derive"] }
uuid = { version = "1.3.3", features = ["serde"] } uuid = { version = "1.7.0", features = ["serde"] }

48
flake.lock generated
View file

@ -5,11 +5,11 @@
"systems": "systems" "systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1689068808, "lastModified": 1709126324,
"narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=", "narHash": "sha256-q6EQdSeUZOG26WelxqkmR7kArjgWCdw5sfJVHPH/7j8=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4", "rev": "d465f4819400de7c8d874d50b982301f28a84605",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -23,11 +23,11 @@
"systems": "systems_2" "systems": "systems_2"
}, },
"locked": { "locked": {
"lastModified": 1681202837, "lastModified": 1705309234,
"narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=", "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "cfacdce06f30d2b68473a46042957675eebb3401", "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -41,11 +41,11 @@
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
}, },
"locked": { "locked": {
"lastModified": 1690373729, "lastModified": 1698420672,
"narHash": "sha256-e136hTT7LqQ2QjOTZQMW+jnsevWwBpMj78u6FRUsH9I=", "narHash": "sha256-/TdeHMPRjjdJub7p7+w55vyABrsJlt5QkznPYy55vKA=",
"owner": "nix-community", "owner": "nix-community",
"repo": "naersk", "repo": "naersk",
"rev": "d9a33d69a9c421d64c8d925428864e93be895dcc", "rev": "aeb58d5e8faead8980a807c840232697982d47b9",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -56,11 +56,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1691188534, "lastModified": 1709294055,
"narHash": "sha256-oXjS9GrZar+sB8j2KYzWw3dW62jYFhnjOsnO5+D+B3s=", "narHash": "sha256-7EECkQYoNKJZOf2+miJdrMpxpvsn/qZFwIhUI3fQpLs=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "5767e7b931f2e6ee7f582d564b8665095c059f3b", "rev": "ec869190b56a1b4677d24a8bdbcfe80ccea2ece6",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -70,11 +70,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1691188534, "lastModified": 1709294055,
"narHash": "sha256-oXjS9GrZar+sB8j2KYzWw3dW62jYFhnjOsnO5+D+B3s=", "narHash": "sha256-7EECkQYoNKJZOf2+miJdrMpxpvsn/qZFwIhUI3fQpLs=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "5767e7b931f2e6ee7f582d564b8665095c059f3b", "rev": "ec869190b56a1b4677d24a8bdbcfe80ccea2ece6",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -86,11 +86,11 @@
}, },
"nixpkgs_3": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1681358109, "lastModified": 1706487304,
"narHash": "sha256-eKyxW4OohHQx9Urxi7TQlFBTDWII+F+x2hklDOQPB50=", "narHash": "sha256-LE8lVX28MV2jWJsidW13D2qrHU/RUUONendL2Q/WlJg=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "96ba1c52e54e74c3197f4d43026b3f3d92e83ff9", "rev": "90f456026d284c22b3e3497be980b2e47d0b28ac",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -115,11 +115,11 @@
"nixpkgs": "nixpkgs_3" "nixpkgs": "nixpkgs_3"
}, },
"locked": { "locked": {
"lastModified": 1691201768, "lastModified": 1709345349,
"narHash": "sha256-h+QJMpawZoK1+8efF6UjQoY1EHZfHteXVa5OYnlqRWA=", "narHash": "sha256-E2tsnkM97cGuzHKOqdkUXfmI+K1wS4dNTJJu5QH2Vuk=",
"owner": "oxalica", "owner": "oxalica",
"repo": "rust-overlay", "repo": "rust-overlay",
"rev": "18ee2a71de24273e4ad4503b5604532f0b53f382", "rev": "6e6fde31711e699be2e7fb67aae1c7e23ef606e0",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -161,11 +161,11 @@
"trunk": { "trunk": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1690639183, "lastModified": 1709278132,
"narHash": "sha256-/XVDjKK1Kv7Hk3RUf4v9PEGwarUGzjb+96mZoCKrUEw=", "narHash": "sha256-aBW4tq2809fZmB6s5qnoqEPBeLtoCv2Xxdcb3UTB5gQ=",
"owner": "thedodd", "owner": "thedodd",
"repo": "trunk", "repo": "trunk",
"rev": "6a94c6b6df35d1a3618307afcfac69c66a6ae939", "rev": "e8a6de8deb2d5f75a560546a1739d4b13ff6817f",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -29,9 +29,15 @@
cargo = rust; cargo = rust;
rustc = rust; rustc = rust;
}; };
rustPlatform = pkgs.makeRustPlatform {
cargo = rust;
rustc = rust;
};
in { in {
devShell = pkgs.mkShell { devShell = pkgs.mkShell {
nativeBuildInputs = [ nativeBuildInputs = [
rustPlatform.bindgenHook
pkgs.cmake
rust rust
self.packages.${system}.dioxus self.packages.${system}.dioxus
(naersk'.buildPackage trunk) (naersk'.buildPackage trunk)

View file

@ -7,18 +7,18 @@ edition = "2021"
[dependencies] [dependencies]
ammonia = "3.3.0" ammonia = "3.3.0"
anyhow = "1.0.71" anyhow = "1.0.79"
api = { version = "0.1.0", path = "../api" } api = { version = "0.1.0", path = "../api" }
dioxus = "0.4.0" dioxus = "0.4.3"
dioxus-router = { version = "0.4.1", features = ["web"] } dioxus-router = { version = "0.4.3", features = ["web"] }
dioxus-web = "0.4.0" dioxus-web = "0.4.3"
gloo-net = { version = "0.3.0", features = ["json"] } gloo-net = { version = "0.5.0", features = ["json"] }
gloo-storage = "0.2.2" gloo-storage = "0.3.0"
gloo-utils = "0.1.7" gloo-utils = "0.2.0"
itertools = "0.11.0" itertools = "0.12.0"
log = "0.4.19" log = "0.4.20"
pulldown-cmark = "0.9.3" pulldown-cmark = "0.9.3"
serde = { version = "1.0.164", features = ["derive"] } serde = { version = "1.0.195", features = ["derive"] }
urlencoding = "2.1.3" urlencoding = "2.1.3"
uuid = "1.4.0" uuid = "1.7.0"
wasm-bindgen = "0.2.87" wasm-bindgen = "0.2.90"

View file

@ -6,7 +6,7 @@ use std::{
}; };
use anyhow::anyhow; use anyhow::anyhow;
use axum::{error_handling::HandleErrorLayer, http::StatusCode, BoxError, Router}; use axum::Router;
use base64::{engine::general_purpose, Engine}; use base64::{engine::general_purpose, Engine};
use jwt_simple::prelude::HS256Key; use jwt_simple::prelude::HS256Key;
use migration::{Migrator, MigratorTrait}; use migration::{Migrator, MigratorTrait};
@ -19,9 +19,9 @@ use openidconnect::{
use sea_orm::{ConnectOptions, Database, DatabaseConnection}; use sea_orm::{ConnectOptions, Database, DatabaseConnection};
use serde::{Deserialize, Deserializer, Serialize, Serializer}; use serde::{Deserialize, Deserializer, Serialize, Serializer};
use time::OffsetDateTime; use time::OffsetDateTime;
use tower::ServiceBuilder;
use tower_http::services::{ServeDir, ServeFile}; use tower_http::services::{ServeDir, ServeFile};
use tower_sessions::{sqlx::PgPool, ExpiredDeletion, PostgresStore, SessionManagerLayer}; use tower_sessions::{session_store::ExpiredDeletion, SessionManagerLayer};
use tower_sessions_sqlx_store::{sqlx::PgPool, PostgresStore};
use tracing_subscriber::EnvFilter; use tracing_subscriber::EnvFilter;
use uuid::Uuid; use uuid::Uuid;
@ -381,18 +381,12 @@ async fn main() -> anyhow::Result<()> {
.continuously_delete_expired(tokio::time::Duration::from_secs(60)), .continuously_delete_expired(tokio::time::Duration::from_secs(60)),
); );
let session_service = ServiceBuilder::new() let session_layer = SessionManagerLayer::new(sessions.clone())
.layer(HandleErrorLayer::new(|_: BoxError| async { .with_secure(false)
StatusCode::BAD_REQUEST .with_same_site(tower_sessions::cookie::SameSite::Lax)
})) .with_expiry(tower_sessions::Expiry::AtDateTime(
.layer( OffsetDateTime::now_utc().saturating_add(SESSION_DURATION),
SessionManagerLayer::new(sessions.clone()) ));
.with_secure(false)
.with_same_site(tower_sessions::cookie::SameSite::Lax)
.with_expiry(tower_sessions::Expiry::AtDateTime(
OffsetDateTime::now_utc().saturating_add(SESSION_DURATION),
)),
);
let state = Arc::new(AppState { let state = Arc::new(AppState {
jwt_secret: config.jwt_secret, jwt_secret: config.jwt_secret,
@ -413,7 +407,7 @@ async fn main() -> anyhow::Result<()> {
) )
.merge(app::router()) .merge(app::router())
.with_state(state) .with_state(state)
.layer(session_service); .layer(session_layer);
let router = match config.serve_app { let router = match config.serve_app {
None => router, None => router,

View file

@ -7,7 +7,7 @@ edition = "2021"
[dependencies] [dependencies]
console_log = "1.0.0" console_log = "1.0.0"
dioxus-web = "0.4.0" dioxus-web = "0.4.3"
gloo-utils = "0.1.7" gloo-utils = "0.2.0"
log = "0.4.19" log = "0.4.20"
regalade_gui = { path = "../gui" } regalade_gui = { path = "../gui" }