feat: update ssh.rs
This commit is contained in:
@@ -130,11 +130,11 @@
|
||||
},
|
||||
"ssh.rs": {
|
||||
"script_name": "ssh.rs",
|
||||
"script_length": 8096,
|
||||
"script_sha256": "2e109554551755c3435218c5508edd2dd75f9f3aca3e40831a6c70e2e56d439d",
|
||||
"script_length": 8084,
|
||||
"script_sha256": "5be75e94957c42bfdb0eb64eab5fed1f92ee7c4c53d61250a894ae01832395c2",
|
||||
"script_full_url": "https://git.hatter.ink/rust-scripts/scriptbase/raw/branch/main/ssh-rs/src/main.rs",
|
||||
"publish_time": 1767355767325,
|
||||
"update_time": 1767355767325
|
||||
"update_time": 1769307825605
|
||||
},
|
||||
"sync.rs": {
|
||||
"script_name": "sync.rs",
|
||||
|
||||
@@ -76,8 +76,8 @@
|
||||
},
|
||||
"ssh-rs": {
|
||||
"script_name": "ssh-rs",
|
||||
"script_length": 8096,
|
||||
"script_sha256": "2e109554551755c3435218c5508edd2dd75f9f3aca3e40831a6c70e2e56d439d"
|
||||
"script_length": 8084,
|
||||
"script_sha256": "5be75e94957c42bfdb0eb64eab5fed1f92ee7c4c53d61250a894ae01832395c2"
|
||||
},
|
||||
"sync-rs": {
|
||||
"script_name": "sync-rs",
|
||||
|
||||
43
ssh-rs/Cargo.lock
generated
43
ssh-rs/Cargo.lock
generated
@@ -155,10 +155,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695"
|
||||
|
||||
[[package]]
|
||||
name = "itoa"
|
||||
version = "1.0.17"
|
||||
name = "json5"
|
||||
version = "1.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2"
|
||||
checksum = "56c86c72f9e1d3fe29baa32cab8896548eef9aae271fce4e796d16b583fdf6d5"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"ucd-trie",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "lazy_static"
|
||||
@@ -182,12 +186,6 @@ dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "memchr"
|
||||
version = "2.7.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273"
|
||||
|
||||
[[package]]
|
||||
name = "once_cell_polyfill"
|
||||
version = "1.70.2"
|
||||
@@ -271,27 +269,14 @@ dependencies = [
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_json"
|
||||
version = "1.0.148"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3084b546a1dd6289475996f182a22aba973866ea8e8b02c51d9f46b1336a22da"
|
||||
dependencies = [
|
||||
"itoa",
|
||||
"memchr",
|
||||
"serde",
|
||||
"serde_core",
|
||||
"zmij",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ssh-rs"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"json5",
|
||||
"rust_util",
|
||||
"serde",
|
||||
"serde_json",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -352,6 +337,12 @@ dependencies = [
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ucd-trie"
|
||||
version = "0.1.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-ident"
|
||||
version = "1.0.22"
|
||||
@@ -406,9 +397,3 @@ checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
|
||||
dependencies = [
|
||||
"windows-link",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zmij"
|
||||
version = "1.0.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "de9211a9f64b825911bdf0240f58b7a8dac217fe260fc61f080a07f61372fbd5"
|
||||
|
||||
@@ -7,4 +7,4 @@ edition = "2024"
|
||||
rust_util = "0.6.50"
|
||||
clap = { version = "4.5.49", features = ["derive"] }
|
||||
serde = { version = "1.0.228", features = ["derive"] }
|
||||
serde_json = "1.0.145"
|
||||
json5 = "1.3.0"
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
//! rust_util = "0.6.50"
|
||||
//! clap = { version = "4.5.49", features = ["derive"] }
|
||||
//! serde = { version = "1.0.228", features = ["derive"] }
|
||||
//! serde_json = "1.0.145"
|
||||
//! json5 = "1.3.0"
|
||||
//! ```
|
||||
|
||||
use clap::Parser;
|
||||
@@ -245,7 +245,7 @@ fn load_ssh_rs_config() -> XResult<SshConfig> {
|
||||
let config_file = get_ssh_rs_config_file();
|
||||
let config_content = util_file::read_file_content(&config_file)?;
|
||||
let config: SshConfig = opt_result!(
|
||||
serde_json::from_str(config_content.as_str()),
|
||||
json5::from_str(config_content.as_str()),
|
||||
"Parse config failed: {}"
|
||||
);
|
||||
Ok(config)
|
||||
@@ -255,5 +255,5 @@ fn get_ssh_rs_config_file() -> String {
|
||||
util_env::env_var(ENV_SSH_RS_CONFIG_FILE).unwrap_or_else(|| SSH_RS_CONFIG_FILE.to_string())
|
||||
}
|
||||
|
||||
// @SCRIPT-SIGNATURE-V1: yk-r1.ES256.20260102T200840+08:00.MEUCIQCIoEsCJwGL/nO9MUwA
|
||||
// q3eig5RAt+p0uE4YJPn4wIJtuwIgA+n+sXBgtYjBNZ0lDfB1+fVC7N/3K/LjeWHkxv3/J8k=
|
||||
// @SCRIPT-SIGNATURE-V1: yk-r1.ES256.20260125T102330+08:00.MEYCIQDAnPqJNTLeNAuSe+7l
|
||||
// MvVNKf/JQPgKMLAYNh1eTeW+QAIhAKHonLpd2gHZmYXZKJCOpenIzr+d6umHK1EiMw1q9yp1
|
||||
|
||||
Reference in New Issue
Block a user