ALPHA: wire is a tool to deploy nixos systems wire.althaea.zone/
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

strip ascii codes in nix logs

closes #300

+23
+19
Cargo.lock
··· 989 989 "serde-query", 990 990 "serde_json", 991 991 "sha2", 992 + "strip-ansi-escapes", 992 993 "syn 2.0.106", 993 994 "tempdir", 994 995 "thiserror 2.0.17", ··· 1920 1921 checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" 1921 1922 1922 1923 [[package]] 1924 + name = "strip-ansi-escapes" 1925 + version = "0.2.1" 1926 + source = "registry+https://github.com/rust-lang/crates.io-index" 1927 + checksum = "2a8f8038e7e7969abb3f1b7c2a811225e9296da208539e0f79c5251d6cac0025" 1928 + dependencies = [ 1929 + "vte", 1930 + ] 1931 + 1932 + [[package]] 1923 1933 name = "strsim" 1924 1934 version = "0.11.1" 1925 1935 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 2308 2318 "proc-macro2", 2309 2319 "quote", 2310 2320 "syn 2.0.106", 2321 + ] 2322 + 2323 + [[package]] 2324 + name = "vte" 2325 + version = "0.14.1" 2326 + source = "registry+https://github.com/rust-lang/crates.io-index" 2327 + checksum = "231fdcd7ef3037e8330d8e17e61011a2c244126acc0a982f4040ac3f9f0bc077" 2328 + dependencies = [ 2329 + "memchr", 2311 2330 ] 2312 2331 2313 2332 [[package]]
+1
wire/lib/Cargo.toml
··· 32 32 sha2 = { workspace = true } 33 33 base64 = { workspace = true } 34 34 nix-compat = { workspace = true } 35 + strip-ansi-escapes = "0.2.1" 35 36 36 37 [dev-dependencies] 37 38 tempdir = "0.3"
+3
wire/lib/src/nix_log.rs
··· 39 39 return; 40 40 } 41 41 42 + let stripped = strip_ansi_escapes::strip(msg.as_bytes()); 43 + let msg = String::from_utf8_lossy(&stripped); 44 + 42 45 match level { 43 46 VerbosityLevel::Info => event!(tracing_level::INFO, "{msg}"), 44 47 VerbosityLevel::Warn | VerbosityLevel::Notice => {