This commit is contained in:
Rodrigo Rodriguez (Pragmatismo) 2026-01-19 21:19:10 -03:00
parent a0ceee6387
commit 18b8afd54c
6 changed files with 12 additions and 18 deletions

View file

@ -109,7 +109,7 @@ base64 = "0.22"
bytes = "1.8" bytes = "1.8"
chrono = { version = "0.4", default-features = false, features = ["clock", "std"] } chrono = { version = "0.4", default-features = false, features = ["clock", "std"] }
color-eyre = "0.6.5" color-eyre = "0.6.5"
diesel = { version = "2.1", features = ["postgres", "uuid", "chrono", "serde_json", "r2d2", "numeric", "32-column-tables"] } diesel = { version = "2.1", features = ["postgres", "uuid", "chrono", "serde_json", "r2d2", "numeric"] }
bigdecimal = { version = "0.4", default-features = false } bigdecimal = { version = "0.4", default-features = false }
diesel_migrations = "2.1.0" diesel_migrations = "2.1.0"
dirs = "5.0" dirs = "5.0"
@ -133,7 +133,7 @@ serde_json = "1.0"
toml = "0.8" toml = "0.8"
sha2 = "0.10.9" sha2 = "0.10.9"
sha1 = "0.10.6" sha1 = "0.10.6"
tokio = { version = "1.41", default-features = false, features = ["rt", "sync", "time", "macros", "net", "rt-multi-thread", "process"] } tokio = { version = "1.41", default-features = false, features = ["full", "process", "process"] }
tokio-stream = "0.1" tokio-stream = "0.1"
tower = "0.4" tower = "0.4"
tower-http = { version = "0.5", default-features = false, features = ["cors", "fs", "trace"] } tower-http = { version = "0.5", default-features = false, features = ["cors", "fs", "trace"] }
@ -179,7 +179,7 @@ spreadsheet-ods = { version = "1.0", optional = true }
aws-config = { version = "1.8.8", default-features = false, optional = true } aws-config = { version = "1.8.8", default-features = false, optional = true }
aws-sdk-s3 = { version = "1.109.0", default-features = false, optional = true } aws-sdk-s3 = { version = "1.109.0", default-features = false, optional = true }
pdf-extract = { version = "0.10.0", optional = true } pdf-extract = { version = "0.10.0", optional = true }
quick-xml = { version = "0.37", optional=true, default-features = false, features = ["serialize"] } quick-xml = { version = "0.37", optional=true, features = ["serialize"] }
flate2 = { version = "1.0", optional = false } flate2 = { version = "1.0", optional = false }
zip = { version = "2.2", optional = false } zip = { version = "2.2", optional = false }
tar = { version = "0.4", optional = false } tar = { version = "0.4", optional = false }
@ -251,16 +251,3 @@ http-body-util = "0.1.3"
mockito = "1.7.0" mockito = "1.7.0"
tempfile = "3" tempfile = "3"
[profile.dev]
opt-level = 1
split-debuginfo = "unpacked"
incremental = true
[profile.release]
opt-level = 3
lto = "thin"
codegen-units = 1
panic = "abort"
[lints]
workspace = true

View file

@ -1,3 +1,4 @@
#![cfg_attr(feature = "mail", allow(unused_imports))]
use axum::{ use axum::{
extract::{Path, Query, State}, extract::{Path, Query, State},
http::StatusCode, http::StatusCode,

View file

@ -1,3 +1,4 @@
#![cfg_attr(feature = "mail", allow(unused_imports))]
pub mod ui; pub mod ui;
use crate::{core::config::EmailConfig, core::urls::ApiUrls, shared::state::AppState}; use crate::{core::config::EmailConfig, core::urls::ApiUrls, shared::state::AppState};
@ -16,6 +17,8 @@ use base64::{engine::general_purpose, Engine as _};
use chrono::{DateTime, Utc}; use chrono::{DateTime, Utc};
use diesel::prelude::*; use diesel::prelude::*;
use diesel::sql_types::{Bool, Integer, Nullable, Text, Timestamptz, Uuid as DieselUuid, Varchar}; use diesel::sql_types::{Bool, Integer, Nullable, Text, Timestamptz, Uuid as DieselUuid, Varchar};
#[cfg(feature = "mail")]
#[cfg(feature = "mail")]
use imap::types::Seq; use imap::types::Seq;
use lettre::{transport::smtp::authentication::Credentials, Message, SmtpTransport, Transport}; use lettre::{transport::smtp::authentication::Credentials, Message, SmtpTransport, Transport};
use log::{debug, info, warn}; use log::{debug, info, warn};

View file

@ -592,7 +592,7 @@ impl MetricsCollector {
async fn collect_disk_usage(&self) -> f64 { async fn collect_disk_usage(&self) -> f64 {
#[cfg(target_os = "linux")] #[cfg(target_os = "linux")]
{ {
if let Ok(output) = tokio::process::Command::new("df") if let Ok(output) = std::process::Command::new("df")
.args(["-h", "/"]) .args(["-h", "/"])
.output() .output()
.await .await

View file

@ -261,7 +261,7 @@ impl SafeCommand {
} }
pub async fn execute_async(&self) -> Result<Output, CommandGuardError> { pub async fn execute_async(&self) -> Result<Output, CommandGuardError> {
let mut cmd = tokio::process::Command::new(&self.command); let mut cmd = std::process::Command::new(&self.command);
cmd.args(&self.args); cmd.args(&self.args);
if let Some(ref dir) = self.working_dir { if let Some(ref dir) = self.working_dir {

View file

@ -1,3 +1,4 @@
#![cfg_attr(feature = "mail", allow(unused_imports))]
pub mod audit_log; pub mod audit_log;
pub mod menu_config; pub mod menu_config;
pub mod permission_inheritance; pub mod permission_inheritance;
@ -204,7 +205,9 @@ async fn test_smtp_connection(
State(_state): State<Arc<AppState>>, State(_state): State<Arc<AppState>>,
Json(config): Json<SmtpTestRequest>, Json(config): Json<SmtpTestRequest>,
) -> Json<SmtpTestResponse> { ) -> Json<SmtpTestResponse> {
#[cfg(feature = "mail")]
use lettre::SmtpTransport; use lettre::SmtpTransport;
#[cfg(feature = "mail")]
use lettre::transport::smtp::authentication::Credentials; use lettre::transport::smtp::authentication::Credentials;