chore: update deps
This commit is contained in:
parent
8d7c1fbf53
commit
d22be95dda
3 changed files with 434 additions and 394 deletions
809
Cargo.lock
generated
809
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
10
Cargo.toml
10
Cargo.toml
|
@ -15,20 +15,20 @@ clap = { version = "4", features = ["wrap_help", "env"] }
|
||||||
clap_complete = "4"
|
clap_complete = "4"
|
||||||
chrono = "0.4"
|
chrono = "0.4"
|
||||||
tokio = { version = "1", features = ["rt-multi-thread", "macros", "fs", "io-util", "signal"]}
|
tokio = { version = "1", features = ["rt-multi-thread", "macros", "fs", "io-util", "signal"]}
|
||||||
tokio-util = { version = "0.7", features = ["io-util"] }
|
tokio-util = { version = "0.7", features = ["io-util", "compat"] }
|
||||||
hyper = { version = "0.14", features = ["http1", "server", "tcp", "stream"] }
|
hyper = { version = "0.14", features = ["http1", "server", "tcp", "stream"] }
|
||||||
percent-encoding = "2.1"
|
percent-encoding = "2.1"
|
||||||
serde = { version = "1", features = ["derive"] }
|
serde = { version = "1", features = ["derive"] }
|
||||||
serde_json = "1"
|
serde_json = "1"
|
||||||
futures = "0.3"
|
futures = "0.3"
|
||||||
base64 = "0.21"
|
base64 = "0.21"
|
||||||
async_zip = { version = "0.0.12", default-features = false, features = ["deflate", "chrono"] }
|
async_zip = { version = "0.0.15", default-features = false, features = ["deflate", "chrono", "tokio"] }
|
||||||
headers = "0.3"
|
headers = "0.3"
|
||||||
mime_guess = "2.0"
|
mime_guess = "2.0"
|
||||||
if-addrs = "0.10.1"
|
if-addrs = "0.10.1"
|
||||||
rustls = { version = "0.20", default-features = false, features = ["tls12"], optional = true }
|
rustls = { version = "0.21", default-features = false, features = ["tls12"], optional = true }
|
||||||
rustls-pemfile = { version = "1", optional = true }
|
rustls-pemfile = { version = "1", optional = true }
|
||||||
tokio-rustls = { version = "0.23", optional = true }
|
tokio-rustls = { version = "0.24", optional = true }
|
||||||
md5 = "0.7"
|
md5 = "0.7"
|
||||||
lazy_static = "1.4"
|
lazy_static = "1.4"
|
||||||
uuid = { version = "1.1", features = ["v4", "fast-rng"] }
|
uuid = { version = "1.1", features = ["v4", "fast-rng"] }
|
||||||
|
@ -55,7 +55,7 @@ assert_cmd = "2"
|
||||||
reqwest = { version = "0.11", features = ["blocking", "multipart", "rustls-tls"], default-features = false }
|
reqwest = { version = "0.11", features = ["blocking", "multipart", "rustls-tls"], default-features = false }
|
||||||
assert_fs = "1"
|
assert_fs = "1"
|
||||||
port_check = "0.1"
|
port_check = "0.1"
|
||||||
rstest = "0.16"
|
rstest = "0.17"
|
||||||
regex = "1"
|
regex = "1"
|
||||||
url = "2"
|
url = "2"
|
||||||
diqwest = { version = "1", features = ["blocking"] }
|
diqwest = { version = "1", features = ["blocking"] }
|
||||||
|
|
|
@ -10,7 +10,7 @@ use anyhow::{anyhow, Result};
|
||||||
use walkdir::WalkDir;
|
use walkdir::WalkDir;
|
||||||
use xml::escape::escape_str_pcdata;
|
use xml::escape::escape_str_pcdata;
|
||||||
|
|
||||||
use async_zip::write::ZipFileWriter;
|
use async_zip::tokio::write::ZipFileWriter;
|
||||||
use async_zip::{Compression, ZipDateTime, ZipEntryBuilder};
|
use async_zip::{Compression, ZipDateTime, ZipEntryBuilder};
|
||||||
use chrono::{LocalResult, TimeZone, Utc};
|
use chrono::{LocalResult, TimeZone, Utc};
|
||||||
use futures::TryStreamExt;
|
use futures::TryStreamExt;
|
||||||
|
@ -37,6 +37,7 @@ use std::time::SystemTime;
|
||||||
use tokio::fs::File;
|
use tokio::fs::File;
|
||||||
use tokio::io::{AsyncReadExt, AsyncSeekExt, AsyncWrite};
|
use tokio::io::{AsyncReadExt, AsyncSeekExt, AsyncWrite};
|
||||||
use tokio::{fs, io};
|
use tokio::{fs, io};
|
||||||
|
use tokio_util::compat::FuturesAsyncWriteCompatExt;
|
||||||
use tokio_util::io::StreamReader;
|
use tokio_util::io::StreamReader;
|
||||||
use uuid::Uuid;
|
use uuid::Uuid;
|
||||||
|
|
||||||
|
@ -1320,7 +1321,7 @@ async fn zip_dir<W: AsyncWrite + Unpin>(
|
||||||
hidden: &[String],
|
hidden: &[String],
|
||||||
running: Arc<AtomicBool>,
|
running: Arc<AtomicBool>,
|
||||||
) -> Result<()> {
|
) -> Result<()> {
|
||||||
let mut writer = ZipFileWriter::new(writer);
|
let mut writer = ZipFileWriter::with_tokio(writer);
|
||||||
let hidden = Arc::new(hidden.to_vec());
|
let hidden = Arc::new(hidden.to_vec());
|
||||||
let hidden = hidden.clone();
|
let hidden = hidden.clone();
|
||||||
let dir_clone = dir.to_path_buf();
|
let dir_clone = dir.to_path_buf();
|
||||||
|
@ -1374,9 +1375,9 @@ async fn zip_dir<W: AsyncWrite + Unpin>(
|
||||||
.unix_permissions(mode)
|
.unix_permissions(mode)
|
||||||
.last_modification_date(ZipDateTime::from_chrono(&datetime));
|
.last_modification_date(ZipDateTime::from_chrono(&datetime));
|
||||||
let mut file = File::open(&zip_path).await?;
|
let mut file = File::open(&zip_path).await?;
|
||||||
let mut file_writer = writer.write_entry_stream(builder).await?;
|
let mut file_writer = writer.write_entry_stream(builder).await?.compat_write();
|
||||||
io::copy(&mut file, &mut file_writer).await?;
|
io::copy(&mut file, &mut file_writer).await?;
|
||||||
file_writer.close().await?;
|
file_writer.into_inner().close().await?;
|
||||||
}
|
}
|
||||||
writer.close().await?;
|
writer.close().await?;
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|
Loading…
Reference in a new issue