feat: v1.9.4, config support human JSON

This commit is contained in:
2025-07-24 22:51:43 +08:00
parent f0f505bde3
commit 044daaad7d
3 changed files with 428 additions and 245 deletions

667
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
[package] [package]
name = "tiny-encrypt" name = "tiny-encrypt"
version = "1.9.3" version = "1.9.4"
edition = "2021" edition = "2021"
license = "MIT" license = "MIT"
description = "A simple and tiny file encrypt tool" description = "A simple and tiny file encrypt tool"
@@ -52,6 +52,7 @@ secrecy = "0.10"
dialoguer = "0.11" dialoguer = "0.11"
ctrlc = "3.4" ctrlc = "3.4"
swift-secure-enclave-tool-rs = "1.0" swift-secure-enclave-tool-rs = "1.0"
json5 = "0.4"
[profile.release] [profile.release]
codegen-units = 1 codegen-units = 1

View File

@@ -89,7 +89,8 @@ impl TinyEncryptConfig {
file file
); );
let mut config: TinyEncryptConfig = opt_result!( let mut config: TinyEncryptConfig = opt_result!(
serde_json::from_str(&config_contents), // serde_json::from_str(&config_contents),
json5::from_str(&config_contents),
"Parse config file: {}, failed: {}", "Parse config file: {}, failed: {}",
file file
); );