1 Commits

Author SHA1 Message Date
c6fa6e492b Update dependency typescript-eslint to ^8.33.1
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
2025-06-09 00:21:19 +00:00
20 changed files with 423 additions and 466 deletions

File diff suppressed because it is too large Load Diff

View File

@ -11,20 +11,20 @@
},
"dependencies": {
"@emotion/react": "^11.14.0",
"@emotion/styled": "^11.14.1",
"@fontsource/roboto": "^5.2.6",
"@fullcalendar/core": "^6.1.18",
"@fullcalendar/daygrid": "^6.1.18",
"@fullcalendar/interaction": "^6.1.18",
"@fullcalendar/list": "^6.1.18",
"@fullcalendar/react": "^6.1.18",
"@emotion/styled": "^11.14.0",
"@fontsource/roboto": "^5.2.5",
"@fullcalendar/core": "^6.1.17",
"@fullcalendar/daygrid": "^6.1.17",
"@fullcalendar/interaction": "^6.1.17",
"@fullcalendar/list": "^6.1.17",
"@fullcalendar/react": "^6.1.17",
"@mdi/js": "^7.4.47",
"@mdi/react": "^1.6.1",
"@mui/icons-material": "^7.2.0",
"@mui/lab": "^7.0.0-beta.14",
"@mui/material": "^7.2.0",
"@mui/x-data-grid": "^7.29.8",
"@mui/x-date-pickers": "^7.29.4",
"@mui/icons-material": "^7.0.2",
"@mui/lab": "^7.0.0-beta.12",
"@mui/material": "^7.0.2",
"@mui/x-data-grid": "^7.29.3",
"@mui/x-date-pickers": "^7.29.3",
"@mui/x-tree-view": "^7.29.1",
"date-and-time": "^3.6.0",
"dayjs": "^1.11.13",
@ -32,25 +32,25 @@
"filesize": "^10.1.6",
"jspdf": "^3.0.1",
"mui-color-input": "^7.0.0",
"react": "^19.1.0",
"react-dom": "^19.1.0",
"react-easy-crop": "^5.4.2",
"react-qr-code": "^2.0.18",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-easy-crop": "^5.4.1",
"react-qr-code": "^2.0.15",
"react-router-dom": "^7.4.0",
"react-zoom-pan-pinch": "^3.7.0",
"svg2pdf.js": "^2.5.0"
},
"devDependencies": {
"@eslint/js": "^9.30.1",
"@types/react": "^19.1.8",
"@types/react-dom": "^19.1.6",
"@vitejs/plugin-react": "^4.6.0",
"eslint": "^9.30.1",
"@eslint/js": "^9.26.0",
"@types/react": "^19.0.12",
"@types/react-dom": "^19.0.4",
"@vitejs/plugin-react": "^4.4.1",
"eslint": "^9.28.0",
"eslint-plugin-react-hooks": "^5.2.0",
"eslint-plugin-react-refresh": "^0.4.20",
"globals": "^16.3.0",
"globals": "^16.0.0",
"typescript": "^5.8.3",
"typescript-eslint": "^8.24.1",
"vite": "^6.3.5"
"typescript-eslint": "^8.33.1",
"vite": "^6.2.3"
}
}

View File

