build: Don't re-export foreign crates in utils (#4087)
* build(utils): Don't use reexported dependency for internal code, but use the dependency directly. * build(client): Don't use re-exports from `utils` but turn `zellij-utils` dependencies into shared workspace dependencies instead and specify those in `Cargo.toml` explicitly. This gives a much better overview of what component in zellij uses which crates. The previous approach hides a lot of this information since it looks like crates are used in a single place where this isn't actually true. * deps(tile): Don't use re-exports from zellij-utils. * build(zellij): Don't use re-exports from zellij-utils. * build(server): Don't use re-exports from zellij-utils. * build(utils): Don't re-export foreign crates. * docs: Update Changelog with PR #4087. * style: Apply rustfmt. * style: Apply rustfmt. * build(e2e): Don't use re-export from zellij-utils. * test: Restore e2e tests. * style: Apply more formatting.
This commit is contained in:
parent
a2ae82259c
commit
6be8c495bc
48 changed files with 180 additions and 121 deletions
|
|
@ -8,6 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
||||||
* refactor(terminal): track scroll_region as tuple rather than Option (https://github.com/zellij-org/zellij/pull/4082)
|
* refactor(terminal): track scroll_region as tuple rather than Option (https://github.com/zellij-org/zellij/pull/4082)
|
||||||
* chore(deps): Use workspace dependencies (https://github.com/zellij-org/zellij/pull/4085)
|
* chore(deps): Use workspace dependencies (https://github.com/zellij-org/zellij/pull/4085)
|
||||||
* build: Don't use default features (https://github.com/zellij-org/zellij/pull/4086)
|
* build: Don't use default features (https://github.com/zellij-org/zellij/pull/4086)
|
||||||
|
* build: Don't re-export foreign crates (https://github.com/zellij-org/zellij/pull/4087)
|
||||||
|
|
||||||
## [0.42.1] - 2025-03-21
|
## [0.42.1] - 2025-03-21
|
||||||
* fix(mouse): fix mouse handling in windows terminal (https://github.com/zellij-org/zellij/pull/4076)
|
* fix(mouse): fix mouse handling in windows terminal (https://github.com/zellij-org/zellij/pull/4076)
|
||||||
|
|
|
||||||
39
Cargo.lock
generated
39
Cargo.lock
generated
|
|
@ -4976,15 +4976,22 @@ dependencies = [
|
||||||
name = "zellij"
|
name = "zellij"
|
||||||
version = "0.43.0"
|
version = "0.43.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"anyhow",
|
||||||
|
"clap",
|
||||||
"dialoguer",
|
"dialoguer",
|
||||||
|
"humantime",
|
||||||
"insta",
|
"insta",
|
||||||
|
"interprocess",
|
||||||
"log",
|
"log",
|
||||||
|
"miette",
|
||||||
"names",
|
"names",
|
||||||
|
"nix 0.23.1",
|
||||||
"rand 0.8.5",
|
"rand 0.8.5",
|
||||||
"regex",
|
"regex",
|
||||||
"ssh2",
|
"ssh2",
|
||||||
"suggest",
|
"suggest",
|
||||||
"thiserror 1.0.61",
|
"thiserror 1.0.61",
|
||||||
|
"vte 0.11.0",
|
||||||
"zellij-client",
|
"zellij-client",
|
||||||
"zellij-server",
|
"zellij-server",
|
||||||
"zellij-utils",
|
"zellij-utils",
|
||||||
|
|
@ -4994,13 +5001,23 @@ dependencies = [
|
||||||
name = "zellij-client"
|
name = "zellij-client"
|
||||||
version = "0.43.0"
|
version = "0.43.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"anyhow",
|
||||||
"insta",
|
"insta",
|
||||||
|
"interprocess",
|
||||||
|
"lazy_static",
|
||||||
|
"libc",
|
||||||
"log",
|
"log",
|
||||||
"mio 0.7.14",
|
"mio 0.7.14",
|
||||||
|
"nix 0.23.1",
|
||||||
|
"notify-debouncer-full",
|
||||||
|
"regex",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"serde_yaml",
|
"serde_yaml",
|
||||||
|
"signal-hook",
|
||||||
|
"termwiz",
|
||||||
"url",
|
"url",
|
||||||
|
"uuid",
|
||||||
"zellij-utils",
|
"zellij-utils",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
@ -5009,7 +5026,10 @@ name = "zellij-server"
|
||||||
version = "0.43.0"
|
version = "0.43.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ansi_term",
|
"ansi_term",
|
||||||
|
"anyhow",
|
||||||
"arrayvec 0.7.2",
|
"arrayvec 0.7.2",
|
||||||
|
"async-channel",
|
||||||
|
"async-std",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"base64 0.13.0",
|
"base64 0.13.0",
|
||||||
"byteorder",
|
"byteorder",
|
||||||
|
|
@ -5020,9 +5040,19 @@ dependencies = [
|
||||||
"daemonize",
|
"daemonize",
|
||||||
"highway",
|
"highway",
|
||||||
"insta",
|
"insta",
|
||||||
|
"interprocess",
|
||||||
|
"isahc",
|
||||||
|
"lazy_static",
|
||||||
|
"libc",
|
||||||
"log",
|
"log",
|
||||||
|
"nix 0.23.1",
|
||||||
|
"notify-debouncer-full",
|
||||||
|
"prost",
|
||||||
|
"regex",
|
||||||
"semver 0.11.0",
|
"semver 0.11.0",
|
||||||
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
|
"signal-hook",
|
||||||
"sixel-image",
|
"sixel-image",
|
||||||
"sixel-tokenizer",
|
"sixel-tokenizer",
|
||||||
"sysinfo",
|
"sysinfo",
|
||||||
|
|
@ -5031,6 +5061,7 @@ dependencies = [
|
||||||
"unicode-width 0.1.10",
|
"unicode-width 0.1.10",
|
||||||
"url",
|
"url",
|
||||||
"uuid",
|
"uuid",
|
||||||
|
"vte 0.11.0",
|
||||||
"wasmtime",
|
"wasmtime",
|
||||||
"wasmtime-wasi",
|
"wasmtime-wasi",
|
||||||
"zellij-utils",
|
"zellij-utils",
|
||||||
|
|
@ -5041,6 +5072,7 @@ name = "zellij-tile"
|
||||||
version = "0.43.0"
|
version = "0.43.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"clap",
|
"clap",
|
||||||
|
"prost",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"strum",
|
"strum",
|
||||||
|
|
@ -5060,7 +5092,6 @@ name = "zellij-utils"
|
||||||
version = "0.43.0"
|
version = "0.43.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"async-channel",
|
|
||||||
"async-std",
|
"async-std",
|
||||||
"backtrace",
|
"backtrace",
|
||||||
"bitflags 2.5.0",
|
"bitflags 2.5.0",
|
||||||
|
|
@ -5072,29 +5103,24 @@ dependencies = [
|
||||||
"curl-sys",
|
"curl-sys",
|
||||||
"directories",
|
"directories",
|
||||||
"expect-test",
|
"expect-test",
|
||||||
"humantime",
|
|
||||||
"include_dir",
|
"include_dir",
|
||||||
"insta",
|
"insta",
|
||||||
"interprocess",
|
"interprocess",
|
||||||
"isahc",
|
"isahc",
|
||||||
"kdl",
|
"kdl",
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
"libc",
|
|
||||||
"log",
|
"log",
|
||||||
"log4rs",
|
"log4rs",
|
||||||
"miette",
|
"miette",
|
||||||
"nix 0.23.1",
|
"nix 0.23.1",
|
||||||
"notify-debouncer-full",
|
|
||||||
"openssl-sys",
|
"openssl-sys",
|
||||||
"percent-encoding",
|
"percent-encoding",
|
||||||
"prost",
|
"prost",
|
||||||
"prost-build",
|
"prost-build",
|
||||||
"regex",
|
|
||||||
"rmp-serde",
|
"rmp-serde",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"shellexpand 3.0.0",
|
"shellexpand 3.0.0",
|
||||||
"signal-hook",
|
|
||||||
"strip-ansi-escapes",
|
"strip-ansi-escapes",
|
||||||
"strum",
|
"strum",
|
||||||
"strum_macros",
|
"strum_macros",
|
||||||
|
|
@ -5104,7 +5130,6 @@ dependencies = [
|
||||||
"unicode-width 0.1.10",
|
"unicode-width 0.1.10",
|
||||||
"url",
|
"url",
|
||||||
"uuid",
|
"uuid",
|
||||||
"vte 0.11.0",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
|
||||||
21
Cargo.toml
21
Cargo.toml
|
|
@ -17,9 +17,15 @@ rust-version = "1.84"
|
||||||
zellij-client = { path = "zellij-client/", version = "0.43.0" }
|
zellij-client = { path = "zellij-client/", version = "0.43.0" }
|
||||||
zellij-server = { path = "zellij-server/", version = "0.43.0" }
|
zellij-server = { path = "zellij-server/", version = "0.43.0" }
|
||||||
zellij-utils = { workspace = true }
|
zellij-utils = { workspace = true }
|
||||||
|
anyhow = { workspace = true }
|
||||||
|
clap = { workspace = true }
|
||||||
dialoguer = { version = "0.10.4", default-features = false }
|
dialoguer = { version = "0.10.4", default-features = false }
|
||||||
|
humantime = { version = "2.1.0", default-features = false }
|
||||||
|
interprocess = { workspace = true }
|
||||||
log = { workspace = true }
|
log = { workspace = true }
|
||||||
|
miette = { workspace = true }
|
||||||
names = { version = "0.14.0", default-features = false }
|
names = { version = "0.14.0", default-features = false }
|
||||||
|
nix = { workspace = true }
|
||||||
suggest = { version = "0.4.0", default-features = false }
|
suggest = { version = "0.4.0", default-features = false }
|
||||||
thiserror = { workspace = true }
|
thiserror = { workspace = true }
|
||||||
|
|
||||||
|
|
@ -28,6 +34,7 @@ insta = { version = "1.6.0", features = ["backtrace"] }
|
||||||
ssh2 = "0.9.1"
|
ssh2 = "0.9.1"
|
||||||
rand = "0.8.0"
|
rand = "0.8.0"
|
||||||
regex = "1.8.1"
|
regex = "1.8.1"
|
||||||
|
vte = { workspace = true }
|
||||||
|
|
||||||
[workspace]
|
[workspace]
|
||||||
members = [
|
members = [
|
||||||
|
|
@ -52,16 +59,30 @@ members = [
|
||||||
[workspace.dependencies]
|
[workspace.dependencies]
|
||||||
ansi_term = { version = "0.12.1", default-features = false }
|
ansi_term = { version = "0.12.1", default-features = false }
|
||||||
anyhow = { version = "1.0.70", default-features = false, features = ["backtrace", "std"] }
|
anyhow = { version = "1.0.70", default-features = false, features = ["backtrace", "std"] }
|
||||||
|
async-std = { version = "1.3.0", default-features = false, features = ["attributes", "default", "std", "unstable"] }
|
||||||
clap = { version = "3.2.2", default-features = false, features = ["env", "derive", "color", "std", "suggestions"] }
|
clap = { version = "3.2.2", default-features = false, features = ["env", "derive", "color", "std", "suggestions"] }
|
||||||
|
interprocess = { version = "1.2.1", default-features = false }
|
||||||
|
isahc = { version = "1.7.2", default-features = false, features = ["http2", "text-decoding"] }
|
||||||
|
lazy_static = { version = "1.4.0", default-features = false }
|
||||||
|
libc = { version = "0.2", default-features = false, features = ["std"] }
|
||||||
log = { version = "0.4.17", default-features = false }
|
log = { version = "0.4.17", default-features = false }
|
||||||
|
miette = { version = "5.7.0", default-features = false, features = ["fancy"] }
|
||||||
|
nix = { version = "0.23.1", default-features = false }
|
||||||
|
notify-debouncer-full = { version = "0.1.0", default-features = false }
|
||||||
|
prost = { version = "0.11.9", default-features = false, features = ["std", "prost-derive"] }
|
||||||
|
regex = { version = "1.5.5", default-features = false, features = ["perf", "std"] }
|
||||||
serde = { version = "1.0", default-features = false, features = ["derive", "std"] }
|
serde = { version = "1.0", default-features = false, features = ["derive", "std"] }
|
||||||
serde_json = { version = "1.0", default-features = false, features = ["std"] }
|
serde_json = { version = "1.0", default-features = false, features = ["std"] }
|
||||||
|
signal-hook = { version = "0.3", default-features = false, features = ["iterator"] }
|
||||||
strum = { version = "0.20.0", default-features = false }
|
strum = { version = "0.20.0", default-features = false }
|
||||||
strum_macros = { version = "0.20.0", default-features = false }
|
strum_macros = { version = "0.20.0", default-features = false }
|
||||||
|
tempfile = { version = "3.2.0", default-features = false }
|
||||||
|
termwiz = { version = "0.23.2", default-features = false }
|
||||||
thiserror = { version = "1.0.40", default-features = false }
|
thiserror = { version = "1.0.40", default-features = false }
|
||||||
unicode-width = { version = "0.1.8", default-features = false }
|
unicode-width = { version = "0.1.8", default-features = false }
|
||||||
url = { version = "2.2.2", default-features = false, features = ["serde"] }
|
url = { version = "2.2.2", default-features = false, features = ["serde"] }
|
||||||
uuid = { version = "1.4.1", default-features = false, features = ["serde", "v4", "std"] }
|
uuid = { version = "1.4.1", default-features = false, features = ["serde", "v4", "std"] }
|
||||||
|
vte = { version = "0.11.0", default-features = false }
|
||||||
zellij-utils = { path = "zellij-utils/", version = "0.43.0" }
|
zellij-utils = { path = "zellij-utils/", version = "0.43.0" }
|
||||||
|
|
||||||
[profile.dev-opt]
|
[profile.dev-opt]
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,8 @@ use crate::sessions::{
|
||||||
print_sessions_with_index, resurrection_layout, session_exists, ActiveSession,
|
print_sessions_with_index, resurrection_layout, session_exists, ActiveSession,
|
||||||
SessionNameMatch,
|
SessionNameMatch,
|
||||||
};
|
};
|
||||||
|
use miette::{Report, Result};
|
||||||
|
use nix;
|
||||||
use zellij_client::{
|
use zellij_client::{
|
||||||
old_config_converter::{
|
old_config_converter::{
|
||||||
config_yaml_to_config_kdl, convert_old_yaml_files, layout_yaml_to_layout_kdl,
|
config_yaml_to_config_kdl, convert_old_yaml_files, layout_yaml_to_layout_kdl,
|
||||||
|
|
@ -27,8 +29,6 @@ use zellij_utils::{
|
||||||
layout::Layout,
|
layout::Layout,
|
||||||
options::Options,
|
options::Options,
|
||||||
},
|
},
|
||||||
miette::{Report, Result},
|
|
||||||
nix,
|
|
||||||
setup::{find_default_config_dir, get_layout_dir, Setup},
|
setup::{find_default_config_dir, get_layout_dir, Setup},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,8 @@ mod sessions;
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests;
|
mod tests;
|
||||||
|
|
||||||
|
use clap::Parser;
|
||||||
use zellij_utils::{
|
use zellij_utils::{
|
||||||
clap::Parser,
|
|
||||||
cli::{CliAction, CliArgs, Command, Sessions},
|
cli::{CliAction, CliArgs, Command, Sessions},
|
||||||
consts::create_config_and_cache_folders,
|
consts::create_config_and_cache_folders,
|
||||||
envs,
|
envs,
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,18 @@
|
||||||
|
use anyhow;
|
||||||
|
use humantime::format_duration;
|
||||||
|
use interprocess::local_socket::LocalSocketStream;
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use std::os::unix::fs::FileTypeExt;
|
use std::os::unix::fs::FileTypeExt;
|
||||||
use std::time::{Duration, SystemTime};
|
use std::time::{Duration, SystemTime};
|
||||||
use std::{fs, io, process};
|
use std::{fs, io, process};
|
||||||
use suggest::Suggest;
|
use suggest::Suggest;
|
||||||
use zellij_utils::{
|
use zellij_utils::{
|
||||||
anyhow,
|
|
||||||
consts::{
|
consts::{
|
||||||
session_info_folder_for_session, session_layout_cache_file_name,
|
session_info_folder_for_session, session_layout_cache_file_name,
|
||||||
ZELLIJ_SESSION_INFO_CACHE_DIR, ZELLIJ_SOCK_DIR,
|
ZELLIJ_SESSION_INFO_CACHE_DIR, ZELLIJ_SOCK_DIR,
|
||||||
},
|
},
|
||||||
envs,
|
envs,
|
||||||
humantime::format_duration,
|
|
||||||
input::layout::Layout,
|
input::layout::Layout,
|
||||||
interprocess::local_socket::LocalSocketStream,
|
|
||||||
ipc::{ClientToServerMsg, IpcReceiverWithContext, IpcSenderWithContext, ServerToClientMsg},
|
ipc::{ClientToServerMsg, IpcReceiverWithContext, IpcSenderWithContext, ServerToClientMsg},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,11 +2,11 @@ use std::collections::HashMap;
|
||||||
use std::sync::atomic::{AtomicBool, Ordering};
|
use std::sync::atomic::{AtomicBool, Ordering};
|
||||||
use std::sync::{Arc, Mutex};
|
use std::sync::{Arc, Mutex};
|
||||||
|
|
||||||
|
use vte;
|
||||||
use zellij_server::panes::sixel::SixelImageStore;
|
use zellij_server::panes::sixel::SixelImageStore;
|
||||||
use zellij_server::panes::{LinkHandler, TerminalPane};
|
use zellij_server::panes::{LinkHandler, TerminalPane};
|
||||||
use zellij_utils::data::{Palette, Style};
|
use zellij_utils::data::{Palette, Style};
|
||||||
use zellij_utils::pane_size::{Dimension, PaneGeom, Size, SizeInPixels};
|
use zellij_utils::pane_size::{Dimension, PaneGeom, Size, SizeInPixels};
|
||||||
use zellij_utils::vte;
|
|
||||||
|
|
||||||
use ssh2::Session;
|
use ssh2::Session;
|
||||||
use std::io::prelude::*;
|
use std::io::prelude::*;
|
||||||
|
|
|
||||||
|
|
@ -9,12 +9,22 @@ license = "MIT"
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
anyhow = { workspace = true }
|
||||||
|
interprocess = { workspace = true }
|
||||||
|
lazy_static = { workspace = true }
|
||||||
|
libc = { workspace = true }
|
||||||
log = { workspace = true }
|
log = { workspace = true }
|
||||||
mio = { version = "0.7.11", default-features = false, features = ['os-ext'] }
|
mio = { version = "0.7.11", default-features = false, features = ['os-ext'] }
|
||||||
|
nix = { workspace = true }
|
||||||
|
notify-debouncer-full = { workspace = true }
|
||||||
|
regex = { workspace = true }
|
||||||
serde = { workspace = true }
|
serde = { workspace = true }
|
||||||
serde_json = { workspace = true }
|
serde_json = { workspace = true }
|
||||||
serde_yaml = { version = "0.8", default-features = false }
|
serde_yaml = { version = "0.8", default-features = false }
|
||||||
|
signal-hook = { workspace = true }
|
||||||
|
termwiz = { workspace = true }
|
||||||
url = { workspace = true }
|
url = { workspace = true }
|
||||||
|
uuid = { workspace = true }
|
||||||
zellij-utils = { workspace = true }
|
zellij-utils = { workspace = true }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
|
|
|
||||||
|
|
@ -6,11 +6,11 @@ use std::process;
|
||||||
use std::{fs, path::PathBuf};
|
use std::{fs, path::PathBuf};
|
||||||
|
|
||||||
use crate::os_input_output::ClientOsApi;
|
use crate::os_input_output::ClientOsApi;
|
||||||
|
use uuid::Uuid;
|
||||||
use zellij_utils::{
|
use zellij_utils::{
|
||||||
errors::prelude::*,
|
errors::prelude::*,
|
||||||
input::actions::Action,
|
input::actions::Action,
|
||||||
ipc::{ClientToServerMsg, ExitReason, ServerToClientMsg},
|
ipc::{ClientToServerMsg, ExitReason, ServerToClientMsg},
|
||||||
uuid::Uuid,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
pub fn start_cli_client(
|
pub fn start_cli_client(
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ use crate::{
|
||||||
os_input_output::ClientOsApi, stdin_ansi_parser::AnsiStdinInstruction, ClientId,
|
os_input_output::ClientOsApi, stdin_ansi_parser::AnsiStdinInstruction, ClientId,
|
||||||
ClientInstruction, CommandIsExecuting, InputInstruction,
|
ClientInstruction, CommandIsExecuting, InputInstruction,
|
||||||
};
|
};
|
||||||
|
use termwiz::input::{InputEvent, Modifiers, MouseButtons, MouseEvent as TermwizMouseEvent};
|
||||||
use zellij_utils::{
|
use zellij_utils::{
|
||||||
channels::{Receiver, SenderWithContext, OPENCALLS},
|
channels::{Receiver, SenderWithContext, OPENCALLS},
|
||||||
data::{InputMode, KeyWithModifier},
|
data::{InputMode, KeyWithModifier},
|
||||||
|
|
@ -16,7 +17,6 @@ use zellij_utils::{
|
||||||
},
|
},
|
||||||
ipc::{ClientToServerMsg, ExitReason},
|
ipc::{ClientToServerMsg, ExitReason},
|
||||||
position::Position,
|
position::Position,
|
||||||
termwiz::input::{InputEvent, Modifiers, MouseButtons, MouseEvent as TermwizMouseEvent},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Handles the dispatching of [`Action`]s according to the current
|
/// Handles the dispatching of [`Action`]s according to the current
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ use std::sync::{Arc, Mutex};
|
||||||
use std::thread;
|
use std::thread;
|
||||||
use zellij_utils::errors::FatalError;
|
use zellij_utils::errors::FatalError;
|
||||||
|
|
||||||
use zellij_utils::notify_debouncer_full::notify::{self, Event, RecursiveMode, Watcher};
|
use notify_debouncer_full::notify::{self, Event, RecursiveMode, Watcher};
|
||||||
use zellij_utils::setup::Setup;
|
use zellij_utils::setup::Setup;
|
||||||
|
|
||||||
use crate::stdin_ansi_parser::{AnsiStdinInstruction, StdinAnsiParser, SyncOutput};
|
use crate::stdin_ansi_parser::{AnsiStdinInstruction, StdinAnsiParser, SyncOutput};
|
||||||
|
|
@ -25,6 +25,7 @@ use crate::{
|
||||||
command_is_executing::CommandIsExecuting, input_handler::input_loop,
|
command_is_executing::CommandIsExecuting, input_handler::input_loop,
|
||||||
os_input_output::ClientOsApi, stdin_handler::stdin_loop,
|
os_input_output::ClientOsApi, stdin_handler::stdin_loop,
|
||||||
};
|
};
|
||||||
|
use termwiz::input::InputEvent;
|
||||||
use zellij_utils::{
|
use zellij_utils::{
|
||||||
channels::{self, ChannelWithContext, SenderWithContext},
|
channels::{self, ChannelWithContext, SenderWithContext},
|
||||||
consts::{set_permissions, ZELLIJ_SOCK_DIR},
|
consts::{set_permissions, ZELLIJ_SOCK_DIR},
|
||||||
|
|
@ -34,7 +35,6 @@ use zellij_utils::{
|
||||||
input::{config::Config, options::Options},
|
input::{config::Config, options::Options},
|
||||||
ipc::{ClientAttributes, ClientToServerMsg, ExitReason, ServerToClientMsg},
|
ipc::{ClientAttributes, ClientToServerMsg, ExitReason, ServerToClientMsg},
|
||||||
pane_size::Size,
|
pane_size::Size,
|
||||||
termwiz::input::InputEvent,
|
|
||||||
};
|
};
|
||||||
use zellij_utils::{cli::CliArgs, input::layout::Layout};
|
use zellij_utils::{cli::CliArgs, input::layout::Layout};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,9 @@
|
||||||
use zellij_utils::anyhow::{Context, Result};
|
use anyhow::{Context, Result};
|
||||||
|
use interprocess;
|
||||||
|
use libc;
|
||||||
|
use nix;
|
||||||
|
use signal_hook;
|
||||||
use zellij_utils::pane_size::Size;
|
use zellij_utils::pane_size::Size;
|
||||||
use zellij_utils::{interprocess, libc, nix, signal_hook};
|
|
||||||
|
|
||||||
use interprocess::local_socket::LocalSocketStream;
|
use interprocess::local_socket::LocalSocketStream;
|
||||||
use mio::{unix::SourceFd, Events, Interest, Poll, Token};
|
use mio::{unix::SourceFd, Events, Interest, Poll, Token};
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,16 @@
|
||||||
use std::time::{Duration, Instant};
|
use std::time::{Duration, Instant};
|
||||||
|
|
||||||
const STARTUP_PARSE_DEADLINE_MS: u64 = 500;
|
const STARTUP_PARSE_DEADLINE_MS: u64 = 500;
|
||||||
|
use lazy_static::lazy_static;
|
||||||
|
use regex::Regex;
|
||||||
use zellij_utils::{
|
use zellij_utils::{
|
||||||
consts::ZELLIJ_STDIN_CACHE_FILE, ipc::PixelDimensions, lazy_static::lazy_static,
|
consts::ZELLIJ_STDIN_CACHE_FILE, ipc::PixelDimensions, pane_size::SizeInPixels,
|
||||||
pane_size::SizeInPixels, regex::Regex,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
use anyhow::Result;
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use std::fs::{File, OpenOptions};
|
use std::fs::{File, OpenOptions};
|
||||||
use std::io::{Read, Write};
|
use std::io::{Read, Write};
|
||||||
use zellij_utils::anyhow::Result;
|
|
||||||
|
|
||||||
/// Describe the terminal implementation of synchronised output
|
/// Describe the terminal implementation of synchronised output
|
||||||
#[derive(Debug, Clone, Copy, Serialize, Deserialize)]
|
#[derive(Debug, Clone, Copy, Serialize, Deserialize)]
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,8 @@ use crate::os_input_output::ClientOsApi;
|
||||||
use crate::stdin_ansi_parser::StdinAnsiParser;
|
use crate::stdin_ansi_parser::StdinAnsiParser;
|
||||||
use crate::InputInstruction;
|
use crate::InputInstruction;
|
||||||
use std::sync::{Arc, Mutex};
|
use std::sync::{Arc, Mutex};
|
||||||
|
use termwiz::input::{InputEvent, InputParser, MouseButtons};
|
||||||
use zellij_utils::channels::SenderWithContext;
|
use zellij_utils::channels::SenderWithContext;
|
||||||
use zellij_utils::termwiz::input::{InputEvent, InputParser, MouseButtons};
|
|
||||||
|
|
||||||
fn send_done_parsing_after_query_timeout(
|
fn send_done_parsing_after_query_timeout(
|
||||||
send_input_instructions: SenderWithContext<InputInstruction>,
|
send_input_instructions: SenderWithContext<InputInstruction>,
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,10 @@ license = "MIT"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
ansi_term = { workspace = true }
|
ansi_term = { workspace = true }
|
||||||
|
anyhow = { workspace = true }
|
||||||
arrayvec = { version = "0.7.2", default-features = false, features = ["std"] }
|
arrayvec = { version = "0.7.2", default-features = false, features = ["std"] }
|
||||||
|
async-channel = { version = "1.8.0", default-features = false }
|
||||||
|
async-std = { workspace = true }
|
||||||
async-trait = { version = "0.1.50", default-features = false }
|
async-trait = { version = "0.1.50", default-features = false }
|
||||||
base64 = { version = "0.13.0", default-features = false, features = ["std"] }
|
base64 = { version = "0.13.0", default-features = false, features = ["std"] }
|
||||||
byteorder = { version = "1.4.3", default-features = false, features = ["std"] }
|
byteorder = { version = "1.4.3", default-features = false, features = ["std"] }
|
||||||
|
|
@ -20,16 +23,28 @@ chrono = { version = "0.4.19", default-features = false, features = ["std", "clo
|
||||||
close_fds = { version = "0.3.2", default-features = false }
|
close_fds = { version = "0.3.2", default-features = false }
|
||||||
daemonize = { version = "0.5", default-features = false }
|
daemonize = { version = "0.5", default-features = false }
|
||||||
highway = { version = "0.6.4", default-features = false, features = ["std"] }
|
highway = { version = "0.6.4", default-features = false, features = ["std"] }
|
||||||
|
interprocess = { workspace = true }
|
||||||
|
isahc = { workspace = true }
|
||||||
|
lazy_static = { workspace = true }
|
||||||
|
libc = { workspace = true }
|
||||||
log = { workspace = true }
|
log = { workspace = true }
|
||||||
|
nix = { workspace = true }
|
||||||
|
notify-debouncer-full = { workspace = true }
|
||||||
|
prost = { workspace = true }
|
||||||
|
regex = { workspace = true }
|
||||||
semver = { version = "0.11.0", default-features = false }
|
semver = { version = "0.11.0", default-features = false }
|
||||||
|
serde = { workspace = true }
|
||||||
serde_json = { workspace = true }
|
serde_json = { workspace = true }
|
||||||
|
signal-hook = { workspace = true }
|
||||||
sixel-image = { version = "0.1.0", default-features = false }
|
sixel-image = { version = "0.1.0", default-features = false }
|
||||||
sixel-tokenizer = { version = "0.1.0", default-features = false }
|
sixel-tokenizer = { version = "0.1.0", default-features = false }
|
||||||
sysinfo = { version = "0.22.5", default-features = false }
|
sysinfo = { version = "0.22.5", default-features = false }
|
||||||
|
tempfile = { workspace = true }
|
||||||
typetag = { version = "0.1.7", default-features = false }
|
typetag = { version = "0.1.7", default-features = false }
|
||||||
unicode-width = { workspace = true }
|
unicode-width = { workspace = true }
|
||||||
url = { workspace = true }
|
url = { workspace = true }
|
||||||
uuid = { workspace = true }
|
uuid = { workspace = true }
|
||||||
|
vte = { workspace = true }
|
||||||
wasmtime-wasi = { version = "29.0.1", default-features = false, features = ["preview1"] } # Keep in sync with wasmtime
|
wasmtime-wasi = { version = "29.0.1", default-features = false, features = ["preview1"] } # Keep in sync with wasmtime
|
||||||
zellij-utils = { workspace = true }
|
zellij-utils = { workspace = true }
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
use zellij_utils::async_std::task;
|
use async_std::task;
|
||||||
use zellij_utils::consts::{
|
use zellij_utils::consts::{
|
||||||
session_info_cache_file_name, session_info_folder_for_session, session_layout_cache_file_name,
|
session_info_cache_file_name, session_info_folder_for_session, session_layout_cache_file_name,
|
||||||
ZELLIJ_SESSION_INFO_CACHE_DIR, ZELLIJ_SOCK_DIR,
|
ZELLIJ_SESSION_INFO_CACHE_DIR, ZELLIJ_SOCK_DIR,
|
||||||
|
|
@ -7,9 +7,9 @@ use zellij_utils::data::{Event, HttpVerb, SessionInfo};
|
||||||
use zellij_utils::errors::{prelude::*, BackgroundJobContext, ContextType};
|
use zellij_utils::errors::{prelude::*, BackgroundJobContext, ContextType};
|
||||||
use zellij_utils::input::layout::RunPlugin;
|
use zellij_utils::input::layout::RunPlugin;
|
||||||
|
|
||||||
use zellij_utils::isahc::prelude::*;
|
use isahc::prelude::*;
|
||||||
use zellij_utils::isahc::AsyncReadResponseExt;
|
use isahc::AsyncReadResponseExt;
|
||||||
use zellij_utils::isahc::{config::RedirectPolicy, HttpClient, Request};
|
use isahc::{config::RedirectPolicy, HttpClient, Request};
|
||||||
|
|
||||||
use std::collections::{BTreeMap, HashMap};
|
use std::collections::{BTreeMap, HashMap};
|
||||||
use std::fs;
|
use std::fs;
|
||||||
|
|
@ -291,7 +291,7 @@ pub(crate) fn background_jobs_main(
|
||||||
http_client: HttpClient,
|
http_client: HttpClient,
|
||||||
) -> Result<
|
) -> Result<
|
||||||
(u16, BTreeMap<String, String>, Vec<u8>), // status_code, headers, body
|
(u16, BTreeMap<String, String>, Vec<u8>), // status_code, headers, body
|
||||||
zellij_utils::isahc::Error,
|
isahc::Error,
|
||||||
> {
|
> {
|
||||||
let mut request = match verb {
|
let mut request = match verb {
|
||||||
HttpVerb::Get => Request::get(url),
|
HttpVerb::Get => Request::get(url),
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@ mod ui;
|
||||||
|
|
||||||
use background_jobs::{background_jobs_main, BackgroundJob};
|
use background_jobs::{background_jobs_main, BackgroundJob};
|
||||||
use log::info;
|
use log::info;
|
||||||
|
use nix::sys::stat::{umask, Mode};
|
||||||
use pty_writer::{pty_writer_main, PtyWriteInstruction};
|
use pty_writer::{pty_writer_main, PtyWriteInstruction};
|
||||||
use std::collections::{BTreeMap, HashMap, HashSet};
|
use std::collections::{BTreeMap, HashMap, HashSet};
|
||||||
use std::{
|
use std::{
|
||||||
|
|
@ -25,7 +26,6 @@ use std::{
|
||||||
thread,
|
thread,
|
||||||
};
|
};
|
||||||
use zellij_utils::envs;
|
use zellij_utils::envs;
|
||||||
use zellij_utils::nix::sys::stat::{umask, Mode};
|
|
||||||
use zellij_utils::pane_size::Size;
|
use zellij_utils::pane_size::Size;
|
||||||
|
|
||||||
use wasmtime::{Config as WasmtimeConfig, Engine, Strategy};
|
use wasmtime::{Config as WasmtimeConfig, Engine, Strategy};
|
||||||
|
|
@ -555,9 +555,8 @@ pub fn start_server(mut os_input: Box<dyn ServerOsApi>, socket_path: PathBuf) {
|
||||||
let _ = thread::Builder::new()
|
let _ = thread::Builder::new()
|
||||||
.name("server_listener".to_string())
|
.name("server_listener".to_string())
|
||||||
.spawn({
|
.spawn({
|
||||||
use zellij_utils::{
|
use interprocess::local_socket::LocalSocketListener;
|
||||||
interprocess::local_socket::LocalSocketListener, shared::set_permissions,
|
use zellij_utils::shared::set_permissions;
|
||||||
};
|
|
||||||
|
|
||||||
let os_input = os_input.clone();
|
let os_input = os_input.clone();
|
||||||
let session_data = session_data.clone();
|
let session_data = session_data.clone();
|
||||||
|
|
|
||||||
|
|
@ -2,14 +2,13 @@ use std::{collections::VecDeque, io::Write};
|
||||||
|
|
||||||
use crate::plugins::PluginId;
|
use crate::plugins::PluginId;
|
||||||
use log::{debug, error};
|
use log::{debug, error};
|
||||||
use zellij_utils::{errors::prelude::*, serde};
|
use zellij_utils::errors::prelude::*;
|
||||||
|
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
// 16kB log buffer
|
// 16kB log buffer
|
||||||
const ZELLIJ_MAX_PIPE_BUFFER_SIZE: usize = 16_384;
|
const ZELLIJ_MAX_PIPE_BUFFER_SIZE: usize = 16_384;
|
||||||
#[derive(Debug, Serialize, Deserialize)]
|
#[derive(Debug, Serialize, Deserialize)]
|
||||||
#[serde(crate = "self::serde")]
|
|
||||||
pub struct LoggingPipe {
|
pub struct LoggingPipe {
|
||||||
buffer: VecDeque<u8>,
|
buffer: VecDeque<u8>,
|
||||||
plugin_name: String,
|
plugin_name: String,
|
||||||
|
|
|
||||||
|
|
@ -11,23 +11,25 @@ use nix::{
|
||||||
unistd,
|
unistd,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
use async_std;
|
||||||
|
use interprocess;
|
||||||
|
use libc;
|
||||||
|
use nix;
|
||||||
|
use signal_hook;
|
||||||
use signal_hook::consts::*;
|
use signal_hook::consts::*;
|
||||||
use sysinfo::{ProcessExt, ProcessRefreshKind, System, SystemExt};
|
use sysinfo::{ProcessExt, ProcessRefreshKind, System, SystemExt};
|
||||||
|
use tempfile::tempfile;
|
||||||
use zellij_utils::{
|
use zellij_utils::{
|
||||||
async_std, channels,
|
channels,
|
||||||
channels::TrySendError,
|
channels::TrySendError,
|
||||||
data::Palette,
|
data::Palette,
|
||||||
errors::prelude::*,
|
errors::prelude::*,
|
||||||
input::command::{RunCommand, TerminalAction},
|
input::command::{RunCommand, TerminalAction},
|
||||||
interprocess,
|
|
||||||
ipc::{
|
ipc::{
|
||||||
ClientToServerMsg, ExitReason, IpcReceiverWithContext, IpcSenderWithContext,
|
ClientToServerMsg, ExitReason, IpcReceiverWithContext, IpcSenderWithContext,
|
||||||
ServerToClientMsg,
|
ServerToClientMsg,
|
||||||
},
|
},
|
||||||
libc, nix,
|
|
||||||
shared::default_palette,
|
shared::default_palette,
|
||||||
signal_hook,
|
|
||||||
tempfile::tempfile,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
use std::{
|
use std::{
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
use super::sixel::{PixelRect, SixelGrid, SixelImageStore};
|
use super::sixel::{PixelRect, SixelGrid, SixelImageStore};
|
||||||
|
use regex::Regex;
|
||||||
use std::borrow::Cow;
|
use std::borrow::Cow;
|
||||||
use std::cell::RefCell;
|
use std::cell::RefCell;
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use std::rc::Rc;
|
use std::rc::Rc;
|
||||||
use zellij_utils::data::Style;
|
use zellij_utils::data::Style;
|
||||||
use zellij_utils::errors::prelude::*;
|
use zellij_utils::errors::prelude::*;
|
||||||
use zellij_utils::regex::Regex;
|
|
||||||
|
|
||||||
use std::{
|
use std::{
|
||||||
cmp::Ordering,
|
cmp::Ordering,
|
||||||
|
|
@ -14,13 +14,13 @@ use std::{
|
||||||
str,
|
str,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
use vte;
|
||||||
use zellij_utils::{
|
use zellij_utils::{
|
||||||
consts::{DEFAULT_SCROLL_BUFFER_SIZE, SCROLL_BUFFER_SIZE},
|
consts::{DEFAULT_SCROLL_BUFFER_SIZE, SCROLL_BUFFER_SIZE},
|
||||||
data::{Palette, PaletteColor, Styling},
|
data::{Palette, PaletteColor, Styling},
|
||||||
input::mouse::{MouseEvent, MouseEventType},
|
input::mouse::{MouseEvent, MouseEventType},
|
||||||
pane_size::SizeInPixels,
|
pane_size::SizeInPixels,
|
||||||
position::Position,
|
position::Position,
|
||||||
vte,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const TABSTOP_WIDTH: usize = 8; // TODO: is this always right?
|
const TABSTOP_WIDTH: usize = 8; // TODO: is this always right?
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@ use crate::ui::{
|
||||||
use crate::ClientId;
|
use crate::ClientId;
|
||||||
use std::cell::RefCell;
|
use std::cell::RefCell;
|
||||||
use std::rc::Rc;
|
use std::rc::Rc;
|
||||||
|
use vte;
|
||||||
use zellij_utils::data::{
|
use zellij_utils::data::{
|
||||||
BareKey, KeyWithModifier, PermissionStatus, PermissionType, PluginPermission,
|
BareKey, KeyWithModifier, PermissionStatus, PermissionType, PluginPermission,
|
||||||
};
|
};
|
||||||
|
|
@ -31,7 +32,6 @@ use zellij_utils::{
|
||||||
input::mouse::{MouseEvent, MouseEventType},
|
input::mouse::{MouseEvent, MouseEventType},
|
||||||
pane_size::PaneGeom,
|
pane_size::PaneGeom,
|
||||||
shared::make_terminal_title,
|
shared::make_terminal_title,
|
||||||
vte,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
macro_rules! style {
|
macro_rules! style {
|
||||||
|
|
|
||||||
|
|
@ -5,12 +5,10 @@ use std::rc::Rc;
|
||||||
use unicode_width::UnicodeWidthChar;
|
use unicode_width::UnicodeWidthChar;
|
||||||
|
|
||||||
use unicode_width::UnicodeWidthStr;
|
use unicode_width::UnicodeWidthStr;
|
||||||
|
use vte::ParamsIter;
|
||||||
use zellij_utils::data::StyleDeclaration;
|
use zellij_utils::data::StyleDeclaration;
|
||||||
|
use zellij_utils::data::{PaletteColor, Style};
|
||||||
use zellij_utils::input::command::RunCommand;
|
use zellij_utils::input::command::RunCommand;
|
||||||
use zellij_utils::{
|
|
||||||
data::{PaletteColor, Style},
|
|
||||||
vte::ParamsIter,
|
|
||||||
};
|
|
||||||
|
|
||||||
use crate::panes::alacritty_functions::parse_sgr_color;
|
use crate::panes::alacritty_functions::parse_sgr_color;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@ use std::collections::{HashMap, HashSet};
|
||||||
use std::fmt::Debug;
|
use std::fmt::Debug;
|
||||||
use std::rc::Rc;
|
use std::rc::Rc;
|
||||||
use std::time::{self, Instant};
|
use std::time::{self, Instant};
|
||||||
|
use vte;
|
||||||
use zellij_utils::input::command::RunCommand;
|
use zellij_utils::input::command::RunCommand;
|
||||||
use zellij_utils::input::mouse::{MouseEvent, MouseEventType};
|
use zellij_utils::input::mouse::{MouseEvent, MouseEventType};
|
||||||
use zellij_utils::pane_size::Offset;
|
use zellij_utils::pane_size::Offset;
|
||||||
|
|
@ -27,7 +28,6 @@ use zellij_utils::{
|
||||||
pane_size::SizeInPixels,
|
pane_size::SizeInPixels,
|
||||||
position::Position,
|
position::Position,
|
||||||
shared::make_terminal_title,
|
shared::make_terminal_title,
|
||||||
vte,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
use crate::ui::pane_boundaries_frame::{FrameParams, PaneFrame};
|
use crate::ui::pane_boundaries_frame::{FrameParams, PaneFrame};
|
||||||
|
|
|
||||||
|
|
@ -5,11 +5,11 @@ use ::insta::assert_snapshot;
|
||||||
use std::cell::RefCell;
|
use std::cell::RefCell;
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use std::rc::Rc;
|
use std::rc::Rc;
|
||||||
|
use vte;
|
||||||
use zellij_utils::{
|
use zellij_utils::{
|
||||||
data::{Palette, Style},
|
data::{Palette, Style},
|
||||||
pane_size::SizeInPixels,
|
pane_size::SizeInPixels,
|
||||||
position::Position,
|
position::Position,
|
||||||
vte,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
use std::fmt::Write;
|
use std::fmt::Write;
|
||||||
|
|
|
||||||
|
|
@ -22,8 +22,8 @@ use crate::{pty::PtyInstruction, thread_bus::Bus, ClientId, ServerInstruction};
|
||||||
pub use wasm_bridge::PluginRenderAsset;
|
pub use wasm_bridge::PluginRenderAsset;
|
||||||
use wasm_bridge::WasmBridge;
|
use wasm_bridge::WasmBridge;
|
||||||
|
|
||||||
|
use async_std::{channel, future::timeout, task};
|
||||||
use zellij_utils::{
|
use zellij_utils::{
|
||||||
async_std::{channel, future::timeout, task},
|
|
||||||
data::{
|
data::{
|
||||||
ClientInfo, Event, EventType, InputMode, MessageToPlugin, PermissionStatus, PermissionType,
|
ClientInfo, Event, EventType, InputMode, MessageToPlugin, PermissionStatus, PermissionType,
|
||||||
PipeMessage, PipeSource, PluginCapabilities,
|
PipeMessage, PipeSource, PluginCapabilities,
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,8 @@ use std::collections::{HashMap, HashSet};
|
||||||
use zellij_utils::data::{PipeMessage, PipeSource};
|
use zellij_utils::data::{PipeMessage, PipeSource};
|
||||||
use zellij_utils::plugin_api::pipe_message::ProtobufPipeMessage;
|
use zellij_utils::plugin_api::pipe_message::ProtobufPipeMessage;
|
||||||
|
|
||||||
|
use prost::Message;
|
||||||
use zellij_utils::errors::prelude::*;
|
use zellij_utils::errors::prelude::*;
|
||||||
use zellij_utils::prost::Message;
|
|
||||||
|
|
||||||
use crate::{thread_bus::ThreadSenders, ClientId};
|
use crate::{thread_bus::ThreadSenders, ClientId};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ use crate::plugins::zellij_exports::{wasi_write_object, zellij_exports};
|
||||||
use crate::plugins::PluginId;
|
use crate::plugins::PluginId;
|
||||||
use highway::{HighwayHash, PortableHash};
|
use highway::{HighwayHash, PortableHash};
|
||||||
use log::info;
|
use log::info;
|
||||||
|
use prost::Message;
|
||||||
use std::{
|
use std::{
|
||||||
collections::{HashMap, HashSet, VecDeque},
|
collections::{HashMap, HashSet, VecDeque},
|
||||||
fs,
|
fs,
|
||||||
|
|
@ -16,7 +17,6 @@ use url::Url;
|
||||||
use wasmtime::{Engine, Instance, Linker, Module, Store};
|
use wasmtime::{Engine, Instance, Linker, Module, Store};
|
||||||
use wasmtime_wasi::{preview1::WasiP1Ctx, DirPerms, FilePerms, WasiCtxBuilder};
|
use wasmtime_wasi::{preview1::WasiP1Ctx, DirPerms, FilePerms, WasiCtxBuilder};
|
||||||
use zellij_utils::consts::ZELLIJ_PLUGIN_ARTIFACT_DIR;
|
use zellij_utils::consts::ZELLIJ_PLUGIN_ARTIFACT_DIR;
|
||||||
use zellij_utils::prost::Message;
|
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
logging_pipe::LoggingPipe, screen::ScreenInstruction, thread_bus::ThreadSenders,
|
logging_pipe::LoggingPipe, screen::ScreenInstruction, thread_bus::ThreadSenders,
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ use wasmtime_wasi::{
|
||||||
|
|
||||||
use crate::{thread_bus::ThreadSenders, ClientId};
|
use crate::{thread_bus::ThreadSenders, ClientId};
|
||||||
|
|
||||||
use zellij_utils::async_channel::Sender;
|
use async_channel::Sender;
|
||||||
use zellij_utils::{
|
use zellij_utils::{
|
||||||
data::EventType,
|
data::EventType,
|
||||||
data::InputMode,
|
data::InputMode,
|
||||||
|
|
|
||||||
|
|
@ -2,11 +2,11 @@ use crate::plugins::plugin_map::PluginEnv;
|
||||||
use crate::plugins::zellij_exports::wasi_write_object;
|
use crate::plugins::zellij_exports::wasi_write_object;
|
||||||
use wasmtime::{Instance, Store};
|
use wasmtime::{Instance, Store};
|
||||||
|
|
||||||
use zellij_utils::async_channel::{unbounded, Receiver, Sender};
|
use async_channel::{unbounded, Receiver, Sender};
|
||||||
use zellij_utils::async_std::task;
|
use async_std::task;
|
||||||
|
use prost::Message;
|
||||||
use zellij_utils::errors::prelude::*;
|
use zellij_utils::errors::prelude::*;
|
||||||
use zellij_utils::plugin_api::message::ProtobufMessage;
|
use zellij_utils::plugin_api::message::ProtobufMessage;
|
||||||
use zellij_utils::prost::Message;
|
|
||||||
|
|
||||||
pub struct RunningWorker {
|
pub struct RunningWorker {
|
||||||
pub instance: Instance,
|
pub instance: Instance,
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ use super::plugin_thread_main;
|
||||||
use crate::screen::ScreenInstruction;
|
use crate::screen::ScreenInstruction;
|
||||||
use crate::{channels::SenderWithContext, thread_bus::Bus, ServerInstruction};
|
use crate::{channels::SenderWithContext, thread_bus::Bus, ServerInstruction};
|
||||||
use insta::assert_snapshot;
|
use insta::assert_snapshot;
|
||||||
|
use lazy_static::lazy_static;
|
||||||
use std::collections::BTreeMap;
|
use std::collections::BTreeMap;
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
use tempfile::tempdir;
|
use tempfile::tempdir;
|
||||||
|
|
@ -18,7 +19,6 @@ use zellij_utils::input::layout::{
|
||||||
use zellij_utils::input::permission::PermissionCache;
|
use zellij_utils::input::permission::PermissionCache;
|
||||||
use zellij_utils::input::plugins::PluginAliases;
|
use zellij_utils::input::plugins::PluginAliases;
|
||||||
use zellij_utils::ipc::ClientAttributes;
|
use zellij_utils::ipc::ClientAttributes;
|
||||||
use zellij_utils::lazy_static::lazy_static;
|
|
||||||
use zellij_utils::pane_size::Size;
|
use zellij_utils::pane_size::Size;
|
||||||
|
|
||||||
use crate::background_jobs::BackgroundJob;
|
use crate::background_jobs::BackgroundJob;
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,11 @@ use crate::plugins::plugin_map::{AtomicEvent, PluginEnv, PluginMap, RunningPlugi
|
||||||
use crate::plugins::plugin_worker::MessageToWorker;
|
use crate::plugins::plugin_worker::MessageToWorker;
|
||||||
use crate::plugins::watch_filesystem::watch_filesystem;
|
use crate::plugins::watch_filesystem::watch_filesystem;
|
||||||
use crate::plugins::zellij_exports::{wasi_read_string, wasi_write_object};
|
use crate::plugins::zellij_exports::{wasi_read_string, wasi_write_object};
|
||||||
|
use async_channel::Sender;
|
||||||
|
use async_std::task::{self, JoinHandle};
|
||||||
use highway::{HighwayHash, PortableHash};
|
use highway::{HighwayHash, PortableHash};
|
||||||
use log::info;
|
use log::info;
|
||||||
|
use notify_debouncer_full::{notify::RecommendedWatcher, Debouncer, FileIdMap};
|
||||||
use std::{
|
use std::{
|
||||||
collections::{BTreeMap, HashMap, HashSet},
|
collections::{BTreeMap, HashMap, HashSet},
|
||||||
path::PathBuf,
|
path::PathBuf,
|
||||||
|
|
@ -17,17 +20,14 @@ use std::{
|
||||||
sync::{Arc, Mutex},
|
sync::{Arc, Mutex},
|
||||||
};
|
};
|
||||||
use wasmtime::{Engine, Module};
|
use wasmtime::{Engine, Module};
|
||||||
use zellij_utils::async_channel::Sender;
|
|
||||||
use zellij_utils::async_std::task::{self, JoinHandle};
|
|
||||||
use zellij_utils::consts::{ZELLIJ_CACHE_DIR, ZELLIJ_TMP_DIR};
|
use zellij_utils::consts::{ZELLIJ_CACHE_DIR, ZELLIJ_TMP_DIR};
|
||||||
use zellij_utils::data::{InputMode, PermissionStatus, PermissionType, PipeMessage, PipeSource};
|
use zellij_utils::data::{InputMode, PermissionStatus, PermissionType, PipeMessage, PipeSource};
|
||||||
use zellij_utils::downloader::Downloader;
|
use zellij_utils::downloader::Downloader;
|
||||||
use zellij_utils::input::keybinds::Keybinds;
|
use zellij_utils::input::keybinds::Keybinds;
|
||||||
use zellij_utils::input::permission::PermissionCache;
|
use zellij_utils::input::permission::PermissionCache;
|
||||||
use zellij_utils::notify_debouncer_full::{notify::RecommendedWatcher, Debouncer, FileIdMap};
|
|
||||||
use zellij_utils::plugin_api::event::ProtobufEvent;
|
use zellij_utils::plugin_api::event::ProtobufEvent;
|
||||||
|
|
||||||
use zellij_utils::prost::Message;
|
use prost::Message;
|
||||||
|
|
||||||
use crate::panes::PaneId;
|
use crate::panes::PaneId;
|
||||||
use crate::{
|
use crate::{
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ use crate::thread_bus::ThreadSenders;
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
|
|
||||||
use zellij_utils::notify_debouncer_full::{
|
use notify_debouncer_full::{
|
||||||
new_debouncer,
|
new_debouncer,
|
||||||
notify::{EventKind, RecommendedWatcher, RecursiveMode, Watcher},
|
notify::{EventKind, RecommendedWatcher, RecursiveMode, Watcher},
|
||||||
DebounceEventResult, Debouncer, FileIdMap,
|
DebounceEventResult, Debouncer, FileIdMap,
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,8 @@ use crate::plugins::wasm_bridge::handle_plugin_crash;
|
||||||
use crate::pty::{ClientTabIndexOrPaneId, PtyInstruction};
|
use crate::pty::{ClientTabIndexOrPaneId, PtyInstruction};
|
||||||
use crate::route::route_action;
|
use crate::route::route_action;
|
||||||
use crate::ServerInstruction;
|
use crate::ServerInstruction;
|
||||||
|
use async_std::task;
|
||||||
|
use interprocess::local_socket::LocalSocketStream;
|
||||||
use log::warn;
|
use log::warn;
|
||||||
use serde::Serialize;
|
use serde::Serialize;
|
||||||
use std::{
|
use std::{
|
||||||
|
|
@ -22,14 +24,11 @@ use zellij_utils::data::{
|
||||||
MessageToPlugin, OriginatingPlugin, PermissionStatus, PermissionType, PluginPermission,
|
MessageToPlugin, OriginatingPlugin, PermissionStatus, PermissionType, PluginPermission,
|
||||||
};
|
};
|
||||||
use zellij_utils::input::permission::PermissionCache;
|
use zellij_utils::input::permission::PermissionCache;
|
||||||
use zellij_utils::{
|
use zellij_utils::ipc::{ClientToServerMsg, IpcSenderWithContext};
|
||||||
async_std::task,
|
|
||||||
interprocess::local_socket::LocalSocketStream,
|
|
||||||
ipc::{ClientToServerMsg, IpcSenderWithContext},
|
|
||||||
};
|
|
||||||
|
|
||||||
use crate::{panes::PaneId, screen::ScreenInstruction};
|
use crate::{panes::PaneId, screen::ScreenInstruction};
|
||||||
|
|
||||||
|
use prost::Message;
|
||||||
use zellij_utils::{
|
use zellij_utils::{
|
||||||
consts::{VERSION, ZELLIJ_SESSION_INFO_CACHE_DIR, ZELLIJ_SOCK_DIR},
|
consts::{VERSION, ZELLIJ_SESSION_INFO_CACHE_DIR, ZELLIJ_SOCK_DIR},
|
||||||
data::{
|
data::{
|
||||||
|
|
@ -46,8 +45,6 @@ use zellij_utils::{
|
||||||
plugin_command::ProtobufPluginCommand,
|
plugin_command::ProtobufPluginCommand,
|
||||||
plugin_ids::{ProtobufPluginIds, ProtobufZellijVersion},
|
plugin_ids::{ProtobufPluginIds, ProtobufZellijVersion},
|
||||||
},
|
},
|
||||||
prost::Message,
|
|
||||||
serde,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
macro_rules! apply_action {
|
macro_rules! apply_action {
|
||||||
|
|
|
||||||
|
|
@ -8,12 +8,14 @@ use crate::{
|
||||||
thread_bus::{Bus, ThreadSenders},
|
thread_bus::{Bus, ThreadSenders},
|
||||||
ClientId, ServerInstruction,
|
ClientId, ServerInstruction,
|
||||||
};
|
};
|
||||||
use async_std::task::{self, JoinHandle};
|
use async_std::{
|
||||||
|
self,
|
||||||
|
task::{self, JoinHandle},
|
||||||
|
};
|
||||||
|
use nix::unistd::Pid;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use std::{collections::HashMap, os::unix::io::RawFd, path::PathBuf};
|
use std::{collections::HashMap, os::unix::io::RawFd, path::PathBuf};
|
||||||
use zellij_utils::nix::unistd::Pid;
|
|
||||||
use zellij_utils::{
|
use zellij_utils::{
|
||||||
async_std,
|
|
||||||
data::{Event, FloatingPaneCoordinates, OriginatingPlugin},
|
data::{Event, FloatingPaneCoordinates, OriginatingPlugin},
|
||||||
errors::prelude::*,
|
errors::prelude::*,
|
||||||
errors::{ContextType, PtyContext},
|
errors::{ContextType, PtyContext},
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
use zellij_utils::{anyhow::Result, data::CopyDestination, input::options::Clipboard};
|
use anyhow::Result;
|
||||||
|
use zellij_utils::{data::CopyDestination, input::options::Clipboard};
|
||||||
|
|
||||||
use crate::ClientId;
|
use crate::ClientId;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
use std::io::prelude::*;
|
use std::io::prelude::*;
|
||||||
use std::process::{Command, Stdio};
|
use std::process::{Command, Stdio};
|
||||||
|
|
||||||
use zellij_utils::anyhow::{Context, Result};
|
use anyhow::{Context, Result};
|
||||||
|
|
||||||
pub struct CopyCommand {
|
pub struct CopyCommand {
|
||||||
command: String,
|
command: String,
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ mod layout_applier;
|
||||||
mod swap_layouts;
|
mod swap_layouts;
|
||||||
|
|
||||||
use copy_command::CopyCommand;
|
use copy_command::CopyCommand;
|
||||||
|
use serde;
|
||||||
use std::env::temp_dir;
|
use std::env::temp_dir;
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
use uuid::Uuid;
|
use uuid::Uuid;
|
||||||
|
|
@ -17,8 +18,8 @@ use zellij_utils::data::{
|
||||||
use zellij_utils::errors::prelude::*;
|
use zellij_utils::errors::prelude::*;
|
||||||
use zellij_utils::input::command::RunCommand;
|
use zellij_utils::input::command::RunCommand;
|
||||||
use zellij_utils::input::mouse::{MouseEvent, MouseEventType};
|
use zellij_utils::input::mouse::{MouseEvent, MouseEventType};
|
||||||
|
use zellij_utils::position::Position;
|
||||||
use zellij_utils::position::{Column, Line};
|
use zellij_utils::position::{Column, Line};
|
||||||
use zellij_utils::{position::Position, serde};
|
|
||||||
|
|
||||||
use crate::background_jobs::BackgroundJob;
|
use crate::background_jobs::BackgroundJob;
|
||||||
use crate::pty_writer::PtyWriteInstruction;
|
use crate::pty_writer::PtyWriteInstruction;
|
||||||
|
|
|
||||||
|
|
@ -37,10 +37,10 @@ use std::collections::{BTreeMap, HashMap, HashSet};
|
||||||
use std::os::unix::io::RawFd;
|
use std::os::unix::io::RawFd;
|
||||||
use std::rc::Rc;
|
use std::rc::Rc;
|
||||||
|
|
||||||
|
use interprocess::local_socket::LocalSocketStream;
|
||||||
use zellij_utils::{
|
use zellij_utils::{
|
||||||
data::{InputMode, ModeInfo, Palette, Style},
|
data::{InputMode, ModeInfo, Palette, Style},
|
||||||
input::command::{RunCommand, TerminalAction},
|
input::command::{RunCommand, TerminalAction},
|
||||||
interprocess::local_socket::LocalSocketStream,
|
|
||||||
ipc::{ClientToServerMsg, ServerToClientMsg},
|
ipc::{ClientToServerMsg, ServerToClientMsg},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -746,7 +746,7 @@ fn read_fixture(fixture_name: &str) -> Vec<u8> {
|
||||||
use crate::panes::grid::Grid;
|
use crate::panes::grid::Grid;
|
||||||
use crate::panes::link_handler::LinkHandler;
|
use crate::panes::link_handler::LinkHandler;
|
||||||
use insta::assert_snapshot;
|
use insta::assert_snapshot;
|
||||||
use zellij_utils::vte;
|
use vte;
|
||||||
|
|
||||||
fn take_snapshot(ansi_instructions: &str, rows: usize, columns: usize, palette: Palette) -> String {
|
fn take_snapshot(ansi_instructions: &str, rows: usize, columns: usize, palette: Palette) -> String {
|
||||||
let sixel_image_store = Rc::new(RefCell::new(SixelImageStore::default()));
|
let sixel_image_store = Rc::new(RefCell::new(SixelImageStore::default()));
|
||||||
|
|
|
||||||
|
|
@ -19,10 +19,10 @@ use std::collections::{HashMap, HashSet};
|
||||||
use std::os::unix::io::RawFd;
|
use std::os::unix::io::RawFd;
|
||||||
use std::rc::Rc;
|
use std::rc::Rc;
|
||||||
|
|
||||||
|
use interprocess::local_socket::LocalSocketStream;
|
||||||
use zellij_utils::{
|
use zellij_utils::{
|
||||||
data::{ModeInfo, Palette, Style},
|
data::{ModeInfo, Palette, Style},
|
||||||
input::command::{RunCommand, TerminalAction},
|
input::command::{RunCommand, TerminalAction},
|
||||||
interprocess::local_socket::LocalSocketStream,
|
|
||||||
ipc::{ClientToServerMsg, ServerToClientMsg},
|
ipc::{ClientToServerMsg, ServerToClientMsg},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,6 @@ use std::{
|
||||||
time::{Duration, Instant},
|
time::{Duration, Instant},
|
||||||
};
|
};
|
||||||
use zellij_utils::{
|
use zellij_utils::{
|
||||||
async_std,
|
|
||||||
errors::{get_current_ctx, prelude::*, ContextType},
|
errors::{get_current_ctx, prelude::*, ContextType},
|
||||||
logging::debug_to_file,
|
logging::debug_to_file,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,11 @@ mod table;
|
||||||
mod text;
|
mod text;
|
||||||
|
|
||||||
use crate::panes::grid::Grid;
|
use crate::panes::grid::Grid;
|
||||||
|
use lazy_static::lazy_static;
|
||||||
|
use regex::Regex;
|
||||||
|
use vte;
|
||||||
|
use zellij_utils::data::Style;
|
||||||
use zellij_utils::errors::prelude::*;
|
use zellij_utils::errors::prelude::*;
|
||||||
use zellij_utils::{data::Style, lazy_static::lazy_static, regex::Regex, vte};
|
|
||||||
|
|
||||||
use component_coordinates::{is_too_high, is_too_wide, Coordinates};
|
use component_coordinates::{is_too_high, is_too_wide, Coordinates};
|
||||||
use nested_list::{nested_list, parse_nested_list_items};
|
use nested_list::{nested_list, parse_nested_list_items};
|
||||||
|
|
|
||||||
|
|
@ -35,10 +35,10 @@ use crate::{
|
||||||
};
|
};
|
||||||
use zellij_utils::ipc::PixelDimensions;
|
use zellij_utils::ipc::PixelDimensions;
|
||||||
|
|
||||||
|
use interprocess::local_socket::LocalSocketStream;
|
||||||
use zellij_utils::{
|
use zellij_utils::{
|
||||||
channels::{self, ChannelWithContext, Receiver},
|
channels::{self, ChannelWithContext, Receiver},
|
||||||
data::{Direction, FloatingPaneCoordinates, InputMode, ModeInfo, Palette, PluginCapabilities},
|
data::{Direction, FloatingPaneCoordinates, InputMode, ModeInfo, Palette, PluginCapabilities},
|
||||||
interprocess::local_socket::LocalSocketStream,
|
|
||||||
ipc::{ClientAttributes, ClientToServerMsg, ServerToClientMsg},
|
ipc::{ClientAttributes, ClientToServerMsg, ServerToClientMsg},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -48,7 +48,6 @@ use crate::panes::sixel::SixelImageStore;
|
||||||
use std::cell::RefCell;
|
use std::cell::RefCell;
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use std::rc::Rc;
|
use std::rc::Rc;
|
||||||
use zellij_utils::vte;
|
|
||||||
|
|
||||||
fn take_snapshot_and_cursor_coordinates(
|
fn take_snapshot_and_cursor_coordinates(
|
||||||
ansi_instructions: &str,
|
ansi_instructions: &str,
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ license = "MIT"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { workspace = true }
|
clap = { workspace = true }
|
||||||
|
prost = { workspace = true }
|
||||||
serde = { workspace = true }
|
serde = { workspace = true }
|
||||||
serde_json = { workspace = true }
|
serde_json = { workspace = true }
|
||||||
strum = { workspace = true }
|
strum = { workspace = true }
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ use zellij_utils::plugin_api::plugin_command::ProtobufPluginCommand;
|
||||||
use zellij_utils::plugin_api::plugin_ids::{ProtobufPluginIds, ProtobufZellijVersion};
|
use zellij_utils::plugin_api::plugin_ids::{ProtobufPluginIds, ProtobufZellijVersion};
|
||||||
|
|
||||||
pub use super::ui_components::*;
|
pub use super::ui_components::*;
|
||||||
pub use zellij_utils::prost::{self, *};
|
pub use prost::{self, *};
|
||||||
|
|
||||||
// Subscription Handling
|
// Subscription Handling
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,8 @@ mod ribbon;
|
||||||
mod table;
|
mod table;
|
||||||
mod text;
|
mod text;
|
||||||
|
|
||||||
|
pub use prost::{self, *};
|
||||||
pub use zellij_utils::plugin_api;
|
pub use zellij_utils::plugin_api;
|
||||||
pub use zellij_utils::prost::{self, *};
|
|
||||||
|
|
||||||
pub use nested_list::*;
|
pub use nested_list::*;
|
||||||
pub use ribbon::*;
|
pub use ribbon::*;
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,6 @@ include = ["src/**/*", "assets/"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
anyhow = { workspace = true }
|
anyhow = { workspace = true }
|
||||||
async-channel = { version = "1.8.0", default-features = false }
|
|
||||||
backtrace = { version = "0.3.55", default-features = false, features = ["std"] }
|
backtrace = { version = "0.3.55", default-features = false, features = ["std"] }
|
||||||
bitflags = { version = "2.5.0", default-features = false }
|
bitflags = { version = "2.5.0", default-features = false }
|
||||||
clap = { workspace = true }
|
clap = { workspace = true }
|
||||||
|
|
@ -22,14 +21,12 @@ crossbeam = { version = "0.8.1", default-features = false, features = ["alloc",
|
||||||
directories = { version = "5.0", default-features = false }
|
directories = { version = "5.0", default-features = false }
|
||||||
include_dir = { version = "0.7.3", default-features = false }
|
include_dir = { version = "0.7.3", default-features = false }
|
||||||
kdl = { version = "4.5.0", default-features = false, features = ["span"] }
|
kdl = { version = "4.5.0", default-features = false, features = ["span"] }
|
||||||
lazy_static = { version = "1.4.0", default-features = false }
|
lazy_static = { workspace = true }
|
||||||
libc = { version = "0.2", default-features = false, features = ["std"] }
|
|
||||||
log = { workspace = true }
|
log = { workspace = true }
|
||||||
miette = { version = "5.7.0", default-features = false, features = ["fancy"] }
|
miette = { workspace = true }
|
||||||
nix = { version = "0.23.1", default-features = false }
|
nix = { workspace = true }
|
||||||
percent-encoding = { version = "2.1.0", default-features = false, features = ["std"] }
|
percent-encoding = { version = "2.1.0", default-features = false, features = ["std"] }
|
||||||
prost = { version = "0.11.9", default-features = false, features = ["std", "prost-derive"] }
|
prost = { workspace = true }
|
||||||
regex = { version = "1.5.5", default-features = false, features = ["perf", "std"] }
|
|
||||||
rmp-serde = { version = "1.1.0", default-features = false }
|
rmp-serde = { version = "1.1.0", default-features = false }
|
||||||
serde = { workspace = true }
|
serde = { workspace = true }
|
||||||
serde_json = { workspace = true }
|
serde_json = { workspace = true }
|
||||||
|
|
@ -37,23 +34,19 @@ shellexpand = { version = "3.0.0", default-features = false, features = ["base-0
|
||||||
strip-ansi-escapes = { version = "0.1.0", default-features = false }
|
strip-ansi-escapes = { version = "0.1.0", default-features = false }
|
||||||
strum = { workspace = true }
|
strum = { workspace = true }
|
||||||
strum_macros = { workspace = true }
|
strum_macros = { workspace = true }
|
||||||
tempfile = { version = "3.2.0", default-features = false }
|
tempfile = { workspace = true }
|
||||||
thiserror = { workspace = true }
|
thiserror = { workspace = true }
|
||||||
unicode-width = { workspace = true }
|
unicode-width = { workspace = true }
|
||||||
url = { workspace = true }
|
url = { workspace = true }
|
||||||
uuid = { workspace = true }
|
uuid = { workspace = true }
|
||||||
vte = { version = "0.11.0", default-features = false }
|
|
||||||
|
|
||||||
[target.'cfg(not(target_family = "wasm"))'.dependencies]
|
[target.'cfg(not(target_family = "wasm"))'.dependencies]
|
||||||
termwiz = { version = "0.23.2", default-features = false }
|
async-std = { workspace = true }
|
||||||
log4rs = { version = "1.2.0", default-features = false, features = ["pattern_encoder", "rolling_file_appender", "compound_policy", "fixed_window_roller", "size_trigger"] }
|
log4rs = { version = "1.2.0", default-features = false, features = ["pattern_encoder", "rolling_file_appender", "compound_policy", "fixed_window_roller", "size_trigger"] }
|
||||||
notify-debouncer-full = { version = "0.1.0", default-features = false }
|
termwiz = { workspace = true }
|
||||||
signal-hook = { version = "0.3", default-features = false, features = ["iterator"] }
|
interprocess = { workspace = true }
|
||||||
interprocess = { version = "1.2.1", default-features = false }
|
|
||||||
async-std = { version = "1.3.0", default-features = false, features = ["attributes", "default", "std", "unstable"] }
|
|
||||||
humantime = { version = "2.1.0", default-features = false }
|
|
||||||
openssl-sys = { version = "0.9.93", default-features = false, features = ["vendored"], optional = true }
|
openssl-sys = { version = "0.9.93", default-features = false, features = ["vendored"], optional = true }
|
||||||
isahc = { version = "1.7.2", default-features = false, features = ["http2", "text-decoding"] }
|
isahc = { workspace = true }
|
||||||
curl-sys = { version = "0.4", default-features = false, features = ["force-system-lib-on-osx", "ssl"], optional = true }
|
curl-sys = { version = "0.4", default-features = false, features = ["force-system-lib-on-osx", "ssl"], optional = true }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
|
|
|
||||||
|
|
@ -785,7 +785,7 @@ mod not_wasm {
|
||||||
/// Helper trait to convert error types that don't satisfy `anyhow`s trait requirements to
|
/// Helper trait to convert error types that don't satisfy `anyhow`s trait requirements to
|
||||||
/// anyhow errors.
|
/// anyhow errors.
|
||||||
pub trait ToAnyhow<U> {
|
pub trait ToAnyhow<U> {
|
||||||
fn to_anyhow(self) -> crate::anyhow::Result<U>;
|
fn to_anyhow(self) -> anyhow::Result<U>;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// `SendError` doesn't satisfy `anyhow`s trait requirements due to `T` possibly being a
|
/// `SendError` doesn't satisfy `anyhow`s trait requirements due to `T` possibly being a
|
||||||
|
|
@ -798,19 +798,19 @@ mod not_wasm {
|
||||||
impl<T: std::fmt::Debug, U> ToAnyhow<U>
|
impl<T: std::fmt::Debug, U> ToAnyhow<U>
|
||||||
for Result<U, crate::channels::SendError<(T, ErrorContext)>>
|
for Result<U, crate::channels::SendError<(T, ErrorContext)>>
|
||||||
{
|
{
|
||||||
fn to_anyhow(self) -> crate::anyhow::Result<U> {
|
fn to_anyhow(self) -> anyhow::Result<U> {
|
||||||
match self {
|
match self {
|
||||||
Ok(val) => crate::anyhow::Ok(val),
|
Ok(val) => anyhow::Ok(val),
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
let (msg, context) = e.into_inner();
|
let (msg, context) = e.into_inner();
|
||||||
if *crate::consts::DEBUG_MODE.get().unwrap_or(&true) {
|
if *crate::consts::DEBUG_MODE.get().unwrap_or(&true) {
|
||||||
Err(crate::anyhow::anyhow!(
|
Err(anyhow::anyhow!(
|
||||||
"failed to send message to channel: {:#?}",
|
"failed to send message to channel: {:#?}",
|
||||||
msg
|
msg
|
||||||
))
|
))
|
||||||
.with_context(|| context.to_string())
|
.with_context(|| context.to_string())
|
||||||
} else {
|
} else {
|
||||||
Err(crate::anyhow::anyhow!("failed to send message to channel"))
|
Err(anyhow::anyhow!("failed to send message to channel"))
|
||||||
.with_context(|| context.to_string())
|
.with_context(|| context.to_string())
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -819,16 +819,14 @@ mod not_wasm {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<U> ToAnyhow<U> for Result<U, std::sync::PoisonError<U>> {
|
impl<U> ToAnyhow<U> for Result<U, std::sync::PoisonError<U>> {
|
||||||
fn to_anyhow(self) -> crate::anyhow::Result<U> {
|
fn to_anyhow(self) -> anyhow::Result<U> {
|
||||||
match self {
|
match self {
|
||||||
Ok(val) => crate::anyhow::Ok(val),
|
Ok(val) => anyhow::Ok(val),
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
if *crate::consts::DEBUG_MODE.get().unwrap_or(&true) {
|
if *crate::consts::DEBUG_MODE.get().unwrap_or(&true) {
|
||||||
Err(crate::anyhow::anyhow!(
|
Err(anyhow::anyhow!("cannot acquire poisoned lock for {e:#?}"))
|
||||||
"cannot acquire poisoned lock for {e:#?}"
|
|
||||||
))
|
|
||||||
} else {
|
} else {
|
||||||
Err(crate::anyhow::anyhow!("cannot acquire poisoned lock"))
|
Err(anyhow::anyhow!("cannot acquire poisoned lock"))
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -24,12 +24,3 @@ pub mod downloader; // Requires async_std
|
||||||
pub mod ipc; // Requires interprocess
|
pub mod ipc; // Requires interprocess
|
||||||
#[cfg(not(target_family = "wasm"))]
|
#[cfg(not(target_family = "wasm"))]
|
||||||
pub mod logging; // Requires log4rs
|
pub mod logging; // Requires log4rs
|
||||||
|
|
||||||
#[cfg(not(target_family = "wasm"))]
|
|
||||||
pub use ::{
|
|
||||||
anyhow, async_channel, async_std, clap, humantime, interprocess, isahc, lazy_static, libc,
|
|
||||||
miette, nix, notify_debouncer_full, regex, serde, signal_hook, tempfile, termwiz, url, uuid,
|
|
||||||
vte,
|
|
||||||
};
|
|
||||||
|
|
||||||
pub use ::prost;
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue