mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-09-16 14:51:37 +02:00
chore(plugins): replace deprecated zip-extract with zip
This commit is contained in:
Generated
+1
-47
@@ -4181,26 +4181,6 @@ dependencies = [
|
|||||||
"windows-link 0.2.1",
|
"windows-link 0.2.1",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "liblzma"
|
|
||||||
version = "0.4.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "66352d7a8ac12d4877b6e6ea5a9b7650ee094257dc40889955bea5bc5b08c1d0"
|
|
||||||
dependencies = [
|
|
||||||
"liblzma-sys",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "liblzma-sys"
|
|
||||||
version = "0.4.4"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "01b9596486f6d60c3bbe644c0e1be1aa6ccc472ad630fe8927b456973d7cb736"
|
|
||||||
dependencies = [
|
|
||||||
"cc",
|
|
||||||
"libc",
|
|
||||||
"pkg-config",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "libredox"
|
name = "libredox"
|
||||||
version = "0.1.3"
|
version = "0.1.3"
|
||||||
@@ -11671,7 +11651,7 @@ dependencies = [
|
|||||||
"yaak-crypto",
|
"yaak-crypto",
|
||||||
"yaak-models",
|
"yaak-models",
|
||||||
"yaak-templates",
|
"yaak-templates",
|
||||||
"zip-extract",
|
"zip 7.0.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -12094,25 +12074,10 @@ version = "4.6.1"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "caa8cd6af31c3b31c6631b8f483848b91589021b28fffe50adada48d4f4d2ed1"
|
checksum = "caa8cd6af31c3b31c6631b8f483848b91589021b28fffe50adada48d4f4d2ed1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"aes",
|
|
||||||
"arbitrary",
|
"arbitrary",
|
||||||
"bzip2",
|
|
||||||
"constant_time_eq 0.3.1",
|
|
||||||
"crc32fast",
|
"crc32fast",
|
||||||
"deflate64",
|
|
||||||
"flate2",
|
|
||||||
"getrandom 0.3.3",
|
|
||||||
"hmac",
|
|
||||||
"indexmap 2.14.0",
|
"indexmap 2.14.0",
|
||||||
"liblzma",
|
|
||||||
"memchr",
|
"memchr",
|
||||||
"pbkdf2",
|
|
||||||
"ppmd-rust",
|
|
||||||
"sha1 0.10.7",
|
|
||||||
"time",
|
|
||||||
"zeroize",
|
|
||||||
"zopfli",
|
|
||||||
"zstd",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -12143,17 +12108,6 @@ dependencies = [
|
|||||||
"zstd",
|
"zstd",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "zip-extract"
|
|
||||||
version = "0.4.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "7fa5b9958fd0b5b685af54f2c3fa21fca05fe295ebaf3e77b6d24d96c4174037"
|
|
||||||
dependencies = [
|
|
||||||
"log 0.4.34",
|
|
||||||
"thiserror 2.0.20",
|
|
||||||
"zip 4.6.1",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "zlib-rs"
|
name = "zlib-rs"
|
||||||
version = "0.6.7"
|
version = "0.6.7"
|
||||||
|
|||||||
@@ -27,4 +27,4 @@ yaak-common = { workspace = true }
|
|||||||
yaak-crypto = { workspace = true }
|
yaak-crypto = { workspace = true }
|
||||||
yaak-models = { workspace = true }
|
yaak-models = { workspace = true }
|
||||||
yaak-templates = { workspace = true }
|
yaak-templates = { workspace = true }
|
||||||
zip-extract = "0.4.0"
|
zip = "7"
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ pub enum Error {
|
|||||||
PluginErr(String),
|
PluginErr(String),
|
||||||
|
|
||||||
#[error("zip error: {0}")]
|
#[error("zip error: {0}")]
|
||||||
ZipError(#[from] zip_extract::ZipExtractError),
|
ZipError(#[from] zip::result::ZipError),
|
||||||
|
|
||||||
#[error("Client not initialized error")]
|
#[error("Client not initialized error")]
|
||||||
ClientNotInitializedErr,
|
ClientNotInitializedErr,
|
||||||
|
|||||||
@@ -65,7 +65,8 @@ pub async fn download_and_install(
|
|||||||
let _ = remove_dir_all(&plugin_dir);
|
let _ = remove_dir_all(&plugin_dir);
|
||||||
create_dir_all(&plugin_dir)?;
|
create_dir_all(&plugin_dir)?;
|
||||||
|
|
||||||
zip_extract::extract(Cursor::new(&bytes), &plugin_dir, true)?;
|
zip::ZipArchive::new(Cursor::new(&bytes))?
|
||||||
|
.extract_unwrapped_root_dir(&plugin_dir, zip::read::root_dir_common_filter)?;
|
||||||
info!("Extracted plugin {} to {}", plugin_version.id, plugin_dir_str);
|
info!("Extracted plugin {} to {}", plugin_version.id, plugin_dir_str);
|
||||||
|
|
||||||
let plugin = query_manager.with_tx(|db| {
|
let plugin = query_manager.with_tx(|db| {
|
||||||
|
|||||||
Reference in New Issue
Block a user