@ -36,9 +36,9 @@ dependencies = [
[[package]]
name = "actix-http"
version = "3.11.0"
version = "3.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "44dfe5c9e0004c623edc65391dfd51daa201e7e30ebd9c9bedf873048ec32bc2"
checksum = "0fa882656b67966045e4152c634051e70346939fced7117d5f0b52146a7c74c9"
dependencies = [
"actix-codec",
"actix-rt",
@ -159,9 +159,9 @@ dependencies = [
[[package]]
name = "actix-server"
version = "2.6.0"
version = "2.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a65064ea4a457eaf07f2fba30b4c695bf43b721790e9530d26cb6f9019ff7502"
checksum = "6398974fd4284f4768af07965701efbbb5fdc0616bff20cade1bb14b77675e24"
dependencies = [
"actix-rt",
"actix-service",
@ -196,9 +196,9 @@ dependencies = [
[[package]]
name = "actix-web"
version = "4.11.0"
version = "4.10.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a597b77b5c6d6a1e1097fddde329a83665e25c5437c696a3a9a4aa514a614dea"
checksum = "f2e3b15b3dc6c6ed996e4032389e9849d4ab002b1e92fbfe85b5f307d1479b4d"
dependencies = [
"actix-codec",
"actix-http",
@ -597,9 +597,9 @@ dependencies = [
[[package]]
name = "brotli"
version = "8.0.1"
version = "7.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9991eea70ea4f293524138648e41ee89b0b2b12ddef3b255effa43c8056e0e0d"
checksum = "cc97b8f16f944bba54f0433f07e30be199b6dc2bd25937444bbad560bcea29bd"
dependencies = [
"alloc-no-stdlib",
"alloc-stdlib",
@ -608,9 +608,9 @@ dependencies = [
[[package]]
name = "brotli-decompressor"
version = "5.0.0"
version = "4.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "874bb8112abecc98cbd6d81ea4fa7e94fb9449648c93cc89aa40c81c24d7de03"
checksum = "74fa05ad7d803d413eb8380983b092cbbaf9a85f151b871360e7b00cd7060b37"
dependencies = [
"alloc-no-stdlib",
"alloc-stdlib",
@ -744,9 +744,9 @@ dependencies = [
[[package]]
name = "clap"
version = "4.5.41"
version = "4.5.38"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "be92d32e80243a54711e5d7ce823c35c41c9d929dc4ab58e1276f625841aadf9"
checksum = "ed93b9805f8ba930df42c2590f05453d5ec36cbb85d018868a5b24d31f6ac000"
dependencies = [
"clap_builder",
"clap_derive",
@ -754,9 +754,9 @@ dependencies = [
[[package]]
name = "clap_builder"
version = "4.5.41"
version = "4.5.38"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "707eab41e9622f9139419d573eca0900137718000c517d47da73045f54331c3d"
checksum = "379026ff283facf611b0ea629334361c4211d1b12ee01024eec1591133b04120"
dependencies = [
"anstream",
"anstyle",
@ -766,9 +766,9 @@ dependencies = [
[[package]]
name = "clap_derive"
version = "4.5.41"
version = "4.5.32"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ef4f52386a59ca4c860f7393bcf8abd8dfd91ecccc0f774635ff68e92eeef491"
checksum = "09176aae279615badda0765c0c0b3f6ed53f4709118af73cf4655d85d1530cd7"
dependencies = [
"heck",
"proc-macro2",
@ -1056,9 +1056,9 @@ dependencies = [
[[package]]
name = "diesel"
version = "2.2.11"
version = "2.2.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a917a9209950404d5be011c81d081a2692a822f73c3d6af586f0cab5ff50f614"
checksum = "ff3e1edb1f37b4953dd5176916347289ed43d7119cc2e6c7c3f7849ff44ea506"
dependencies = [
"bitflags 2.9.0",
"byteorder",
@ -2066,17 +2066,6 @@ dependencies = [
"syn",
]
[[package]]
name = "io-uring"
version = "0.7.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b86e202f00093dcba4275d4636b93ef9dd75d025ae560d2521b45ea28ab49013"
dependencies = [
"bitflags 2.9.0",
"cfg-if",
"libc",
]
[[package]]
name = "ipnet"
version = "2.11.0"
@ -2207,9 +2196,9 @@ checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8"
[[package]]
name = "lettre"
version = "0.11.17"
version = "0.11.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cb2a0354e9ece2fcdcf9fa53417f6de587230c0c248068eb058fa26c4a753179"
checksum = "87ffd14fa289730e3ad68edefdc31f603d56fe716ec38f2076bb7410e09147c2"
dependencies = [
"base64",
"chumsky",
@ -3794,19 +3783,17 @@ dependencies = [
[[package]]
name = "tokio"
version = "1.46.1"
version = "1.44.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0cc3a2344dafbe23a245241fe8b09735b521110d30fcefbbd5feb1797ca35d17"
checksum = "f382da615b842244d4b8738c82ed1275e6c5dd90c459a30941cd07080b06c91a"
dependencies = [
"backtrace",
"bytes",
"io-uring",
"libc",
"mio",
"parking_lot",
"pin-project-lite",
"signal-hook-registry",
"slab",
"socket2",
"windows-sys 0.52.0",
]

View File

@ -8,22 +8,22 @@ edition = "2024"
[dependencies]
log = "0.4.27"
env_logger = "0.11.8"
clap = { version = "4.5.41", features = ["derive", "env"] }
clap = { version = "4.5.38", features = ["derive", "env"] }
lazy_static = "1.5.0"
lazy-regex = "3.4.1"
anyhow = "1.0.98"
actix-web = "4.11.0"
actix-web = "4.10.2"
actix-cors = "0.7.1"
actix-multipart = "0.7.2"
actix-remote-ip = "0.1.0"
futures-util = "0.3.31"
diesel = { version = "2.2.11", features = ["postgres"] }
futures-util = "0.3.30"
diesel = { version = "2.2.10", features = ["postgres"] }
diesel_migrations = "2.2.0"
serde = { version = "1.0.219", features = ["derive"] }
serde_json = "1.0.140"
mailchecker = "6.0.17"
redis = "0.29.5"
lettre = "0.11.17"
lettre = "0.11.16"
rand = "0.9.1"
bcrypt = "0.17.0"
light-openid = "1.0.4"

View File

@ -21,7 +21,7 @@ where
if POSTGRES_CONNECTION.with(|i| i.borrow().is_none()) {
let database_url = AppConfig::get().db_connection_chain();
let conn = PgConnection::establish(&database_url)
.unwrap_or_else(|_| panic!("Error connecting to {database_url}"));
.unwrap_or_else(|_| panic!("Error connecting to {}", database_url));
POSTGRES_CONNECTION.with(|i| *i.borrow_mut() = Some(conn))
}
@ -38,7 +38,7 @@ where
POSTGRES_CONNECTION.with(|i| *i.borrow_mut() = None)
}
log::error!("Database query error! {e:?}");
log::error!("Database query error! {:?}", e);
Err(e.into())
}
}

View File

@ -30,7 +30,7 @@ pub async fn create_bucket_if_required() -> anyhow::Result<()> {
log::warn!("The bucket does not seem to exists, trying to create it!")
}
Err(e) => {
log::error!("Got unexpected error when querying bucket info: {e}");
log::error!("Got unexpected error when querying bucket info: {}", e);
return Err(BucketServiceError::FailedFetchBucketInfo.into());
}
}

View File

@ -79,7 +79,10 @@ pub async fn request_reset_password(
match users_service::get_by_mail(&req.mail).await {
Ok(mut user) => users_service::request_reset_password(&mut user).await?,
Err(e) => {
log::error!("Could not locate user account {e}! (error silently ignored)");
log::error!(
"Could not locate user account {}! (error silently ignored)",
e
);
}
}
@ -119,7 +122,7 @@ pub async fn check_reset_password_token(
RatedAction::CheckResetPasswordTokenFailed,
)
.await?;
log::error!("Password reset token could not be used: {e}");
log::error!("Password reset token could not be used: {}", e);
return Ok(HttpResponse::NotFound().finish());
}
};
@ -153,7 +156,7 @@ pub async fn reset_password(remote_ip: RemoteIP, req: web::Json<ResetPasswordBod
RatedAction::CheckResetPasswordTokenFailed,
)
.await?;
log::error!("Password reset token could not be used: {e}");
log::error!("Password reset token could not be used: {}", e);
return Ok(HttpResponse::NotFound().finish());
}
};
@ -193,7 +196,7 @@ pub async fn password_login(remote_ip: RemoteIP, req: web::Json<PasswordLoginQue
let user = match users_service::get_by_mail(&req.mail).await {
Ok(u) => u,
Err(e) => {
log::error!("Auth failed: could not find account by mail! {e}");
log::error!("Auth failed: could not find account by mail! {}", e);
rate_limiter_service::record_action(remote_ip.0, RatedAction::FailedPasswordLogin)
.await?;
return Ok(HttpResponse::Unauthorized().json("Invalid credentials"));

View File

@ -183,9 +183,9 @@ pub async fn import_family(
}
if let Err(e) = req_member_data.to_member(member).await {
log::error!("Error while processing import (member {req_id:?}) - {e}");
log::error!("Error while processing import (member {:?}) - {e}", req_id);
return Ok(
HttpResponse::BadRequest().json(format!("Failed to validate member {req_id:?}!"))
HttpResponse::BadRequest().json(format!("Failed to validate member {:?}!", req_id))
);
}

View File

@ -31,7 +31,7 @@ impl Display for HttpErr {
impl actix_web::error::ResponseError for HttpErr {
fn error_response(&self) -> HttpResponse<BoxBody> {
log::error!("Error while processing request! {self}");
log::error!("Error while processing request! {}", self);
HttpResponse::InternalServerError().body("Failed to execute request!")
}
}

View File

@ -75,7 +75,7 @@ impl FromRequest for FamilyAndAccommodationInPath {
Self::load_accommodation_from_path(family, accommodation_id)
.await
.map_err(|e| {
log::error!("Failed to extract accommodation ID from URL! {e}");
log::error!("Failed to extract accommodation ID from URL! {}", e);
actix_web::error::ErrorNotFound("Could not fetch accommodation information!")
})
})

View File

@ -85,7 +85,7 @@ impl FromRequest for FamilyAndAccommodationReservationCalendarInPath {
Self::load_calendar_from_path(family, accommodation_id)
.await
.map_err(|e| {
log::error!("Failed to extract calendar ID from URL! {e}");
log::error!("Failed to extract calendar ID from URL! {}", e);
actix_web::error::ErrorNotFound("Could not fetch calendar information!")
})
})

View File

@ -95,7 +95,7 @@ impl FromRequest for FamilyAndAccommodationReservationInPath {
Self::load_accommodation_reservation_from_path(family, reservation_id)
.await
.map_err(|e| {
log::error!("Failed to extract accommodation ID from URL! {e}");
log::error!("Failed to extract accommodation ID from URL! {}", e);
actix_web::error::ErrorNotFound("Could not fetch accommodation information!")
})
})

View File

@ -71,7 +71,7 @@ impl FromRequest for FamilyAndCoupleInPath {
FamilyAndCoupleInPath::load_couple_from_path(family, couple_id)
.await
.map_err(|e| {
log::error!("Failed to extract couple ID from URL! {e}");
log::error!("Failed to extract couple ID from URL! {}", e);
actix_web::error::ErrorNotFound("Could not fetch couple information!")
})
})

View File

@ -62,7 +62,7 @@ impl FromRequest for FamilyInPath {
FamilyInPath::load_family_from_path(&token, family_id)
.await
.map_err(|e| {
log::error!("Failed to extract family ID from URL! {e}");
log::error!("Failed to extract family ID from URL! {}", e);
actix_web::error::ErrorNotFound("Could not fetch family information!")
})
})

View File

@ -71,7 +71,7 @@ impl FromRequest for FamilyAndMemberInPath {
FamilyAndMemberInPath::load_member_from_path(family, member_id)
.await
.map_err(|e| {
log::error!("Failed to extract member ID from URL! {e}");
log::error!("Failed to extract member ID from URL! {}", e);
actix_web::error::ErrorNotFound("Could not fetch member information!")
})
})

View File

@ -43,7 +43,7 @@ impl User {
.as_deref()
.map(|hash| {
bcrypt::verify(password, hash).unwrap_or_else(|e| {
log::error!("Failed to validate password! {e}");
log::error!("Failed to validate password! {}", e);
false
})
})

View File

@ -125,13 +125,13 @@ async fn load_token_info(token: &LoginTokenValue) -> anyhow::Result<Option<Login
let token = match user_tokens.iter_mut().find(|t| t.key == key) {
Some(t) => t,
None => {
log::error!("Could not find token for key '{key}' (missing token)");
log::error!("Could not find token for key '{}' (missing token)", key);
return Ok(None);
}
};
if token.is_expired() {
log::error!("Could not find token for key '{key}' (token expired)");
log::error!("Could not find token for key '{}' (token expired)", key);
return Ok(None);
}
@ -169,7 +169,7 @@ impl FromRequest for LoginToken {
let token = match load_token_info(&token).await {
Err(e) => {
log::error!("Failed to load auth token! {e}");
log::error!("Failed to load auth token! {}", e);
return Err(actix_web::error::ErrorPreconditionFailed(
"Failed to check auth token!",
));

View File

@ -27,7 +27,7 @@ pub async fn send_mail<D: Display>(to: &str, subject: &str, body: D) -> anyhow::
let mailer = mailer.build();
mailer.send(&email)?;
log::debug!("A mail was sent to {to} (subject = {subject})");
log::debug!("A mail was sent to {} (subject = {})", to, subject);
Ok(())
}

View File

@ -168,7 +168,7 @@ pub mod loop_detection {
None => false,
Some(id) => {
if curr_stack.contains(id) {
log::debug!("Loop detected! {curr_stack:?}");
log::debug!("Loop detected! {:?}", curr_stack);
return true;
}

View File

@ -5,7 +5,7 @@ pub fn sha256(bytes: &[u8]) -> String {
let mut hasher = Sha256::new();
hasher.update(bytes);
let h = hasher.finalize();
format!("{h:x}")
format!("{:x}", h)
}
/// Compute hash of a slice of bytes (sha512)
@ -13,5 +13,5 @@ pub fn sha512(bytes: &[u8]) -> String {
let mut hasher = Sha512::new();
hasher.update(bytes);
let h = hasher.finalize();
format!("{h:x}")
format!("{:x}", h)
}