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",
|
"kasuari",
|
||||||
"lru",
|
"lru",
|
||||||
"serde",
|
"serde",
|
||||||
"strum 0.27.2",
|
"strum",
|
||||||
"thiserror 2.0.18",
|
"thiserror 2.0.18",
|
||||||
"unicode-segmentation",
|
"unicode-segmentation",
|
||||||
"unicode-truncate",
|
"unicode-truncate",
|
||||||
|
|
@ -3430,7 +3430,7 @@ dependencies = [
|
||||||
"line-clipping",
|
"line-clipping",
|
||||||
"ratatui-core",
|
"ratatui-core",
|
||||||
"serde",
|
"serde",
|
||||||
"strum 0.27.2",
|
"strum",
|
||||||
"time",
|
"time",
|
||||||
"unicode-segmentation",
|
"unicode-segmentation",
|
||||||
"unicode-width",
|
"unicode-width",
|
||||||
|
|
@ -4227,16 +4227,7 @@ version = "0.27.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "af23d6f6c1a224baef9d3f61e287d2761385a5b88fdab4eb4c6f11aeb54c4bcf"
|
checksum = "af23d6f6c1a224baef9d3f61e287d2761385a5b88fdab4eb4c6f11aeb54c4bcf"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"strum_macros 0.27.2",
|
"strum_macros",
|
||||||
]
|
|
||||||
|
|
||||||
[[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",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -4251,18 +4242,6 @@ dependencies = [
|
||||||
"syn 2.0.117",
|
"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]]
|
[[package]]
|
||||||
name = "subtle"
|
name = "subtle"
|
||||||
version = "2.6.1"
|
version = "2.6.1"
|
||||||
|
|
@ -5748,16 +5727,13 @@ version = "26.2.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"crossterm 0.29.0",
|
"crossterm 0.29.0",
|
||||||
"dyn-clone",
|
|
||||||
"hashbrown 0.16.1",
|
"hashbrown 0.16.1",
|
||||||
"indexmap 2.13.0",
|
"indexmap 2.13.0",
|
||||||
"mlua",
|
"mlua",
|
||||||
"ordered-float 5.2.0",
|
|
||||||
"parking_lot",
|
"parking_lot",
|
||||||
"ratatui",
|
"ratatui",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_with",
|
"serde_with",
|
||||||
"strum 0.28.0",
|
|
||||||
"syntect",
|
"syntect",
|
||||||
"tokio",
|
"tokio",
|
||||||
"tokio-stream",
|
"tokio-stream",
|
||||||
|
|
@ -5804,7 +5780,6 @@ dependencies = [
|
||||||
"yazi-fs",
|
"yazi-fs",
|
||||||
"yazi-macro",
|
"yazi-macro",
|
||||||
"yazi-shared",
|
"yazi-shared",
|
||||||
"yazi-widgets",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -5924,15 +5899,11 @@ dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"bitflags 2.11.0",
|
"bitflags 2.11.0",
|
||||||
"crossterm 0.29.0",
|
"crossterm 0.29.0",
|
||||||
"dyn-clone",
|
|
||||||
"hashbrown 0.16.1",
|
"hashbrown 0.16.1",
|
||||||
"indexmap 2.13.0",
|
|
||||||
"mlua",
|
"mlua",
|
||||||
"ordered-float 5.2.0",
|
|
||||||
"paste",
|
"paste",
|
||||||
"ratatui",
|
"ratatui",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_with",
|
|
||||||
"tokio",
|
"tokio",
|
||||||
"yazi-binding",
|
"yazi-binding",
|
||||||
"yazi-boot",
|
"yazi-boot",
|
||||||
|
|
@ -5955,17 +5926,13 @@ dependencies = [
|
||||||
"ansi-to-tui",
|
"ansi-to-tui",
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"futures",
|
"futures",
|
||||||
"hashbrown 0.16.1",
|
|
||||||
"libc",
|
"libc",
|
||||||
"mlua",
|
"mlua",
|
||||||
"parking_lot",
|
|
||||||
"paste",
|
"paste",
|
||||||
"ratatui",
|
"ratatui",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"syntect",
|
|
||||||
"tokio",
|
"tokio",
|
||||||
"tokio-stream",
|
"tokio-stream",
|
||||||
"tokio-util",
|
|
||||||
"tracing",
|
"tracing",
|
||||||
"twox-hash",
|
"twox-hash",
|
||||||
"unicode-width",
|
"unicode-width",
|
||||||
|
|
@ -5980,7 +5947,6 @@ dependencies = [
|
||||||
"yazi-emulator",
|
"yazi-emulator",
|
||||||
"yazi-fs",
|
"yazi-fs",
|
||||||
"yazi-macro",
|
"yazi-macro",
|
||||||
"yazi-parser",
|
|
||||||
"yazi-proxy",
|
"yazi-proxy",
|
||||||
"yazi-runner",
|
"yazi-runner",
|
||||||
"yazi-scheduler",
|
"yazi-scheduler",
|
||||||
|
|
@ -6001,9 +5967,7 @@ checksum = "33232d9116df6415ddfcdf72701b1b7439ce87f240a14723e8dd5d17e7ed5f98"
|
||||||
name = "yazi-proxy"
|
name = "yazi-proxy"
|
||||||
version = "26.2.2"
|
version = "26.2.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"mlua",
|
|
||||||
"tokio",
|
"tokio",
|
||||||
"yazi-binding",
|
|
||||||
"yazi-config",
|
"yazi-config",
|
||||||
"yazi-core",
|
"yazi-core",
|
||||||
"yazi-macro",
|
"yazi-macro",
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,6 @@ scopeguard = "1.2.0"
|
||||||
serde = { version = "1.0.228", features = [ "derive" ] }
|
serde = { version = "1.0.228", features = [ "derive" ] }
|
||||||
serde_json = "1.0.149"
|
serde_json = "1.0.149"
|
||||||
serde_with = "3.18.0"
|
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" ] }
|
syntect = { version = "5.3.0", default-features = false, features = [ "parsing", "plist-load", "regex-onig" ] }
|
||||||
thiserror = "2.0.18"
|
thiserror = "2.0.18"
|
||||||
tokio = { version = "1.50.0", features = [ "full" ] }
|
tokio = { version = "1.50.0", features = [ "full" ] }
|
||||||
|
|
|
||||||
|
|
@ -31,16 +31,13 @@ yazi-widgets = { path = "../yazi-widgets", version = "26.2.2" }
|
||||||
# External dependencies
|
# External dependencies
|
||||||
anyhow = { workspace = true }
|
anyhow = { workspace = true }
|
||||||
crossterm = { workspace = true }
|
crossterm = { workspace = true }
|
||||||
dyn-clone = { workspace = true }
|
|
||||||
hashbrown = { workspace = true }
|
hashbrown = { workspace = true }
|
||||||
indexmap = { workspace = true }
|
indexmap = { workspace = true }
|
||||||
mlua = { workspace = true }
|
mlua = { workspace = true }
|
||||||
ordered-float = { workspace = true }
|
|
||||||
parking_lot = { workspace = true }
|
parking_lot = { workspace = true }
|
||||||
ratatui = { workspace = true }
|
ratatui = { workspace = true }
|
||||||
serde = { workspace = true }
|
serde = { workspace = true }
|
||||||
serde_with = { workspace = true }
|
serde_with = { workspace = true }
|
||||||
strum = { workspace = true }
|
|
||||||
syntect = { workspace = true }
|
syntect = { workspace = true }
|
||||||
tokio = { workspace = true }
|
tokio = { workspace = true }
|
||||||
tokio-stream = { 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-fs = { path = "../yazi-fs", version = "26.2.2" }
|
||||||
yazi-macro = { path = "../yazi-macro", version = "26.2.2" }
|
yazi-macro = { path = "../yazi-macro", version = "26.2.2" }
|
||||||
yazi-shared = { path = "../yazi-shared", version = "26.2.2" }
|
yazi-shared = { path = "../yazi-shared", version = "26.2.2" }
|
||||||
yazi-widgets = { path = "../yazi-widgets", version = "26.2.2" }
|
|
||||||
|
|
||||||
# External dependencies
|
# External dependencies
|
||||||
anyhow = { workspace = true }
|
anyhow = { workspace = true }
|
||||||
|
|
|
||||||
|
|
@ -34,15 +34,11 @@ yazi-widgets = { path = "../yazi-widgets", version = "26.2.2" }
|
||||||
anyhow = { workspace = true }
|
anyhow = { workspace = true }
|
||||||
bitflags = { workspace = true }
|
bitflags = { workspace = true }
|
||||||
crossterm = { workspace = true }
|
crossterm = { workspace = true }
|
||||||
dyn-clone = { workspace = true }
|
|
||||||
hashbrown = { workspace = true }
|
hashbrown = { workspace = true }
|
||||||
indexmap = { workspace = true }
|
|
||||||
mlua = { workspace = true }
|
mlua = { workspace = true }
|
||||||
ordered-float = { workspace = true }
|
|
||||||
paste = { workspace = true }
|
paste = { workspace = true }
|
||||||
ratatui = { workspace = true }
|
ratatui = { workspace = true }
|
||||||
serde = { workspace = true }
|
serde = { workspace = true }
|
||||||
serde_with = { workspace = true }
|
|
||||||
tokio = { workspace = true }
|
tokio = { workspace = true }
|
||||||
|
|
||||||
[target.'cfg(target_os = "macos")'.dependencies]
|
[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-emulator = { path = "../yazi-emulator", version = "26.2.2" }
|
||||||
yazi-fs = { path = "../yazi-fs", version = "26.2.2" }
|
yazi-fs = { path = "../yazi-fs", version = "26.2.2" }
|
||||||
yazi-macro = { path = "../yazi-macro", 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-proxy = { path = "../yazi-proxy", version = "26.2.2" }
|
||||||
yazi-runner = { path = "../yazi-runner", version = "26.2.2" }
|
yazi-runner = { path = "../yazi-runner", version = "26.2.2" }
|
||||||
yazi-scheduler = { path = "../yazi-scheduler", 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 }
|
ansi-to-tui = { workspace = true }
|
||||||
anyhow = { workspace = true }
|
anyhow = { workspace = true }
|
||||||
futures = { workspace = true }
|
futures = { workspace = true }
|
||||||
hashbrown = { workspace = true }
|
|
||||||
mlua = { workspace = true }
|
mlua = { workspace = true }
|
||||||
parking_lot = { workspace = true }
|
|
||||||
paste = { workspace = true }
|
paste = { workspace = true }
|
||||||
ratatui = { workspace = true }
|
ratatui = { workspace = true }
|
||||||
serde_json = { workspace = true }
|
serde_json = { workspace = true }
|
||||||
syntect = { workspace = true }
|
|
||||||
tokio = { workspace = true }
|
tokio = { workspace = true }
|
||||||
tokio-stream = { workspace = true }
|
tokio-stream = { workspace = true }
|
||||||
tokio-util = { workspace = true }
|
|
||||||
tracing = { workspace = true }
|
tracing = { workspace = true }
|
||||||
twox-hash = { workspace = true }
|
twox-hash = { workspace = true }
|
||||||
unicode-width = { workspace = true }
|
unicode-width = { workspace = true }
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@ rust-version.workspace = true
|
||||||
workspace = true
|
workspace = true
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
yazi-binding = { path = "../yazi-binding", version = "26.2.2" }
|
|
||||||
yazi-config = { path = "../yazi-config", version = "26.2.2" }
|
yazi-config = { path = "../yazi-config", version = "26.2.2" }
|
||||||
yazi-core = { path = "../yazi-core", version = "26.2.2" }
|
yazi-core = { path = "../yazi-core", version = "26.2.2" }
|
||||||
yazi-macro = { path = "../yazi-macro", 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" }
|
yazi-widgets = { path = "../yazi-widgets", version = "26.2.2" }
|
||||||
|
|
||||||
# External dependencies
|
# External dependencies
|
||||||
mlua = { workspace = true }
|
|
||||||
tokio = { 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.
|
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 {
|
impl Runner {
|
||||||
pub async fn peek(&'static self, job: &PeekJob) -> mpsc::Receiver<Result<(), PeekError>> {
|
pub async fn peek(&'static self, job: &PeekJob) -> mpsc::Receiver<Result<(), PeekError>> {
|
||||||
let (tx, rx) = mpsc::channel(1);
|
let (tx, rx) = mpsc::channel(1);
|
||||||
|
match LOADER.ensure(&job.action.name, |c| c.sync_peek).await {
|
||||||
select! {
|
Ok(true) => _ = tx.try_send(Err(PeekError::ShouldSync)),
|
||||||
_ = tx.closed() => {},
|
Ok(false) => self.peek_do(job, tx),
|
||||||
r = LOADER.ensure(&job.action.name, |c| c.sync_peek) => {
|
Err(e) => _ = tx.try_send(Err(e.into())),
|
||||||
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())),
|
|
||||||
}
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
rx
|
rx
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
use yazi_shared::{Id, url::UrlBuf};
|
use yazi_shared::{Id, url::UrlBuf};
|
||||||
|
|
||||||
use crate::{Task, TaskProg, file::FileInCopy};
|
use crate::{Task, TaskProg};
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub(crate) enum HookIn {
|
pub(crate) enum HookIn {
|
||||||
|
|
|
||||||
|
|
@ -154,7 +154,7 @@ impl Scheduler {
|
||||||
}
|
}
|
||||||
|
|
||||||
self.file.submit(FileInDownload { id, target, cha: None, retry: 0, done: done.clone() }, LOW);
|
self.file.submit(FileInDownload { id, target, cha: None, retry: 0, done: done.clone() }, LOW);
|
||||||
done.clone()
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn file_upload(&self, target: UrlBuf) {
|
pub fn file_upload(&self, target: UrlBuf) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue