mirror of
https://github.com/veeso/termscp.git
synced 2026-09-25 21:41:20 -07:00
feat: init 0.15
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
- [Changelog](#changelog)
|
- [Changelog](#changelog)
|
||||||
|
- [0.15.0](#0150)
|
||||||
- [0.14.0](#0140)
|
- [0.14.0](#0140)
|
||||||
- [0.13.0](#0130)
|
- [0.13.0](#0130)
|
||||||
- [0.12.3](#0123)
|
- [0.12.3](#0123)
|
||||||
@@ -36,6 +37,10 @@
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## 0.15.0
|
||||||
|
|
||||||
|
Released on
|
||||||
|
|
||||||
## 0.14.0
|
## 0.14.0
|
||||||
|
|
||||||
Released on 17/07/2024
|
Released on 17/07/2024
|
||||||
|
|||||||
Generated
+930
-1377
File diff suppressed because it is too large
Load Diff
+23
-23
@@ -16,7 +16,7 @@ license = "MIT"
|
|||||||
name = "termscp"
|
name = "termscp"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
repository = "https://github.com/veeso/termscp"
|
repository = "https://github.com/veeso/termscp"
|
||||||
version = "0.14.0"
|
version = "0.15.0"
|
||||||
|
|
||||||
[package.metadata.rpm]
|
[package.metadata.rpm]
|
||||||
package = "termscp"
|
package = "termscp"
|
||||||
@@ -38,32 +38,32 @@ path = "src/main.rs"
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
argh = "^0.1"
|
argh = "^0.1"
|
||||||
bitflags = "^2.1"
|
bitflags = "^2"
|
||||||
bytesize = "^1.1"
|
bytesize = "^1"
|
||||||
chrono = "^0.4"
|
chrono = "^0.4"
|
||||||
content_inspector = "^0.2"
|
content_inspector = "^0.2"
|
||||||
dirs = "^5.0"
|
dirs = "^5.0"
|
||||||
edit = "^0.1"
|
edit = "^0.1"
|
||||||
filetime = "^0.2"
|
filetime = "^0.2"
|
||||||
hostname = "^0.4"
|
hostname = "^0.4"
|
||||||
keyring = { version = "^2.0", optional = true }
|
keyring = { version = "^3", optional = true }
|
||||||
lazy-regex = "^3.1"
|
lazy-regex = "^3"
|
||||||
lazy_static = "^1.4"
|
lazy_static = "^1"
|
||||||
log = "^0.4"
|
log = "^0.4"
|
||||||
magic-crypt = "^3.1"
|
magic-crypt = "^3"
|
||||||
notify = "=4.0.17"
|
notify = "=4.0.17"
|
||||||
notify-rust = { version = "^4.5", default-features = false, features = ["d"] }
|
notify-rust = { version = "^4.5", default-features = false, features = ["d"] }
|
||||||
open = "^5.0"
|
open = "^5.0"
|
||||||
rand = "^0.8.5"
|
rand = "^0.8.5"
|
||||||
regex = "^1"
|
regex = "^1"
|
||||||
remotefs = "^0.2.0"
|
remotefs = "^0.3"
|
||||||
remotefs-aws-s3 = { version = "^0.2.4", default-features = false, features = [
|
remotefs-aws-s3 = { version = "^0.3", default-features = false, features = [
|
||||||
"find",
|
"find",
|
||||||
"rustls",
|
"rustls",
|
||||||
] }
|
] }
|
||||||
remotefs-kube = "0.2"
|
remotefs-kube = "0.4"
|
||||||
remotefs-webdav = "^0.1.1"
|
remotefs-webdav = "^0.2"
|
||||||
rpassword = "^7.0"
|
rpassword = "^7"
|
||||||
self_update = { version = "^0.41", default-features = false, features = [
|
self_update = { version = "^0.41", default-features = false, features = [
|
||||||
"rustls",
|
"rustls",
|
||||||
"archive-tar",
|
"archive-tar",
|
||||||
@@ -74,19 +74,19 @@ self_update = { version = "^0.41", default-features = false, features = [
|
|||||||
serde = { version = "^1", features = ["derive"] }
|
serde = { version = "^1", features = ["derive"] }
|
||||||
simplelog = "^0.12"
|
simplelog = "^0.12"
|
||||||
ssh2-config = "^0.2"
|
ssh2-config = "^0.2"
|
||||||
tempfile = "^3.4"
|
tempfile = "^3"
|
||||||
thiserror = "^1"
|
thiserror = "^1"
|
||||||
tokio = { version = "=1.38.1", features = ["rt"] }
|
tokio = { version = "=1.38.1", features = ["rt"] }
|
||||||
toml = "^0.8"
|
toml = "^0.8"
|
||||||
tui-realm-stdlib = "^1.3.1"
|
tui-realm-stdlib = "^1.3"
|
||||||
tuirealm = "^1.9.1"
|
tuirealm = "^1.9"
|
||||||
unicode-width = "^0.1"
|
unicode-width = "^0.2"
|
||||||
version-compare = "^0.2"
|
version-compare = "^0.2"
|
||||||
whoami = "^1.4"
|
whoami = "^1.5"
|
||||||
wildmatch = "^2.1"
|
wildmatch = "^2.3"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
pretty_assertions = "^1.3"
|
pretty_assertions = "^1"
|
||||||
serial_test = "^3"
|
serial_test = "^3"
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
@@ -99,17 +99,17 @@ with-keyring = ["keyring"]
|
|||||||
smb = ["remotefs-smb"]
|
smb = ["remotefs-smb"]
|
||||||
|
|
||||||
[target."cfg(not(target_os = \"macos\"))".dependencies]
|
[target."cfg(not(target_os = \"macos\"))".dependencies]
|
||||||
remotefs-smb = { version = "^0.2", optional = true }
|
remotefs-smb = { version = "^0.3", optional = true }
|
||||||
|
|
||||||
[target."cfg(target_family = \"windows\")"]
|
[target."cfg(target_family = \"windows\")"]
|
||||||
[target."cfg(target_family = \"windows\")".dependencies]
|
[target."cfg(target_family = \"windows\")".dependencies]
|
||||||
remotefs-ftp = { version = "^0.1.2", features = ["native-tls"] }
|
remotefs-ftp = { version = "^0.1.2", features = ["native-tls"] }
|
||||||
remotefs-ssh = "^0.3.1"
|
remotefs-ssh = "^0.4"
|
||||||
|
|
||||||
[target."cfg(target_family = \"unix\")"]
|
[target."cfg(target_family = \"unix\")"]
|
||||||
[target."cfg(target_family = \"unix\")".dependencies]
|
[target."cfg(target_family = \"unix\")".dependencies]
|
||||||
remotefs-ftp = { version = "^0.1.2", features = ["vendored", "native-tls"] }
|
remotefs-ftp = { version = "^0.2", features = ["vendored", "native-tls"] }
|
||||||
remotefs-ssh = { version = "^0.3.1", features = ["ssh2-vendored"] }
|
remotefs-ssh = { version = "^0.4", features = ["ssh2-vendored"] }
|
||||||
users = "0.11.0"
|
users = "0.11.0"
|
||||||
|
|
||||||
[profile.dev]
|
[profile.dev]
|
||||||
|
|||||||
@@ -71,7 +71,7 @@
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p align="center">Developed by <a href="https://veeso.dev/" target="_blank">@veeso</a></p>
|
<p align="center">Developed by <a href="https://veeso.dev/" target="_blank">@veeso</a></p>
|
||||||
<p align="center">Current version: 0.14.0 (17/07/2024)</p>
|
<p align="center">Current version: 0.15.0 (17/07/2024)</p>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://opensource.org/licenses/MIT"
|
<a href="https://opensource.org/licenses/MIT"
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ use std::sync::Arc;
|
|||||||
use remotefs::RemoteFs;
|
use remotefs::RemoteFs;
|
||||||
use remotefs_aws_s3::AwsS3Fs;
|
use remotefs_aws_s3::AwsS3Fs;
|
||||||
use remotefs_ftp::FtpFs;
|
use remotefs_ftp::FtpFs;
|
||||||
use remotefs_kube::KubeFs;
|
use remotefs_kube::KubeContainerFs as KubeFs;
|
||||||
#[cfg(smb_unix)]
|
#[cfg(smb_unix)]
|
||||||
use remotefs_smb::SmbOptions;
|
use remotefs_smb::SmbOptions;
|
||||||
#[cfg(smb)]
|
#[cfg(smb)]
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ mod tests {
|
|||||||
let app_name: &str = "termscp-test2";
|
let app_name: &str = "termscp-test2";
|
||||||
let secret: &str = "Th15-15/My-Супер-Секрет";
|
let secret: &str = "Th15-15/My-Супер-Секрет";
|
||||||
let kring: Keyring = Keyring::new(app_name, username.as_str()).unwrap();
|
let kring: Keyring = Keyring::new(app_name, username.as_str()).unwrap();
|
||||||
let _ = kring.delete_password();
|
let _ = kring.delete_credential();
|
||||||
drop(kring);
|
drop(kring);
|
||||||
// Secret should not exist
|
// Secret should not exist
|
||||||
assert!(storage.get_key(app_name).is_err());
|
assert!(storage.get_key(app_name).is_err());
|
||||||
@@ -100,6 +100,6 @@ mod tests {
|
|||||||
|
|
||||||
// Delete the key manually...
|
// Delete the key manually...
|
||||||
let kring: Keyring = Keyring::new(app_name, username.as_str()).unwrap();
|
let kring: Keyring = Keyring::new(app_name, username.as_str()).unwrap();
|
||||||
assert!(kring.delete_password().is_ok());
|
assert!(kring.delete_credential().is_ok());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -149,86 +149,18 @@ impl AuthActivity {
|
|||||||
.direction(Direction::Vertical)
|
.direction(Direction::Vertical)
|
||||||
.split(main_chunks[0]);
|
.split(main_chunks[0]);
|
||||||
// Input mask chunks
|
// Input mask chunks
|
||||||
let input_mask = match self.input_mask() {
|
let input_mask = Layout::default()
|
||||||
InputMask::AwsS3 => Layout::default()
|
.constraints(
|
||||||
.constraints(
|
[
|
||||||
[
|
Constraint::Length(3), // uri
|
||||||
Constraint::Length(3), // bucket
|
Constraint::Length(3), // username
|
||||||
Constraint::Length(3), // region
|
Constraint::Length(3), // password
|
||||||
Constraint::Length(3), // profile
|
Constraint::Length(3), // dir
|
||||||
Constraint::Length(3), // access_key
|
]
|
||||||
Constraint::Length(3), // remote directory
|
.as_ref(),
|
||||||
]
|
)
|
||||||
.as_ref(),
|
.direction(Direction::Vertical)
|
||||||
)
|
.split(auth_chunks[4]);
|
||||||
.direction(Direction::Vertical)
|
|
||||||
.split(auth_chunks[4]),
|
|
||||||
InputMask::Kube => Layout::default()
|
|
||||||
.constraints([
|
|
||||||
Constraint::Length(3), // ...
|
|
||||||
Constraint::Length(3), // ...
|
|
||||||
Constraint::Length(3), // ...
|
|
||||||
Constraint::Length(3), // ...
|
|
||||||
Constraint::Length(3), // remote directory
|
|
||||||
])
|
|
||||||
.direction(Direction::Vertical)
|
|
||||||
.split(auth_chunks[4]),
|
|
||||||
InputMask::Generic => Layout::default()
|
|
||||||
.constraints(
|
|
||||||
[
|
|
||||||
Constraint::Length(3), // address
|
|
||||||
Constraint::Length(3), // port
|
|
||||||
Constraint::Length(3), // username
|
|
||||||
Constraint::Length(3), // password
|
|
||||||
Constraint::Length(3), // remote directory
|
|
||||||
]
|
|
||||||
.as_ref(),
|
|
||||||
)
|
|
||||||
.direction(Direction::Vertical)
|
|
||||||
.split(auth_chunks[4]),
|
|
||||||
#[cfg(unix)]
|
|
||||||
InputMask::Smb => Layout::default()
|
|
||||||
.constraints(
|
|
||||||
[
|
|
||||||
Constraint::Length(3), // address
|
|
||||||
Constraint::Length(3), // port
|
|
||||||
Constraint::Length(3), // share
|
|
||||||
Constraint::Length(3), // username
|
|
||||||
Constraint::Length(3), // password
|
|
||||||
Constraint::Length(3), // workgroup
|
|
||||||
Constraint::Length(3), // remote directory
|
|
||||||
]
|
|
||||||
.as_ref(),
|
|
||||||
)
|
|
||||||
.direction(Direction::Vertical)
|
|
||||||
.split(auth_chunks[4]),
|
|
||||||
#[cfg(windows)]
|
|
||||||
InputMask::Smb => Layout::default()
|
|
||||||
.constraints(
|
|
||||||
[
|
|
||||||
Constraint::Length(3), // address
|
|
||||||
Constraint::Length(3), // share
|
|
||||||
Constraint::Length(3), // username
|
|
||||||
Constraint::Length(3), // password
|
|
||||||
Constraint::Length(3), // remote directory
|
|
||||||
]
|
|
||||||
.as_ref(),
|
|
||||||
)
|
|
||||||
.direction(Direction::Vertical)
|
|
||||||
.split(auth_chunks[4]),
|
|
||||||
InputMask::WebDAV => Layout::default()
|
|
||||||
.constraints(
|
|
||||||
[
|
|
||||||
Constraint::Length(3), // uri
|
|
||||||
Constraint::Length(3), // username
|
|
||||||
Constraint::Length(3), // password
|
|
||||||
Constraint::Length(3), // dir
|
|
||||||
]
|
|
||||||
.as_ref(),
|
|
||||||
)
|
|
||||||
.direction(Direction::Vertical)
|
|
||||||
.split(auth_chunks[4]),
|
|
||||||
};
|
|
||||||
// Create bookmark chunks
|
// Create bookmark chunks
|
||||||
let bookmark_chunks = Layout::default()
|
let bookmark_chunks = Layout::default()
|
||||||
.constraints([Constraint::Percentage(50), Constraint::Percentage(50)].as_ref())
|
.constraints([Constraint::Percentage(50), Constraint::Percentage(50)].as_ref())
|
||||||
@@ -347,7 +279,7 @@ impl AuthActivity {
|
|||||||
.constraints(
|
.constraints(
|
||||||
[
|
[
|
||||||
Constraint::Length(3), // Input form
|
Constraint::Length(3), // Input form
|
||||||
Constraint::Length(2), // Yes/No
|
Constraint::Length(4), // Yes/No
|
||||||
]
|
]
|
||||||
.as_ref(),
|
.as_ref(),
|
||||||
)
|
)
|
||||||
@@ -1069,10 +1001,7 @@ impl AuthActivity {
|
|||||||
|
|
||||||
pub(super) fn get_input_port(&self) -> u16 {
|
pub(super) fn get_input_port(&self) -> u16 {
|
||||||
match self.app.state(&Id::Port) {
|
match self.app.state(&Id::Port) {
|
||||||
Ok(State::One(StateValue::String(x))) => match u16::from_str(x.as_str()) {
|
Ok(State::One(StateValue::String(x))) => u16::from_str(x.as_str()).unwrap_or_default(),
|
||||||
Ok(v) => v,
|
|
||||||
_ => 0,
|
|
||||||
},
|
|
||||||
_ => 0,
|
_ => 0,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,8 +5,7 @@
|
|||||||
use tuirealm::command::{Cmd, CmdResult, Direction, Position};
|
use tuirealm::command::{Cmd, CmdResult, Direction, Position};
|
||||||
use tuirealm::event::{Key, KeyEvent};
|
use tuirealm::event::{Key, KeyEvent};
|
||||||
use tuirealm::props::{Alignment, AttrValue, Attribute, Borders, Color, Style, Table};
|
use tuirealm::props::{Alignment, AttrValue, Attribute, Borders, Color, Style, Table};
|
||||||
use tuirealm::tui::layout::Corner;
|
use tuirealm::tui::widgets::{List as TuiList, ListDirection, ListItem, ListState};
|
||||||
use tuirealm::tui::widgets::{List as TuiList, ListItem, ListState};
|
|
||||||
use tuirealm::{Component, Event, MockComponent, NoUserEvent, Props, State, StateValue};
|
use tuirealm::{Component, Event, MockComponent, NoUserEvent, Props, State, StateValue};
|
||||||
|
|
||||||
use super::{Msg, UiMsg};
|
use super::{Msg, UiMsg};
|
||||||
@@ -63,7 +62,7 @@ impl MockComponent for Log {
|
|||||||
focus,
|
focus,
|
||||||
None,
|
None,
|
||||||
))
|
))
|
||||||
.start_corner(Corner::BottomLeft)
|
.direction(ListDirection::BottomToTop)
|
||||||
.highlight_symbol(">> ")
|
.highlight_symbol(">> ")
|
||||||
.style(Style::default().bg(bg))
|
.style(Style::default().bg(bg))
|
||||||
.highlight_style(Style::default());
|
.highlight_style(Style::default());
|
||||||
|
|||||||
@@ -6,9 +6,8 @@ use tuirealm::command::{Cmd, CmdResult, Direction, Position};
|
|||||||
use tuirealm::props::{
|
use tuirealm::props::{
|
||||||
Alignment, AttrValue, Attribute, Borders, Color, Style, Table, TextModifiers,
|
Alignment, AttrValue, Attribute, Borders, Color, Style, Table, TextModifiers,
|
||||||
};
|
};
|
||||||
use tuirealm::tui::layout::Corner;
|
|
||||||
use tuirealm::tui::text::{Line, Span};
|
use tuirealm::tui::text::{Line, Span};
|
||||||
use tuirealm::tui::widgets::{List as TuiList, ListItem, ListState};
|
use tuirealm::tui::widgets::{List as TuiList, ListDirection, ListItem, ListState};
|
||||||
use tuirealm::{MockComponent, Props, State, StateValue};
|
use tuirealm::{MockComponent, Props, State, StateValue};
|
||||||
|
|
||||||
pub const FILE_LIST_CMD_SELECT_ALL: &str = "A";
|
pub const FILE_LIST_CMD_SELECT_ALL: &str = "A";
|
||||||
@@ -235,7 +234,7 @@ impl MockComponent for FileList {
|
|||||||
// Make list
|
// Make list
|
||||||
let mut list = TuiList::new(list_items)
|
let mut list = TuiList::new(list_items)
|
||||||
.block(div)
|
.block(div)
|
||||||
.start_corner(Corner::TopLeft);
|
.direction(ListDirection::TopToBottom);
|
||||||
if let Some(highlighted_color) = highlighted_color {
|
if let Some(highlighted_color) = highlighted_color {
|
||||||
list = list.highlight_style(
|
list = list.highlight_style(
|
||||||
Style::default()
|
Style::default()
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ impl FileTransferActivity {
|
|||||||
Err(err) => {
|
Err(err) => {
|
||||||
// Set popup fatal error
|
// Set popup fatal error
|
||||||
self.umount_wait();
|
self.umount_wait();
|
||||||
self.mount_fatal(&err.to_string());
|
self.mount_fatal(err.to_string());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-2
@@ -100,8 +100,7 @@ static REMOTE_SMB_OPT_REGEX: Lazy<Regex> =
|
|||||||
/**
|
/**
|
||||||
* Regex matches:
|
* Regex matches:
|
||||||
* - group 1: Version
|
* - group 1: Version
|
||||||
* E.g. termscp-0.3.2 => 0.3.2
|
* E.g. termscp-0.3.2 => 0.3.2; v0.4.0 => 0.4.0
|
||||||
* v0.4.0 => 0.4.0
|
|
||||||
*/
|
*/
|
||||||
static SEMVER_REGEX: Lazy<Regex> = lazy_regex!(r".*(:?[0-9]\.[0-9]\.[0-9])");
|
static SEMVER_REGEX: Lazy<Regex> = lazy_regex!(r".*(:?[0-9]\.[0-9]\.[0-9])");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user