mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
..
This commit is contained in:
parent
35ad31180f
commit
621724fd9b
11 changed files with 10 additions and 69 deletions
42
Cargo.lock
generated
42
Cargo.lock
generated
|
|
@ -3365,7 +3365,7 @@ dependencies = [
|
|||
"kasuari",
|
||||
"lru",
|
||||
"serde",
|
||||
"strum 0.27.2",
|
||||
"strum",
|
||||
"thiserror 2.0.18",
|
||||
"unicode-segmentation",
|
||||
"unicode-truncate",
|
||||
|
|
@ -3430,7 +3430,7 @@ dependencies = [
|
|||
"line-clipping",
|
||||
"ratatui-core",
|
||||
"serde",
|
||||
"strum 0.27.2",
|
||||
"strum",
|
||||
"time",
|
||||
"unicode-segmentation",
|
||||
"unicode-width",
|
||||
|
|
@ -4227,16 +4227,7 @@ version = "0.27.2"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "af23d6f6c1a224baef9d3f61e287d2761385a5b88fdab4eb4c6f11aeb54c4bcf"
|
||||
dependencies = [
|
||||
"strum_macros 0.27.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "strum"
|
||||
version = "0.28.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9628de9b8791db39ceda2b119bbe13134770b56c138ec1d3af810d045c04f9bd"
|
||||
dependencies = [
|
||||
"strum_macros 0.28.0",
|
||||
"strum_macros",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -4251,18 +4242,6 @@ dependencies = [
|
|||
"syn 2.0.117",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "strum_macros"
|
||||
version = "0.28.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ab85eea0270ee17587ed4156089e10b9e6880ee688791d45a905f5b1ca36f664"
|
||||
dependencies = [
|
||||
"heck",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.117",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "subtle"
|
||||
version = "2.6.1"
|
||||
|
|
@ -5748,16 +5727,13 @@ version = "26.2.2"
|
|||
dependencies = [
|
||||
"anyhow",
|
||||
"crossterm 0.29.0",
|
||||
"dyn-clone",
|
||||
"hashbrown 0.16.1",
|
||||
"indexmap 2.13.0",
|
||||
"mlua",
|
||||
"ordered-float 5.2.0",
|
||||
"parking_lot",
|
||||
"ratatui",
|
||||
"serde",
|
||||
"serde_with",
|
||||
"strum 0.28.0",
|
||||
"syntect",
|
||||
"tokio",
|
||||
"tokio-stream",
|
||||
|
|
@ -5804,7 +5780,6 @@ dependencies = [
|
|||
"yazi-fs",
|
||||
"yazi-macro",
|
||||
"yazi-shared",
|
||||
"yazi-widgets",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -5924,15 +5899,11 @@ dependencies = [
|
|||
"anyhow",
|
||||
"bitflags 2.11.0",
|
||||
"crossterm 0.29.0",
|
||||
"dyn-clone",
|
||||
"hashbrown 0.16.1",
|
||||
"indexmap 2.13.0",
|
||||
"mlua",
|
||||
"ordered-float 5.2.0",
|
||||
"paste",
|
||||
"ratatui",
|
||||
"serde",
|
||||
"serde_with",
|
||||
"tokio",
|
||||
"yazi-binding",
|
||||
"yazi-boot",
|
||||
|
|
@ -5955,17 +5926,13 @@ dependencies = [
|
|||
"ansi-to-tui",
|
||||
"anyhow",
|
||||
"futures",
|
||||
"hashbrown 0.16.1",
|
||||
"libc",
|
||||
"mlua",
|
||||
"parking_lot",
|
||||
"paste",
|
||||
"ratatui",
|
||||
"serde_json",
|
||||
"syntect",
|
||||
"tokio",
|
||||
"tokio-stream",
|
||||
"tokio-util",
|
||||
"tracing",
|
||||
"twox-hash",
|
||||
"unicode-width",
|
||||
|
|
@ -5980,7 +5947,6 @@ dependencies = [
|
|||
"yazi-emulator",
|
||||
"yazi-fs",
|
||||
"yazi-macro",
|
||||
"yazi-parser",
|
||||
"yazi-proxy",
|
||||
"yazi-runner",
|
||||
"yazi-scheduler",
|
||||
|
|
@ -6001,9 +5967,7 @@ checksum = "33232d9116df6415ddfcdf72701b1b7439ce87f240a14723e8dd5d17e7ed5f98"
|
|||
name = "yazi-proxy"
|
||||
version = "26.2.2"
|
||||
dependencies = [
|
||||
"mlua",
|
||||
"tokio",
|
||||
"yazi-binding",
|
||||
"yazi-config",
|
||||
"yazi-core",
|
||||
"yazi-macro",
|
||||
|
|
|
|||
|
|
@ -67,7 +67,6 @@ scopeguard = "1.2.0"
|
|||
serde = { version = "1.0.228", features = [ "derive" ] }
|
||||
serde_json = "1.0.149"
|
||||
serde_with = "3.18.0"
|
||||
strum = { version = "0.28.0", features = [ "derive" ] }
|
||||
syntect = { version = "5.3.0", default-features = false, features = [ "parsing", "plist-load", "regex-onig" ] }
|
||||
thiserror = "2.0.18"
|
||||
tokio = { version = "1.50.0", features = [ "full" ] }
|
||||
|
|
|
|||
|
|
@ -31,16 +31,13 @@ yazi-widgets = { path = "../yazi-widgets", version = "26.2.2" }
|
|||
# External dependencies
|
||||
anyhow = { workspace = true }
|
||||
crossterm = { workspace = true }
|
||||
dyn-clone = { workspace = true }
|
||||
hashbrown = { workspace = true }
|
||||
indexmap = { workspace = true }
|
||||
mlua = { workspace = true }
|
||||
ordered-float = { workspace = true }
|
||||
parking_lot = { workspace = true }
|
||||
ratatui = { workspace = true }
|
||||
serde = { workspace = true }
|
||||
serde_with = { workspace = true }
|
||||
strum = { workspace = true }
|
||||
syntect = { workspace = true }
|
||||
tokio = { workspace = true }
|
||||
tokio-stream = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ yazi-boot = { path = "../yazi-boot", version = "26.2.2" }
|
|||
yazi-fs = { path = "../yazi-fs", version = "26.2.2" }
|
||||
yazi-macro = { path = "../yazi-macro", version = "26.2.2" }
|
||||
yazi-shared = { path = "../yazi-shared", version = "26.2.2" }
|
||||
yazi-widgets = { path = "../yazi-widgets", version = "26.2.2" }
|
||||
|
||||
# External dependencies
|
||||
anyhow = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -34,15 +34,11 @@ yazi-widgets = { path = "../yazi-widgets", version = "26.2.2" }
|
|||
anyhow = { workspace = true }
|
||||
bitflags = { workspace = true }
|
||||
crossterm = { workspace = true }
|
||||
dyn-clone = { workspace = true }
|
||||
hashbrown = { workspace = true }
|
||||
indexmap = { workspace = true }
|
||||
mlua = { workspace = true }
|
||||
ordered-float = { workspace = true }
|
||||
paste = { workspace = true }
|
||||
ratatui = { workspace = true }
|
||||
serde = { workspace = true }
|
||||
serde_with = { workspace = true }
|
||||
tokio = { workspace = true }
|
||||
|
||||
[target.'cfg(target_os = "macos")'.dependencies]
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@ yazi-dds = { path = "../yazi-dds", version = "26.2.2" }
|
|||
yazi-emulator = { path = "../yazi-emulator", version = "26.2.2" }
|
||||
yazi-fs = { path = "../yazi-fs", version = "26.2.2" }
|
||||
yazi-macro = { path = "../yazi-macro", version = "26.2.2" }
|
||||
yazi-parser = { path = "../yazi-parser", version = "26.2.2" }
|
||||
yazi-proxy = { path = "../yazi-proxy", version = "26.2.2" }
|
||||
yazi-runner = { path = "../yazi-runner", version = "26.2.2" }
|
||||
yazi-scheduler = { path = "../yazi-scheduler", version = "26.2.2" }
|
||||
|
|
@ -40,16 +39,12 @@ yazi-widgets = { path = "../yazi-widgets", version = "26.2.2" }
|
|||
ansi-to-tui = { workspace = true }
|
||||
anyhow = { workspace = true }
|
||||
futures = { workspace = true }
|
||||
hashbrown = { workspace = true }
|
||||
mlua = { workspace = true }
|
||||
parking_lot = { workspace = true }
|
||||
paste = { workspace = true }
|
||||
ratatui = { workspace = true }
|
||||
serde_json = { workspace = true }
|
||||
syntect = { workspace = true }
|
||||
tokio = { workspace = true }
|
||||
tokio-stream = { workspace = true }
|
||||
tokio-util = { workspace = true }
|
||||
tracing = { workspace = true }
|
||||
twox-hash = { workspace = true }
|
||||
unicode-width = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ rust-version.workspace = true
|
|||
workspace = true
|
||||
|
||||
[dependencies]
|
||||
yazi-binding = { path = "../yazi-binding", version = "26.2.2" }
|
||||
yazi-config = { path = "../yazi-config", version = "26.2.2" }
|
||||
yazi-core = { path = "../yazi-core", version = "26.2.2" }
|
||||
yazi-macro = { path = "../yazi-macro", version = "26.2.2" }
|
||||
|
|
@ -23,5 +22,4 @@ yazi-shared = { path = "../yazi-shared", version = "26.2.2" }
|
|||
yazi-widgets = { path = "../yazi-widgets", version = "26.2.2" }
|
||||
|
||||
# External dependencies
|
||||
mlua = { workspace = true }
|
||||
tokio = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# yazi-proxy
|
||||
# yazi-runner
|
||||
|
||||
This crate is part of [Yazi][source], and it is not supposed to be used outside, as there are no guarantees about the stability of its API.
|
||||
|
||||
|
|
|
|||
|
|
@ -6,18 +6,11 @@ use crate::{Runner, loader::LOADER, previewer::{PeekError, PeekJob}};
|
|||
impl Runner {
|
||||
pub async fn peek(&'static self, job: &PeekJob) -> mpsc::Receiver<Result<(), PeekError>> {
|
||||
let (tx, rx) = mpsc::channel(1);
|
||||
|
||||
select! {
|
||||
_ = tx.closed() => {},
|
||||
r = LOADER.ensure(&job.action.name, |c| c.sync_peek) => {
|
||||
match r {
|
||||
Ok(true) => _ = tx.try_send(Err(PeekError::ShouldSync)),
|
||||
Ok(false) => self.peek_do(job, tx),
|
||||
Err(e) => _ = tx.try_send(Err(e.into())),
|
||||
}
|
||||
},
|
||||
match LOADER.ensure(&job.action.name, |c| c.sync_peek).await {
|
||||
Ok(true) => _ = tx.try_send(Err(PeekError::ShouldSync)),
|
||||
Ok(false) => self.peek_do(job, tx),
|
||||
Err(e) => _ = tx.try_send(Err(e.into())),
|
||||
}
|
||||
|
||||
rx
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
use yazi_shared::{Id, url::UrlBuf};
|
||||
|
||||
use crate::{Task, TaskProg, file::FileInCopy};
|
||||
use crate::{Task, TaskProg};
|
||||
|
||||
#[derive(Debug)]
|
||||
pub(crate) enum HookIn {
|
||||
|
|
|
|||
|
|
@ -154,7 +154,7 @@ impl Scheduler {
|
|||
}
|
||||
|
||||
self.file.submit(FileInDownload { id, target, cha: None, retry: 0, done: done.clone() }, LOW);
|
||||
done.clone()
|
||||
done
|
||||
}
|
||||
|
||||
pub fn file_upload(&self, target: UrlBuf) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue