diff options
author | fxqnlr <[email protected]> | 2024-09-25 15:13:34 +0200 |
---|---|---|
committer | fxqnlr <[email protected]> | 2024-09-25 15:13:34 +0200 |
commit | d44041040d755306c39d6de8da5b42d7ded6808c (patch) | |
tree | d664c15e014aa36dc5735ec4be4919866fb6a9e5 | |
parent | 0ed94b3f011a2d3c22bdc4affb502720be22c371 (diff) | |
download | arbs-d44041040d755306c39d6de8da5b42d7ded6808c.tar arbs-d44041040d755306c39d6de8da5b42d7ded6808c.tar.gz arbs-d44041040d755306c39d6de8da5b42d7ded6808c.zip |
added notifications and improved stuff
-rw-r--r-- | Cargo.lock | 958 | ||||
-rw-r--r-- | Cargo.toml | 38 | ||||
-rw-r--r-- | assets/icon.png | bin | 0 -> 34190 bytes | |||
-rw-r--r-- | src/backup.rs | 37 | ||||
-rw-r--r-- | src/cli.rs | 7 | ||||
-rw-r--r-- | src/config.rs | 28 | ||||
-rw-r--r-- | src/error.rs | 17 | ||||
-rw-r--r-- | src/main.rs | 47 | ||||
-rw-r--r-- | src/packages.rs | 13 | ||||
-rw-r--r-- | src/pathinfo.rs | 110 |
10 files changed, 992 insertions, 263 deletions
@@ -3,21 +3,6 @@ | |||
3 | version = 3 | 3 | version = 3 |
4 | 4 | ||
5 | [[package]] | 5 | [[package]] |
6 | name = "addr2line" | ||
7 | version = "0.21.0" | ||
8 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
9 | checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" | ||
10 | dependencies = [ | ||
11 | "gimli", | ||
12 | ] | ||
13 | |||
14 | [[package]] | ||
15 | name = "adler" | ||
16 | version = "1.0.2" | ||
17 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
18 | checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" | ||
19 | |||
20 | [[package]] | ||
21 | name = "aho-corasick" | 6 | name = "aho-corasick" |
22 | version = "1.1.3" | 7 | version = "1.1.3" |
23 | source = "registry+https://github.com/rust-lang/crates.io-index" | 8 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -80,10 +65,10 @@ name = "arbs" | |||
80 | version = "0.1.0" | 65 | version = "0.1.0" |
81 | dependencies = [ | 66 | dependencies = [ |
82 | "clap", | 67 | "clap", |
83 | "color-eyre", | ||
84 | "config", | 68 | "config", |
85 | "dirs", | 69 | "dirs", |
86 | "gethostname", | 70 | "gethostname", |
71 | "notify-rust", | ||
87 | "serde", | 72 | "serde", |
88 | "serde_json", | 73 | "serde_json", |
89 | "thiserror", | 74 | "thiserror", |
@@ -95,10 +80,107 @@ dependencies = [ | |||
95 | ] | 80 | ] |
96 | 81 | ||
97 | [[package]] | 82 | [[package]] |
98 | name = "async-trait" | 83 | name = "async-broadcast" |
99 | version = "0.1.82" | 84 | version = "0.7.1" |
85 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
86 | checksum = "20cd0e2e25ea8e5f7e9df04578dc6cf5c83577fd09b1a46aaf5c85e1c33f2a7e" | ||
87 | dependencies = [ | ||
88 | "event-listener", | ||
89 | "event-listener-strategy", | ||
90 | "futures-core", | ||
91 | "pin-project-lite", | ||
92 | ] | ||
93 | |||
94 | [[package]] | ||
95 | name = "async-channel" | ||
96 | version = "2.3.1" | ||
97 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
98 | checksum = "89b47800b0be77592da0afd425cc03468052844aff33b84e33cc696f64e77b6a" | ||
99 | dependencies = [ | ||
100 | "concurrent-queue", | ||
101 | "event-listener-strategy", | ||
102 | "futures-core", | ||
103 | "pin-project-lite", | ||
104 | ] | ||
105 | |||
106 | [[package]] | ||
107 | name = "async-executor" | ||
108 | version = "1.13.1" | ||
100 | source = "registry+https://github.com/rust-lang/crates.io-index" | 109 | source = "registry+https://github.com/rust-lang/crates.io-index" |
101 | checksum = "a27b8a3a6e1a44fa4c8baf1f653e4172e81486d4941f2237e20dc2d0cf4ddff1" | 110 | checksum = "30ca9a001c1e8ba5149f91a74362376cc6bc5b919d92d988668657bd570bdcec" |
111 | dependencies = [ | ||
112 | "async-task", | ||
113 | "concurrent-queue", | ||
114 | "fastrand", | ||
115 | "futures-lite", | ||
116 | "slab", | ||
117 | ] | ||
118 | |||
119 | [[package]] | ||
120 | name = "async-fs" | ||
121 | version = "2.1.2" | ||
122 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
123 | checksum = "ebcd09b382f40fcd159c2d695175b2ae620ffa5f3bd6f664131efff4e8b9e04a" | ||
124 | dependencies = [ | ||
125 | "async-lock", | ||
126 | "blocking", | ||
127 | "futures-lite", | ||
128 | ] | ||
129 | |||
130 | [[package]] | ||
131 | name = "async-io" | ||
132 | version = "2.3.4" | ||
133 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
134 | checksum = "444b0228950ee6501b3568d3c93bf1176a1fdbc3b758dcd9475046d30f4dc7e8" | ||
135 | dependencies = [ | ||
136 | "async-lock", | ||
137 | "cfg-if", | ||
138 | "concurrent-queue", | ||
139 | "futures-io", | ||
140 | "futures-lite", | ||
141 | "parking", | ||
142 | "polling", | ||
143 | "rustix", | ||
144 | "slab", | ||
145 | "tracing", | ||
146 | "windows-sys 0.59.0", | ||
147 | ] | ||
148 | |||
149 | [[package]] | ||
150 | name = "async-lock" | ||
151 | version = "3.4.0" | ||
152 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
153 | checksum = "ff6e472cdea888a4bd64f342f09b3f50e1886d32afe8df3d663c01140b811b18" | ||
154 | dependencies = [ | ||
155 | "event-listener", | ||
156 | "event-listener-strategy", | ||
157 | "pin-project-lite", | ||
158 | ] | ||
159 | |||
160 | [[package]] | ||
161 | name = "async-process" | ||
162 | version = "2.3.0" | ||
163 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
164 | checksum = "63255f1dc2381611000436537bbedfe83183faa303a5a0edaf191edef06526bb" | ||
165 | dependencies = [ | ||
166 | "async-channel", | ||
167 | "async-io", | ||
168 | "async-lock", | ||
169 | "async-signal", | ||
170 | "async-task", | ||
171 | "blocking", | ||
172 | "cfg-if", | ||
173 | "event-listener", | ||
174 | "futures-lite", | ||
175 | "rustix", | ||
176 | "tracing", | ||
177 | ] | ||
178 | |||
179 | [[package]] | ||
180 | name = "async-recursion" | ||
181 | version = "1.1.1" | ||
182 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
183 | checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" | ||
102 | dependencies = [ | 184 | dependencies = [ |
103 | "proc-macro2", | 185 | "proc-macro2", |
104 | "quote", | 186 | "quote", |
@@ -106,21 +188,53 @@ dependencies = [ | |||
106 | ] | 188 | ] |
107 | 189 | ||
108 | [[package]] | 190 | [[package]] |
109 | name = "backtrace" | 191 | name = "async-signal" |
110 | version = "0.3.71" | 192 | version = "0.2.10" |
111 | source = "registry+https://github.com/rust-lang/crates.io-index" | 193 | source = "registry+https://github.com/rust-lang/crates.io-index" |
112 | checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" | 194 | checksum = "637e00349800c0bdf8bfc21ebbc0b6524abea702b0da4168ac00d070d0c0b9f3" |
113 | dependencies = [ | 195 | dependencies = [ |
114 | "addr2line", | 196 | "async-io", |
115 | "cc", | 197 | "async-lock", |
198 | "atomic-waker", | ||
116 | "cfg-if", | 199 | "cfg-if", |
117 | "libc", | 200 | "futures-core", |
118 | "miniz_oxide", | 201 | "futures-io", |
119 | "object", | 202 | "rustix", |
120 | "rustc-demangle", | 203 | "signal-hook-registry", |
204 | "slab", | ||
205 | "windows-sys 0.59.0", | ||
206 | ] | ||
207 | |||
208 | [[package]] | ||
209 | name = "async-task" | ||
210 | version = "4.7.1" | ||
211 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
212 | checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" | ||
213 | |||
214 | [[package]] | ||
215 | name = "async-trait" | ||
216 | version = "0.1.83" | ||
217 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
218 | checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" | ||
219 | dependencies = [ | ||
220 | "proc-macro2", | ||
221 | "quote", | ||
222 | "syn", | ||
121 | ] | 223 | ] |
122 | 224 | ||
123 | [[package]] | 225 | [[package]] |
226 | name = "atomic-waker" | ||
227 | version = "1.1.2" | ||
228 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
229 | checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" | ||
230 | |||
231 | [[package]] | ||
232 | name = "autocfg" | ||
233 | version = "1.3.0" | ||
234 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
235 | checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" | ||
236 | |||
237 | [[package]] | ||
124 | name = "base64" | 238 | name = "base64" |
125 | version = "0.21.7" | 239 | version = "0.21.7" |
126 | source = "registry+https://github.com/rust-lang/crates.io-index" | 240 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -136,6 +250,12 @@ dependencies = [ | |||
136 | ] | 250 | ] |
137 | 251 | ||
138 | [[package]] | 252 | [[package]] |
253 | name = "block" | ||
254 | version = "0.1.6" | ||
255 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
256 | checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" | ||
257 | |||
258 | [[package]] | ||
139 | name = "block-buffer" | 259 | name = "block-buffer" |
140 | version = "0.10.4" | 260 | version = "0.10.4" |
141 | source = "registry+https://github.com/rust-lang/crates.io-index" | 261 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -145,10 +265,29 @@ dependencies = [ | |||
145 | ] | 265 | ] |
146 | 266 | ||
147 | [[package]] | 267 | [[package]] |
268 | name = "blocking" | ||
269 | version = "1.6.1" | ||
270 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
271 | checksum = "703f41c54fc768e63e091340b424302bb1c29ef4aa0c7f10fe849dfb114d29ea" | ||
272 | dependencies = [ | ||
273 | "async-channel", | ||
274 | "async-task", | ||
275 | "futures-io", | ||
276 | "futures-lite", | ||
277 | "piper", | ||
278 | ] | ||
279 | |||
280 | [[package]] | ||
281 | name = "byteorder" | ||
282 | version = "1.5.0" | ||
283 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
284 | checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" | ||
285 | |||
286 | [[package]] | ||
148 | name = "cc" | 287 | name = "cc" |
149 | version = "1.1.16" | 288 | version = "1.1.21" |
150 | source = "registry+https://github.com/rust-lang/crates.io-index" | 289 | source = "registry+https://github.com/rust-lang/crates.io-index" |
151 | checksum = "e9d013ecb737093c0e86b151a7b837993cf9ec6c502946cfb44bedc392421e0b" | 290 | checksum = "07b1695e2c7e8fc85310cde85aeaab7e3097f593c91d209d3f9df76c928100f0" |
152 | dependencies = [ | 291 | dependencies = [ |
153 | "shlex", | 292 | "shlex", |
154 | ] | 293 | ] |
@@ -160,10 +299,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
160 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" | 299 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" |
161 | 300 | ||
162 | [[package]] | 301 | [[package]] |
302 | name = "cfg_aliases" | ||
303 | version = "0.2.1" | ||
304 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
305 | checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" | ||
306 | |||
307 | [[package]] | ||
163 | name = "clap" | 308 | name = "clap" |
164 | version = "4.5.17" | 309 | version = "4.5.18" |
165 | source = "registry+https://github.com/rust-lang/crates.io-index" | 310 | source = "registry+https://github.com/rust-lang/crates.io-index" |
166 | checksum = "3e5a21b8495e732f1b3c364c9949b201ca7bae518c502c80256c96ad79eaf6ac" | 311 | checksum = "b0956a43b323ac1afaffc053ed5c4b7c1f1800bacd1683c353aabbb752515dd3" |
167 | dependencies = [ | 312 | dependencies = [ |
168 | "clap_builder", | 313 | "clap_builder", |
169 | "clap_derive", | 314 | "clap_derive", |
@@ -171,9 +316,9 @@ dependencies = [ | |||
171 | 316 | ||
172 | [[package]] | 317 | [[package]] |
173 | name = "clap_builder" | 318 | name = "clap_builder" |
174 | version = "4.5.17" | 319 | version = "4.5.18" |
175 | source = "registry+https://github.com/rust-lang/crates.io-index" | 320 | source = "registry+https://github.com/rust-lang/crates.io-index" |
176 | checksum = "8cf2dd12af7a047ad9d6da2b6b249759a22a7abc0f474c1dae1777afa4b21a73" | 321 | checksum = "4d72166dd41634086d5803a47eb71ae740e61d84709c36f3c34110173db3961b" |
177 | dependencies = [ | 322 | dependencies = [ |
178 | "anstream", | 323 | "anstream", |
179 | "anstyle", | 324 | "anstyle", |
@@ -183,9 +328,9 @@ dependencies = [ | |||
183 | 328 | ||
184 | [[package]] | 329 | [[package]] |
185 | name = "clap_derive" | 330 | name = "clap_derive" |
186 | version = "4.5.13" | 331 | version = "4.5.18" |
187 | source = "registry+https://github.com/rust-lang/crates.io-index" | 332 | source = "registry+https://github.com/rust-lang/crates.io-index" |
188 | checksum = "501d359d5f3dcaf6ecdeee48833ae73ec6e42723a1e52419c79abf9507eec0a0" | 333 | checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab" |
189 | dependencies = [ | 334 | dependencies = [ |
190 | "heck", | 335 | "heck", |
191 | "proc-macro2", | 336 | "proc-macro2", |
@@ -200,39 +345,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
200 | checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" | 345 | checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" |
201 | 346 | ||
202 | [[package]] | 347 | [[package]] |
203 | name = "color-eyre" | 348 | name = "colorchoice" |
204 | version = "0.6.3" | 349 | version = "1.0.2" |
205 | source = "registry+https://github.com/rust-lang/crates.io-index" | 350 | source = "registry+https://github.com/rust-lang/crates.io-index" |
206 | checksum = "55146f5e46f237f7423d74111267d4597b59b0dad0ffaf7303bce9945d843ad5" | 351 | checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" |
207 | dependencies = [ | ||
208 | "backtrace", | ||
209 | "color-spantrace", | ||
210 | "eyre", | ||
211 | "indenter", | ||
212 | "once_cell", | ||
213 | "owo-colors", | ||
214 | "tracing-error", | ||
215 | ] | ||
216 | 352 | ||
217 | [[package]] | 353 | [[package]] |
218 | name = "color-spantrace" | 354 | name = "concurrent-queue" |
219 | version = "0.2.1" | 355 | version = "2.5.0" |
220 | source = "registry+https://github.com/rust-lang/crates.io-index" | 356 | source = "registry+https://github.com/rust-lang/crates.io-index" |
221 | checksum = "cd6be1b2a7e382e2b98b43b2adcca6bb0e465af0bdd38123873ae61eb17a72c2" | 357 | checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" |
222 | dependencies = [ | 358 | dependencies = [ |
223 | "once_cell", | 359 | "crossbeam-utils", |
224 | "owo-colors", | ||
225 | "tracing-core", | ||
226 | "tracing-error", | ||
227 | ] | 360 | ] |
228 | 361 | ||
229 | [[package]] | 362 | [[package]] |
230 | name = "colorchoice" | ||
231 | version = "1.0.2" | ||
232 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
233 | checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" | ||
234 | |||
235 | [[package]] | ||
236 | name = "config" | 363 | name = "config" |
237 | version = "0.14.0" | 364 | version = "0.14.0" |
238 | source = "registry+https://github.com/rust-lang/crates.io-index" | 365 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -249,6 +376,7 @@ dependencies = [ | |||
249 | "serde", | 376 | "serde", |
250 | "serde_json", | 377 | "serde_json", |
251 | "toml", | 378 | "toml", |
379 | "yaml-rust", | ||
252 | ] | 380 | ] |
253 | 381 | ||
254 | [[package]] | 382 | [[package]] |
@@ -282,9 +410,9 @@ dependencies = [ | |||
282 | 410 | ||
283 | [[package]] | 411 | [[package]] |
284 | name = "cpufeatures" | 412 | name = "cpufeatures" |
285 | version = "0.2.13" | 413 | version = "0.2.14" |
286 | source = "registry+https://github.com/rust-lang/crates.io-index" | 414 | source = "registry+https://github.com/rust-lang/crates.io-index" |
287 | checksum = "51e852e6dc9a5bed1fae92dd2375037bf2b768725bf3be87811edee3249d09ad" | 415 | checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" |
288 | dependencies = [ | 416 | dependencies = [ |
289 | "libc", | 417 | "libc", |
290 | ] | 418 | ] |
@@ -349,6 +477,16 @@ dependencies = [ | |||
349 | ] | 477 | ] |
350 | 478 | ||
351 | [[package]] | 479 | [[package]] |
480 | name = "dirs-next" | ||
481 | version = "2.0.0" | ||
482 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
483 | checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" | ||
484 | dependencies = [ | ||
485 | "cfg-if", | ||
486 | "dirs-sys-next", | ||
487 | ] | ||
488 | |||
489 | [[package]] | ||
352 | name = "dirs-sys" | 490 | name = "dirs-sys" |
353 | version = "0.4.1" | 491 | version = "0.4.1" |
354 | source = "registry+https://github.com/rust-lang/crates.io-index" | 492 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -361,6 +499,17 @@ dependencies = [ | |||
361 | ] | 499 | ] |
362 | 500 | ||
363 | [[package]] | 501 | [[package]] |
502 | name = "dirs-sys-next" | ||
503 | version = "0.1.2" | ||
504 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
505 | checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" | ||
506 | dependencies = [ | ||
507 | "libc", | ||
508 | "redox_users", | ||
509 | "winapi", | ||
510 | ] | ||
511 | |||
512 | [[package]] | ||
364 | name = "dlv-list" | 513 | name = "dlv-list" |
365 | version = "0.5.2" | 514 | version = "0.5.2" |
366 | source = "registry+https://github.com/rust-lang/crates.io-index" | 515 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -370,6 +519,33 @@ dependencies = [ | |||
370 | ] | 519 | ] |
371 | 520 | ||
372 | [[package]] | 521 | [[package]] |
522 | name = "endi" | ||
523 | version = "1.1.0" | ||
524 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
525 | checksum = "a3d8a32ae18130a3c84dd492d4215c3d913c3b07c6b63c2eb3eb7ff1101ab7bf" | ||
526 | |||
527 | [[package]] | ||
528 | name = "enumflags2" | ||
529 | version = "0.7.10" | ||
530 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
531 | checksum = "d232db7f5956f3f14313dc2f87985c58bd2c695ce124c8cdd984e08e15ac133d" | ||
532 | dependencies = [ | ||
533 | "enumflags2_derive", | ||
534 | "serde", | ||
535 | ] | ||
536 | |||
537 | [[package]] | ||
538 | name = "enumflags2_derive" | ||
539 | version = "0.7.10" | ||
540 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
541 | checksum = "de0d48a183585823424a4ce1aa132d174a6a81bd540895822eb4c8373a8e49e8" | ||
542 | dependencies = [ | ||
543 | "proc-macro2", | ||
544 | "quote", | ||
545 | "syn", | ||
546 | ] | ||
547 | |||
548 | [[package]] | ||
373 | name = "equivalent" | 549 | name = "equivalent" |
374 | version = "1.0.1" | 550 | version = "1.0.1" |
375 | source = "registry+https://github.com/rust-lang/crates.io-index" | 551 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -386,13 +562,83 @@ dependencies = [ | |||
386 | ] | 562 | ] |
387 | 563 | ||
388 | [[package]] | 564 | [[package]] |
389 | name = "eyre" | 565 | name = "event-listener" |
390 | version = "0.6.12" | 566 | version = "5.3.1" |
391 | source = "registry+https://github.com/rust-lang/crates.io-index" | 567 | source = "registry+https://github.com/rust-lang/crates.io-index" |
392 | checksum = "7cd915d99f24784cdc19fd37ef22b97e3ff0ae756c7e492e9fbfe897d61e2aec" | 568 | checksum = "6032be9bd27023a771701cc49f9f053c751055f71efb2e0ae5c15809093675ba" |
393 | dependencies = [ | 569 | dependencies = [ |
394 | "indenter", | 570 | "concurrent-queue", |
395 | "once_cell", | 571 | "parking", |
572 | "pin-project-lite", | ||
573 | ] | ||
574 | |||
575 | [[package]] | ||
576 | name = "event-listener-strategy" | ||
577 | version = "0.5.2" | ||
578 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
579 | checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1" | ||
580 | dependencies = [ | ||
581 | "event-listener", | ||
582 | "pin-project-lite", | ||
583 | ] | ||
584 | |||
585 | [[package]] | ||
586 | name = "fastrand" | ||
587 | version = "2.1.1" | ||
588 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
589 | checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" | ||
590 | |||
591 | [[package]] | ||
592 | name = "futures-core" | ||
593 | version = "0.3.30" | ||
594 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
595 | checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" | ||
596 | |||
597 | [[package]] | ||
598 | name = "futures-io" | ||
599 | version = "0.3.30" | ||
600 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
601 | checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" | ||
602 | |||
603 | [[package]] | ||
604 | name = "futures-lite" | ||
605 | version = "2.3.0" | ||
606 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
607 | checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5" | ||
608 | dependencies = [ | ||
609 | "fastrand", | ||
610 | "futures-core", | ||
611 | "futures-io", | ||
612 | "parking", | ||
613 | "pin-project-lite", | ||
614 | ] | ||
615 | |||
616 | [[package]] | ||
617 | name = "futures-sink" | ||
618 | version = "0.3.30" | ||
619 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
620 | checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" | ||
621 | |||
622 | [[package]] | ||
623 | name = "futures-task" | ||
624 | version = "0.3.30" | ||
625 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
626 | checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" | ||
627 | |||
628 | [[package]] | ||
629 | name = "futures-util" | ||
630 | version = "0.3.30" | ||
631 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
632 | checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" | ||
633 | dependencies = [ | ||
634 | "futures-core", | ||
635 | "futures-io", | ||
636 | "futures-sink", | ||
637 | "futures-task", | ||
638 | "memchr", | ||
639 | "pin-project-lite", | ||
640 | "pin-utils", | ||
641 | "slab", | ||
396 | ] | 642 | ] |
397 | 643 | ||
398 | [[package]] | 644 | [[package]] |
@@ -427,12 +673,6 @@ dependencies = [ | |||
427 | ] | 673 | ] |
428 | 674 | ||
429 | [[package]] | 675 | [[package]] |
430 | name = "gimli" | ||
431 | version = "0.28.1" | ||
432 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
433 | checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" | ||
434 | |||
435 | [[package]] | ||
436 | name = "hashbrown" | 676 | name = "hashbrown" |
437 | version = "0.13.2" | 677 | version = "0.13.2" |
438 | source = "registry+https://github.com/rust-lang/crates.io-index" | 678 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -451,10 +691,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
451 | checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" | 691 | checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" |
452 | 692 | ||
453 | [[package]] | 693 | [[package]] |
454 | name = "indenter" | 694 | name = "hermit-abi" |
455 | version = "0.3.3" | 695 | version = "0.4.0" |
456 | source = "registry+https://github.com/rust-lang/crates.io-index" | 696 | source = "registry+https://github.com/rust-lang/crates.io-index" |
457 | checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" | 697 | checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" |
698 | |||
699 | [[package]] | ||
700 | name = "hex" | ||
701 | version = "0.4.3" | ||
702 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
703 | checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" | ||
458 | 704 | ||
459 | [[package]] | 705 | [[package]] |
460 | name = "indexmap" | 706 | name = "indexmap" |
@@ -497,9 +743,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" | |||
497 | 743 | ||
498 | [[package]] | 744 | [[package]] |
499 | name = "libc" | 745 | name = "libc" |
500 | version = "0.2.158" | 746 | version = "0.2.159" |
501 | source = "registry+https://github.com/rust-lang/crates.io-index" | 747 | source = "registry+https://github.com/rust-lang/crates.io-index" |
502 | checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" | 748 | checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5" |
503 | 749 | ||
504 | [[package]] | 750 | [[package]] |
505 | name = "libredox" | 751 | name = "libredox" |
@@ -512,6 +758,12 @@ dependencies = [ | |||
512 | ] | 758 | ] |
513 | 759 | ||
514 | [[package]] | 760 | [[package]] |
761 | name = "linked-hash-map" | ||
762 | version = "0.5.6" | ||
763 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
764 | checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" | ||
765 | |||
766 | [[package]] | ||
515 | name = "linux-raw-sys" | 767 | name = "linux-raw-sys" |
516 | version = "0.4.14" | 768 | version = "0.4.14" |
517 | source = "registry+https://github.com/rust-lang/crates.io-index" | 769 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -524,6 +776,28 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
524 | checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" | 776 | checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" |
525 | 777 | ||
526 | [[package]] | 778 | [[package]] |
779 | name = "mac-notification-sys" | ||
780 | version = "0.6.2" | ||
781 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
782 | checksum = "dce8f34f3717aa37177e723df6c1fc5fb02b2a1087374ea3fe0ea42316dc8f91" | ||
783 | dependencies = [ | ||
784 | "cc", | ||
785 | "dirs-next", | ||
786 | "objc-foundation", | ||
787 | "objc_id", | ||
788 | "time", | ||
789 | ] | ||
790 | |||
791 | [[package]] | ||
792 | name = "malloc_buf" | ||
793 | version = "0.0.6" | ||
794 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
795 | checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb" | ||
796 | dependencies = [ | ||
797 | "libc", | ||
798 | ] | ||
799 | |||
800 | [[package]] | ||
527 | name = "matchers" | 801 | name = "matchers" |
528 | version = "0.1.0" | 802 | version = "0.1.0" |
529 | source = "registry+https://github.com/rust-lang/crates.io-index" | 803 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -539,18 +813,31 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
539 | checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" | 813 | checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" |
540 | 814 | ||
541 | [[package]] | 815 | [[package]] |
816 | name = "memoffset" | ||
817 | version = "0.9.1" | ||
818 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
819 | checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" | ||
820 | dependencies = [ | ||
821 | "autocfg", | ||
822 | ] | ||
823 | |||
824 | [[package]] | ||
542 | name = "minimal-lexical" | 825 | name = "minimal-lexical" |
543 | version = "0.2.1" | 826 | version = "0.2.1" |
544 | source = "registry+https://github.com/rust-lang/crates.io-index" | 827 | source = "registry+https://github.com/rust-lang/crates.io-index" |
545 | checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" | 828 | checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" |
546 | 829 | ||
547 | [[package]] | 830 | [[package]] |
548 | name = "miniz_oxide" | 831 | name = "nix" |
549 | version = "0.7.4" | 832 | version = "0.29.0" |
550 | source = "registry+https://github.com/rust-lang/crates.io-index" | 833 | source = "registry+https://github.com/rust-lang/crates.io-index" |
551 | checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" | 834 | checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" |
552 | dependencies = [ | 835 | dependencies = [ |
553 | "adler", | 836 | "bitflags", |
837 | "cfg-if", | ||
838 | "cfg_aliases", | ||
839 | "libc", | ||
840 | "memoffset", | ||
554 | ] | 841 | ] |
555 | 842 | ||
556 | [[package]] | 843 | [[package]] |
@@ -564,6 +851,19 @@ dependencies = [ | |||
564 | ] | 851 | ] |
565 | 852 | ||
566 | [[package]] | 853 | [[package]] |
854 | name = "notify-rust" | ||
855 | version = "4.11.3" | ||
856 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
857 | checksum = "5134a72dc570b178bff81b01e81ab14a6fcc015391ed4b3b14853090658cd3a3" | ||
858 | dependencies = [ | ||
859 | "log", | ||
860 | "mac-notification-sys", | ||
861 | "serde", | ||
862 | "tauri-winrt-notification", | ||
863 | "zbus", | ||
864 | ] | ||
865 | |||
866 | [[package]] | ||
567 | name = "nu-ansi-term" | 867 | name = "nu-ansi-term" |
568 | version = "0.46.0" | 868 | version = "0.46.0" |
569 | source = "registry+https://github.com/rust-lang/crates.io-index" | 869 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -580,12 +880,32 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
580 | checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" | 880 | checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" |
581 | 881 | ||
582 | [[package]] | 882 | [[package]] |
583 | name = "object" | 883 | name = "objc" |
584 | version = "0.32.2" | 884 | version = "0.2.7" |
585 | source = "registry+https://github.com/rust-lang/crates.io-index" | 885 | source = "registry+https://github.com/rust-lang/crates.io-index" |
586 | checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" | 886 | checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" |
587 | dependencies = [ | 887 | dependencies = [ |
588 | "memchr", | 888 | "malloc_buf", |
889 | ] | ||
890 | |||
891 | [[package]] | ||
892 | name = "objc-foundation" | ||
893 | version = "0.1.1" | ||
894 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
895 | checksum = "1add1b659e36c9607c7aab864a76c7a4c2760cd0cd2e120f3fb8b952c7e22bf9" | ||
896 | dependencies = [ | ||
897 | "block", | ||
898 | "objc", | ||
899 | "objc_id", | ||
900 | ] | ||
901 | |||
902 | [[package]] | ||
903 | name = "objc_id" | ||
904 | version = "0.1.1" | ||
905 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
906 | checksum = "c92d4ddb4bd7b50d730c215ff871754d0da6b2178849f8a2a2ab69712d0c073b" | ||
907 | dependencies = [ | ||
908 | "objc", | ||
589 | ] | 909 | ] |
590 | 910 | ||
591 | [[package]] | 911 | [[package]] |
@@ -611,16 +931,26 @@ dependencies = [ | |||
611 | ] | 931 | ] |
612 | 932 | ||
613 | [[package]] | 933 | [[package]] |
934 | name = "ordered-stream" | ||
935 | version = "0.2.0" | ||
936 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
937 | checksum = "9aa2b01e1d916879f73a53d01d1d6cee68adbb31d6d9177a8cfce093cced1d50" | ||
938 | dependencies = [ | ||
939 | "futures-core", | ||
940 | "pin-project-lite", | ||
941 | ] | ||
942 | |||
943 | [[package]] | ||
614 | name = "overload" | 944 | name = "overload" |
615 | version = "0.1.1" | 945 | version = "0.1.1" |
616 | source = "registry+https://github.com/rust-lang/crates.io-index" | 946 | source = "registry+https://github.com/rust-lang/crates.io-index" |
617 | checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" | 947 | checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" |
618 | 948 | ||
619 | [[package]] | 949 | [[package]] |
620 | name = "owo-colors" | 950 | name = "parking" |
621 | version = "3.5.0" | 951 | version = "2.2.1" |
622 | source = "registry+https://github.com/rust-lang/crates.io-index" | 952 | source = "registry+https://github.com/rust-lang/crates.io-index" |
623 | checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" | 953 | checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" |
624 | 954 | ||
625 | [[package]] | 955 | [[package]] |
626 | name = "pathdiff" | 956 | name = "pathdiff" |
@@ -630,9 +960,9 @@ checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" | |||
630 | 960 | ||
631 | [[package]] | 961 | [[package]] |
632 | name = "pest" | 962 | name = "pest" |
633 | version = "2.7.11" | 963 | version = "2.7.13" |
634 | source = "registry+https://github.com/rust-lang/crates.io-index" | 964 | source = "registry+https://github.com/rust-lang/crates.io-index" |
635 | checksum = "cd53dff83f26735fdc1ca837098ccf133605d794cdae66acfc2bfac3ec809d95" | 965 | checksum = "fdbef9d1d47087a895abd220ed25eb4ad973a5e26f6a4367b038c25e28dfc2d9" |
636 | dependencies = [ | 966 | dependencies = [ |
637 | "memchr", | 967 | "memchr", |
638 | "thiserror", | 968 | "thiserror", |
@@ -641,9 +971,9 @@ dependencies = [ | |||
641 | 971 | ||
642 | [[package]] | 972 | [[package]] |
643 | name = "pest_derive" | 973 | name = "pest_derive" |
644 | version = "2.7.11" | 974 | version = "2.7.13" |
645 | source = "registry+https://github.com/rust-lang/crates.io-index" | 975 | source = "registry+https://github.com/rust-lang/crates.io-index" |
646 | checksum = "2a548d2beca6773b1c244554d36fcf8548a8a58e74156968211567250e48e49a" | 976 | checksum = "4d3a6e3394ec80feb3b6393c725571754c6188490265c61aaf260810d6b95aa0" |
647 | dependencies = [ | 977 | dependencies = [ |
648 | "pest", | 978 | "pest", |
649 | "pest_generator", | 979 | "pest_generator", |
@@ -651,9 +981,9 @@ dependencies = [ | |||
651 | 981 | ||
652 | [[package]] | 982 | [[package]] |
653 | name = "pest_generator" | 983 | name = "pest_generator" |
654 | version = "2.7.11" | 984 | version = "2.7.13" |
655 | source = "registry+https://github.com/rust-lang/crates.io-index" | 985 | source = "registry+https://github.com/rust-lang/crates.io-index" |
656 | checksum = "3c93a82e8d145725dcbaf44e5ea887c8a869efdcc28706df2d08c69e17077183" | 986 | checksum = "94429506bde1ca69d1b5601962c73f4172ab4726571a59ea95931218cb0e930e" |
657 | dependencies = [ | 987 | dependencies = [ |
658 | "pest", | 988 | "pest", |
659 | "pest_meta", | 989 | "pest_meta", |
@@ -664,9 +994,9 @@ dependencies = [ | |||
664 | 994 | ||
665 | [[package]] | 995 | [[package]] |
666 | name = "pest_meta" | 996 | name = "pest_meta" |
667 | version = "2.7.11" | 997 | version = "2.7.13" |
668 | source = "registry+https://github.com/rust-lang/crates.io-index" | 998 | source = "registry+https://github.com/rust-lang/crates.io-index" |
669 | checksum = "a941429fea7e08bedec25e4f6785b6ffaacc6b755da98df5ef3e7dcf4a124c4f" | 999 | checksum = "ac8a071862e93690b6e34e9a5fb8e33ff3734473ac0245b27232222c4906a33f" |
670 | dependencies = [ | 1000 | dependencies = [ |
671 | "once_cell", | 1001 | "once_cell", |
672 | "pest", | 1002 | "pest", |
@@ -680,12 +1010,62 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
680 | checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" | 1010 | checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" |
681 | 1011 | ||
682 | [[package]] | 1012 | [[package]] |
1013 | name = "pin-utils" | ||
1014 | version = "0.1.0" | ||
1015 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1016 | checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" | ||
1017 | |||
1018 | [[package]] | ||
1019 | name = "piper" | ||
1020 | version = "0.2.4" | ||
1021 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1022 | checksum = "96c8c490f422ef9a4efd2cb5b42b76c8613d7e7dfc1caf667b8a3350a5acc066" | ||
1023 | dependencies = [ | ||
1024 | "atomic-waker", | ||
1025 | "fastrand", | ||
1026 | "futures-io", | ||
1027 | ] | ||
1028 | |||
1029 | [[package]] | ||
1030 | name = "polling" | ||
1031 | version = "3.7.3" | ||
1032 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1033 | checksum = "cc2790cd301dec6cd3b7a025e4815cf825724a51c98dccfe6a3e55f05ffb6511" | ||
1034 | dependencies = [ | ||
1035 | "cfg-if", | ||
1036 | "concurrent-queue", | ||
1037 | "hermit-abi", | ||
1038 | "pin-project-lite", | ||
1039 | "rustix", | ||
1040 | "tracing", | ||
1041 | "windows-sys 0.59.0", | ||
1042 | ] | ||
1043 | |||
1044 | [[package]] | ||
683 | name = "powerfmt" | 1045 | name = "powerfmt" |
684 | version = "0.2.0" | 1046 | version = "0.2.0" |
685 | source = "registry+https://github.com/rust-lang/crates.io-index" | 1047 | source = "registry+https://github.com/rust-lang/crates.io-index" |
686 | checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" | 1048 | checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" |
687 | 1049 | ||
688 | [[package]] | 1050 | [[package]] |
1051 | name = "ppv-lite86" | ||
1052 | version = "0.2.20" | ||
1053 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1054 | checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" | ||
1055 | dependencies = [ | ||
1056 | "zerocopy", | ||
1057 | ] | ||
1058 | |||
1059 | [[package]] | ||
1060 | name = "proc-macro-crate" | ||
1061 | version = "3.2.0" | ||
1062 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1063 | checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" | ||
1064 | dependencies = [ | ||
1065 | "toml_edit", | ||
1066 | ] | ||
1067 | |||
1068 | [[package]] | ||
689 | name = "proc-macro2" | 1069 | name = "proc-macro2" |
690 | version = "1.0.86" | 1070 | version = "1.0.86" |
691 | source = "registry+https://github.com/rust-lang/crates.io-index" | 1071 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -695,6 +1075,15 @@ dependencies = [ | |||
695 | ] | 1075 | ] |
696 | 1076 | ||
697 | [[package]] | 1077 | [[package]] |
1078 | name = "quick-xml" | ||
1079 | version = "0.31.0" | ||
1080 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1081 | checksum = "1004a344b30a54e2ee58d66a71b32d2db2feb0a31f9a2d302bf0536f15de2a33" | ||
1082 | dependencies = [ | ||
1083 | "memchr", | ||
1084 | ] | ||
1085 | |||
1086 | [[package]] | ||
698 | name = "quote" | 1087 | name = "quote" |
699 | version = "1.0.37" | 1088 | version = "1.0.37" |
700 | source = "registry+https://github.com/rust-lang/crates.io-index" | 1089 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -704,6 +1093,36 @@ dependencies = [ | |||
704 | ] | 1093 | ] |
705 | 1094 | ||
706 | [[package]] | 1095 | [[package]] |
1096 | name = "rand" | ||
1097 | version = "0.8.5" | ||
1098 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1099 | checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" | ||
1100 | dependencies = [ | ||
1101 | "libc", | ||
1102 | "rand_chacha", | ||
1103 | "rand_core", | ||
1104 | ] | ||
1105 | |||
1106 | [[package]] | ||
1107 | name = "rand_chacha" | ||
1108 | version = "0.3.1" | ||
1109 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1110 | checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" | ||
1111 | dependencies = [ | ||
1112 | "ppv-lite86", | ||
1113 | "rand_core", | ||
1114 | ] | ||
1115 | |||
1116 | [[package]] | ||
1117 | name = "rand_core" | ||
1118 | version = "0.6.4" | ||
1119 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1120 | checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" | ||
1121 | dependencies = [ | ||
1122 | "getrandom", | ||
1123 | ] | ||
1124 | |||
1125 | [[package]] | ||
707 | name = "redox_users" | 1126 | name = "redox_users" |
708 | version = "0.4.6" | 1127 | version = "0.4.6" |
709 | source = "registry+https://github.com/rust-lang/crates.io-index" | 1128 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -781,16 +1200,10 @@ dependencies = [ | |||
781 | ] | 1200 | ] |
782 | 1201 | ||
783 | [[package]] | 1202 | [[package]] |
784 | name = "rustc-demangle" | ||
785 | version = "0.1.24" | ||
786 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
787 | checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" | ||
788 | |||
789 | [[package]] | ||
790 | name = "rustix" | 1203 | name = "rustix" |
791 | version = "0.38.36" | 1204 | version = "0.38.37" |
792 | source = "registry+https://github.com/rust-lang/crates.io-index" | 1205 | source = "registry+https://github.com/rust-lang/crates.io-index" |
793 | checksum = "3f55e80d50763938498dd5ebb18647174e0c76dc38c5505294bb224624f30f36" | 1206 | checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" |
794 | dependencies = [ | 1207 | dependencies = [ |
795 | "bitflags", | 1208 | "bitflags", |
796 | "errno", | 1209 | "errno", |
@@ -807,18 +1220,18 @@ checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" | |||
807 | 1220 | ||
808 | [[package]] | 1221 | [[package]] |
809 | name = "serde" | 1222 | name = "serde" |
810 | version = "1.0.209" | 1223 | version = "1.0.210" |
811 | source = "registry+https://github.com/rust-lang/crates.io-index" | 1224 | source = "registry+https://github.com/rust-lang/crates.io-index" |
812 | checksum = "99fce0ffe7310761ca6bf9faf5115afbc19688edd00171d81b1bb1b116c63e09" | 1225 | checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" |
813 | dependencies = [ | 1226 | dependencies = [ |
814 | "serde_derive", | 1227 | "serde_derive", |
815 | ] | 1228 | ] |
816 | 1229 | ||
817 | [[package]] | 1230 | [[package]] |
818 | name = "serde_derive" | 1231 | name = "serde_derive" |
819 | version = "1.0.209" | 1232 | version = "1.0.210" |
820 | source = "registry+https://github.com/rust-lang/crates.io-index" | 1233 | source = "registry+https://github.com/rust-lang/crates.io-index" |
821 | checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170" | 1234 | checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" |
822 | dependencies = [ | 1235 | dependencies = [ |
823 | "proc-macro2", | 1236 | "proc-macro2", |
824 | "quote", | 1237 | "quote", |
@@ -838,6 +1251,17 @@ dependencies = [ | |||
838 | ] | 1251 | ] |
839 | 1252 | ||
840 | [[package]] | 1253 | [[package]] |
1254 | name = "serde_repr" | ||
1255 | version = "0.1.19" | ||
1256 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1257 | checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" | ||
1258 | dependencies = [ | ||
1259 | "proc-macro2", | ||
1260 | "quote", | ||
1261 | "syn", | ||
1262 | ] | ||
1263 | |||
1264 | [[package]] | ||
841 | name = "serde_spanned" | 1265 | name = "serde_spanned" |
842 | version = "0.6.7" | 1266 | version = "0.6.7" |
843 | source = "registry+https://github.com/rust-lang/crates.io-index" | 1267 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -847,6 +1271,17 @@ dependencies = [ | |||
847 | ] | 1271 | ] |
848 | 1272 | ||
849 | [[package]] | 1273 | [[package]] |
1274 | name = "sha1" | ||
1275 | version = "0.10.6" | ||
1276 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1277 | checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" | ||
1278 | dependencies = [ | ||
1279 | "cfg-if", | ||
1280 | "cpufeatures", | ||
1281 | "digest", | ||
1282 | ] | ||
1283 | |||
1284 | [[package]] | ||
850 | name = "sha2" | 1285 | name = "sha2" |
851 | version = "0.10.8" | 1286 | version = "0.10.8" |
852 | source = "registry+https://github.com/rust-lang/crates.io-index" | 1287 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -873,12 +1308,36 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
873 | checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" | 1308 | checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" |
874 | 1309 | ||
875 | [[package]] | 1310 | [[package]] |
1311 | name = "signal-hook-registry" | ||
1312 | version = "1.4.2" | ||
1313 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1314 | checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" | ||
1315 | dependencies = [ | ||
1316 | "libc", | ||
1317 | ] | ||
1318 | |||
1319 | [[package]] | ||
1320 | name = "slab" | ||
1321 | version = "0.4.9" | ||
1322 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1323 | checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" | ||
1324 | dependencies = [ | ||
1325 | "autocfg", | ||
1326 | ] | ||
1327 | |||
1328 | [[package]] | ||
876 | name = "smallvec" | 1329 | name = "smallvec" |
877 | version = "1.13.2" | 1330 | version = "1.13.2" |
878 | source = "registry+https://github.com/rust-lang/crates.io-index" | 1331 | source = "registry+https://github.com/rust-lang/crates.io-index" |
879 | checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" | 1332 | checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" |
880 | 1333 | ||
881 | [[package]] | 1334 | [[package]] |
1335 | name = "static_assertions" | ||
1336 | version = "1.1.0" | ||
1337 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1338 | checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" | ||
1339 | |||
1340 | [[package]] | ||
882 | name = "strsim" | 1341 | name = "strsim" |
883 | version = "0.11.1" | 1342 | version = "0.11.1" |
884 | source = "registry+https://github.com/rust-lang/crates.io-index" | 1343 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -896,19 +1355,43 @@ dependencies = [ | |||
896 | ] | 1355 | ] |
897 | 1356 | ||
898 | [[package]] | 1357 | [[package]] |
1358 | name = "tauri-winrt-notification" | ||
1359 | version = "0.2.1" | ||
1360 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1361 | checksum = "f89f5fb70d6f62381f5d9b2ba9008196150b40b75f3068eb24faeddf1c686871" | ||
1362 | dependencies = [ | ||
1363 | "quick-xml", | ||
1364 | "windows", | ||
1365 | "windows-version", | ||
1366 | ] | ||
1367 | |||
1368 | [[package]] | ||
1369 | name = "tempfile" | ||
1370 | version = "3.12.0" | ||
1371 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1372 | checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" | ||
1373 | dependencies = [ | ||
1374 | "cfg-if", | ||
1375 | "fastrand", | ||
1376 | "once_cell", | ||
1377 | "rustix", | ||
1378 | "windows-sys 0.59.0", | ||
1379 | ] | ||
1380 | |||
1381 | [[package]] | ||
899 | name = "thiserror" | 1382 | name = "thiserror" |
900 | version = "1.0.63" | 1383 | version = "1.0.64" |
901 | source = "registry+https://github.com/rust-lang/crates.io-index" | 1384 | source = "registry+https://github.com/rust-lang/crates.io-index" |
902 | checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" | 1385 | checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" |
903 | dependencies = [ | 1386 | dependencies = [ |
904 | "thiserror-impl", | 1387 | "thiserror-impl", |
905 | ] | 1388 | ] |
906 | 1389 | ||
907 | [[package]] | 1390 | [[package]] |
908 | name = "thiserror-impl" | 1391 | name = "thiserror-impl" |
909 | version = "1.0.63" | 1392 | version = "1.0.64" |
910 | source = "registry+https://github.com/rust-lang/crates.io-index" | 1393 | source = "registry+https://github.com/rust-lang/crates.io-index" |
911 | checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" | 1394 | checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" |
912 | dependencies = [ | 1395 | dependencies = [ |
913 | "proc-macro2", | 1396 | "proc-macro2", |
914 | "quote", | 1397 | "quote", |
@@ -988,9 +1471,9 @@ dependencies = [ | |||
988 | 1471 | ||
989 | [[package]] | 1472 | [[package]] |
990 | name = "toml_edit" | 1473 | name = "toml_edit" |
991 | version = "0.22.20" | 1474 | version = "0.22.22" |
992 | source = "registry+https://github.com/rust-lang/crates.io-index" | 1475 | source = "registry+https://github.com/rust-lang/crates.io-index" |
993 | checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" | 1476 | checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" |
994 | dependencies = [ | 1477 | dependencies = [ |
995 | "indexmap", | 1478 | "indexmap", |
996 | "serde", | 1479 | "serde", |
@@ -1044,16 +1527,6 @@ dependencies = [ | |||
1044 | ] | 1527 | ] |
1045 | 1528 | ||
1046 | [[package]] | 1529 | [[package]] |
1047 | name = "tracing-error" | ||
1048 | version = "0.2.0" | ||
1049 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1050 | checksum = "d686ec1c0f384b1277f097b2f279a2ecc11afe8c133c1aabf036a27cb4cd206e" | ||
1051 | dependencies = [ | ||
1052 | "tracing", | ||
1053 | "tracing-subscriber", | ||
1054 | ] | ||
1055 | |||
1056 | [[package]] | ||
1057 | name = "tracing-log" | 1530 | name = "tracing-log" |
1058 | version = "0.2.0" | 1531 | version = "0.2.0" |
1059 | source = "registry+https://github.com/rust-lang/crates.io-index" | 1532 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -1095,16 +1568,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
1095 | checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" | 1568 | checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" |
1096 | 1569 | ||
1097 | [[package]] | 1570 | [[package]] |
1571 | name = "uds_windows" | ||
1572 | version = "1.1.0" | ||
1573 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1574 | checksum = "89daebc3e6fd160ac4aa9fc8b3bf71e1f74fbf92367ae71fb83a037e8bf164b9" | ||
1575 | dependencies = [ | ||
1576 | "memoffset", | ||
1577 | "tempfile", | ||
1578 | "winapi", | ||
1579 | ] | ||
1580 | |||
1581 | [[package]] | ||
1098 | name = "unicode-ident" | 1582 | name = "unicode-ident" |
1099 | version = "1.0.12" | 1583 | version = "1.0.13" |
1100 | source = "registry+https://github.com/rust-lang/crates.io-index" | 1584 | source = "registry+https://github.com/rust-lang/crates.io-index" |
1101 | checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" | 1585 | checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" |
1102 | 1586 | ||
1103 | [[package]] | 1587 | [[package]] |
1104 | name = "unicode-segmentation" | 1588 | name = "unicode-segmentation" |
1105 | version = "1.11.0" | 1589 | version = "1.12.0" |
1106 | source = "registry+https://github.com/rust-lang/crates.io-index" | 1590 | source = "registry+https://github.com/rust-lang/crates.io-index" |
1107 | checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" | 1591 | checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" |
1108 | 1592 | ||
1109 | [[package]] | 1593 | [[package]] |
1110 | name = "utf8parse" | 1594 | name = "utf8parse" |
@@ -1162,6 +1646,59 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
1162 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" | 1646 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" |
1163 | 1647 | ||
1164 | [[package]] | 1648 | [[package]] |
1649 | name = "windows" | ||
1650 | version = "0.56.0" | ||
1651 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1652 | checksum = "1de69df01bdf1ead2f4ac895dc77c9351aefff65b2f3db429a343f9cbf05e132" | ||
1653 | dependencies = [ | ||
1654 | "windows-core", | ||
1655 | "windows-targets 0.52.6", | ||
1656 | ] | ||
1657 | |||
1658 | [[package]] | ||
1659 | name = "windows-core" | ||
1660 | version = "0.56.0" | ||
1661 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1662 | checksum = "4698e52ed2d08f8658ab0c39512a7c00ee5fe2688c65f8c0a4f06750d729f2a6" | ||
1663 | dependencies = [ | ||
1664 | "windows-implement", | ||
1665 | "windows-interface", | ||
1666 | "windows-result", | ||
1667 | "windows-targets 0.52.6", | ||
1668 | ] | ||
1669 | |||
1670 | [[package]] | ||
1671 | name = "windows-implement" | ||
1672 | version = "0.56.0" | ||
1673 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1674 | checksum = "f6fc35f58ecd95a9b71c4f2329b911016e6bec66b3f2e6a4aad86bd2e99e2f9b" | ||
1675 | dependencies = [ | ||
1676 | "proc-macro2", | ||
1677 | "quote", | ||
1678 | "syn", | ||
1679 | ] | ||
1680 | |||
1681 | [[package]] | ||
1682 | name = "windows-interface" | ||
1683 | version = "0.56.0" | ||
1684 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1685 | checksum = "08990546bf4edef8f431fa6326e032865f27138718c587dc21bc0265bbcb57cc" | ||
1686 | dependencies = [ | ||
1687 | "proc-macro2", | ||
1688 | "quote", | ||
1689 | "syn", | ||
1690 | ] | ||
1691 | |||
1692 | [[package]] | ||
1693 | name = "windows-result" | ||
1694 | version = "0.1.2" | ||
1695 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1696 | checksum = "5e383302e8ec8515204254685643de10811af0ed97ea37210dc26fb0032647f8" | ||
1697 | dependencies = [ | ||
1698 | "windows-targets 0.52.6", | ||
1699 | ] | ||
1700 | |||
1701 | [[package]] | ||
1165 | name = "windows-sys" | 1702 | name = "windows-sys" |
1166 | version = "0.48.0" | 1703 | version = "0.48.0" |
1167 | source = "registry+https://github.com/rust-lang/crates.io-index" | 1704 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -1180,6 +1717,15 @@ dependencies = [ | |||
1180 | ] | 1717 | ] |
1181 | 1718 | ||
1182 | [[package]] | 1719 | [[package]] |
1720 | name = "windows-sys" | ||
1721 | version = "0.59.0" | ||
1722 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1723 | checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" | ||
1724 | dependencies = [ | ||
1725 | "windows-targets 0.52.6", | ||
1726 | ] | ||
1727 | |||
1728 | [[package]] | ||
1183 | name = "windows-targets" | 1729 | name = "windows-targets" |
1184 | version = "0.48.5" | 1730 | version = "0.48.5" |
1185 | source = "registry+https://github.com/rust-lang/crates.io-index" | 1731 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -1211,6 +1757,15 @@ dependencies = [ | |||
1211 | ] | 1757 | ] |
1212 | 1758 | ||
1213 | [[package]] | 1759 | [[package]] |
1760 | name = "windows-version" | ||
1761 | version = "0.1.1" | ||
1762 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1763 | checksum = "6998aa457c9ba8ff2fb9f13e9d2a930dabcea28f1d0ab94d687d8b3654844515" | ||
1764 | dependencies = [ | ||
1765 | "windows-targets 0.52.6", | ||
1766 | ] | ||
1767 | |||
1768 | [[package]] | ||
1214 | name = "windows_aarch64_gnullvm" | 1769 | name = "windows_aarch64_gnullvm" |
1215 | version = "0.48.5" | 1770 | version = "0.48.5" |
1216 | source = "registry+https://github.com/rust-lang/crates.io-index" | 1771 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -1302,9 +1857,148 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" | |||
1302 | 1857 | ||
1303 | [[package]] | 1858 | [[package]] |
1304 | name = "winnow" | 1859 | name = "winnow" |
1305 | version = "0.6.18" | 1860 | version = "0.6.19" |
1306 | source = "registry+https://github.com/rust-lang/crates.io-index" | 1861 | source = "registry+https://github.com/rust-lang/crates.io-index" |
1307 | checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" | 1862 | checksum = "c52ac009d615e79296318c1bcce2d422aaca15ad08515e344feeda07df67a587" |
1308 | dependencies = [ | 1863 | dependencies = [ |
1309 | "memchr", | 1864 | "memchr", |
1310 | ] | 1865 | ] |
1866 | |||
1867 | [[package]] | ||
1868 | name = "xdg-home" | ||
1869 | version = "1.3.0" | ||
1870 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1871 | checksum = "ec1cdab258fb55c0da61328dc52c8764709b249011b2cad0454c72f0bf10a1f6" | ||
1872 | dependencies = [ | ||
1873 | "libc", | ||
1874 | "windows-sys 0.59.0", | ||
1875 | ] | ||
1876 | |||
1877 | [[package]] | ||
1878 | name = "yaml-rust" | ||
1879 | version = "0.4.5" | ||
1880 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1881 | checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" | ||
1882 | dependencies = [ | ||
1883 | "linked-hash-map", | ||
1884 | ] | ||
1885 | |||
1886 | [[package]] | ||
1887 | name = "zbus" | ||
1888 | version = "4.4.0" | ||
1889 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1890 | checksum = "bb97012beadd29e654708a0fdb4c84bc046f537aecfde2c3ee0a9e4b4d48c725" | ||
1891 | dependencies = [ | ||
1892 | "async-broadcast", | ||
1893 | "async-executor", | ||
1894 | "async-fs", | ||
1895 | "async-io", | ||
1896 | "async-lock", | ||
1897 | "async-process", | ||
1898 | "async-recursion", | ||
1899 | "async-task", | ||
1900 | "async-trait", | ||
1901 | "blocking", | ||
1902 | "enumflags2", | ||
1903 | "event-listener", | ||
1904 | "futures-core", | ||
1905 | "futures-sink", | ||
1906 | "futures-util", | ||
1907 | "hex", | ||
1908 | "nix", | ||
1909 | "ordered-stream", | ||
1910 | "rand", | ||
1911 | "serde", | ||
1912 | "serde_repr", | ||
1913 | "sha1", | ||
1914 | "static_assertions", | ||
1915 | "tracing", | ||
1916 | "uds_windows", | ||
1917 | "windows-sys 0.52.0", | ||
1918 | "xdg-home", | ||
1919 | "zbus_macros", | ||
1920 | "zbus_names", | ||
1921 | "zvariant", | ||
1922 | ] | ||
1923 | |||
1924 | [[package]] | ||
1925 | name = "zbus_macros" | ||
1926 | version = "4.4.0" | ||
1927 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1928 | checksum = "267db9407081e90bbfa46d841d3cbc60f59c0351838c4bc65199ecd79ab1983e" | ||
1929 | dependencies = [ | ||
1930 | "proc-macro-crate", | ||
1931 | "proc-macro2", | ||
1932 | "quote", | ||
1933 | "syn", | ||
1934 | "zvariant_utils", | ||
1935 | ] | ||
1936 | |||
1937 | [[package]] | ||
1938 | name = "zbus_names" | ||
1939 | version = "3.0.0" | ||
1940 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1941 | checksum = "4b9b1fef7d021261cc16cba64c351d291b715febe0fa10dc3a443ac5a5022e6c" | ||
1942 | dependencies = [ | ||
1943 | "serde", | ||
1944 | "static_assertions", | ||
1945 | "zvariant", | ||
1946 | ] | ||
1947 | |||
1948 | [[package]] | ||
1949 | name = "zerocopy" | ||
1950 | version = "0.7.35" | ||
1951 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1952 | checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" | ||
1953 | dependencies = [ | ||
1954 | "byteorder", | ||
1955 | "zerocopy-derive", | ||
1956 | ] | ||
1957 | |||
1958 | [[package]] | ||
1959 | name = "zerocopy-derive" | ||
1960 | version = "0.7.35" | ||
1961 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1962 | checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" | ||
1963 | dependencies = [ | ||
1964 | "proc-macro2", | ||
1965 | "quote", | ||
1966 | "syn", | ||
1967 | ] | ||
1968 | |||
1969 | [[package]] | ||
1970 | name = "zvariant" | ||
1971 | version = "4.2.0" | ||
1972 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1973 | checksum = "2084290ab9a1c471c38fc524945837734fbf124487e105daec2bb57fd48c81fe" | ||
1974 | dependencies = [ | ||
1975 | "endi", | ||
1976 | "enumflags2", | ||
1977 | "serde", | ||
1978 | "static_assertions", | ||
1979 | "zvariant_derive", | ||
1980 | ] | ||
1981 | |||
1982 | [[package]] | ||
1983 | name = "zvariant_derive" | ||
1984 | version = "4.2.0" | ||
1985 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1986 | checksum = "73e2ba546bda683a90652bac4a279bc146adad1386f25379cf73200d2002c449" | ||
1987 | dependencies = [ | ||
1988 | "proc-macro-crate", | ||
1989 | "proc-macro2", | ||
1990 | "quote", | ||
1991 | "syn", | ||
1992 | "zvariant_utils", | ||
1993 | ] | ||
1994 | |||
1995 | [[package]] | ||
1996 | name = "zvariant_utils" | ||
1997 | version = "2.1.0" | ||
1998 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1999 | checksum = "c51bcff7cc3dbb5055396bcf774748c3dab426b4b8659046963523cee4808340" | ||
2000 | dependencies = [ | ||
2001 | "proc-macro2", | ||
2002 | "quote", | ||
2003 | "syn", | ||
2004 | ] | ||
@@ -3,33 +3,21 @@ name = "arbs" | |||
3 | edition = "2021" | 3 | edition = "2021" |
4 | version = "0.1.0" | 4 | version = "0.1.0" |
5 | 5 | ||
6 | [features] | ||
7 | default = ["notifications"] | ||
8 | notifications = ["dep:notify-rust"] | ||
9 | |||
6 | [dependencies] | 10 | [dependencies] |
7 | color-eyre = "0.6.3" | ||
8 | dirs = "5.0.1" | 11 | dirs = "5.0.1" |
9 | gethostname = "0.5.0" | 12 | gethostname = "0.5.0" |
10 | serde_json = "1.0.128" | 13 | notify-rust = { version = "4.11.3", optional = true} |
14 | serde_json = { default-features = false, version = "1.0.128" } | ||
11 | thiserror = "1.0.63" | 15 | thiserror = "1.0.63" |
12 | toml = "0.8.19" | 16 | toml = { default-features = false, version = "0.8.19" } |
13 | tracing = "0.1.40" | 17 | tracing = { default-features = false, version = "0.1.40" } |
14 | tracing-appender = "0.2.3" | 18 | tracing-appender = "0.2.3" |
15 | 19 | clap = { version = "4.5.17", features = ["derive"] } | |
16 | [dependencies.clap] | 20 | config = { version = "0.14.0" } |
17 | version = "4.5.17" | 21 | serde = { version = "1.0.209", features = ["derive"] } |
18 | features = ["derive"] | 22 | tracing-subscriber = { version = "0.3.18", features = ["env-filter"] } |
19 | 23 | uuid = { version = "1.10.0", features = ["v4"] } | |
20 | [dependencies.config] | ||
21 | version = "0.14.0" | ||
22 | features = ["ini", "toml", "json5", "ron", "json", "convert-case", "async"] | ||
23 | default-features = false | ||
24 | |||
25 | [dependencies.serde] | ||
26 | version = "1.0.209" | ||
27 | features = ["derive"] | ||
28 | |||
29 | [dependencies.tracing-subscriber] | ||
30 | version = "0.3.18" | ||
31 | features = ["env-filter"] | ||
32 | |||
33 | [dependencies.uuid] | ||
34 | version = "1.10.0" | ||
35 | features = ["v4"] | ||
diff --git a/assets/icon.png b/assets/icon.png new file mode 100644 index 0000000..ae95463 --- /dev/null +++ b/assets/icon.png | |||
Binary files differ | |||
diff --git a/src/backup.rs b/src/backup.rs index 3d07ace..b468917 100644 --- a/src/backup.rs +++ b/src/backup.rs | |||
@@ -2,18 +2,18 @@ use std::{ | |||
2 | fs::{create_dir_all, File}, | 2 | fs::{create_dir_all, File}, |
3 | io::{Read, Write}, | 3 | io::{Read, Write}, |
4 | path::PathBuf, | 4 | path::PathBuf, |
5 | time::{SystemTime, UNIX_EPOCH}, | 5 | time::SystemTime, |
6 | }; | 6 | }; |
7 | 7 | ||
8 | use serde::{Deserialize, Serialize}; | 8 | use serde::{Deserialize, Serialize}; |
9 | use tracing::info; | 9 | use tracing::{debug, info}; |
10 | use uuid::Uuid; | 10 | use uuid::Uuid; |
11 | 11 | ||
12 | use crate::{ | 12 | use crate::{ |
13 | config::Config, | 13 | config::Config, |
14 | error::{Error, Result}, | 14 | error::{Error, Result}, |
15 | packages::{Manager, PackageList}, | 15 | packages::PackageList, |
16 | pathinfo::PathInfo, | 16 | pathinfo::PathInfo, send_notification, |
17 | }; | 17 | }; |
18 | 18 | ||
19 | pub type Id = String; | 19 | pub type Id = String; |
@@ -28,16 +28,20 @@ pub struct Backup { | |||
28 | } | 28 | } |
29 | 29 | ||
30 | impl Backup { | 30 | impl Backup { |
31 | pub fn create(config: &Config, manager: Option<Manager>) -> Result<Self> { | 31 | pub fn create(config: &Config) -> Result<Self> { |
32 | let mut files: Vec<PathInfo> = Vec::new(); | 32 | let mut files: Vec<PathInfo> = Vec::new(); |
33 | for dir in &config.directories { | 33 | for dir in &config.directories { |
34 | files.push(PathInfo::from_path(config, dir)?); | 34 | files.push(PathInfo::from_path(config, dir)?); |
35 | } | 35 | } |
36 | Ok(Self { | 36 | Ok(Self { |
37 | // TODO: UUID not really needed, maybe a shorter hash | ||
38 | id: Uuid::new_v4().to_string(), | 37 | id: Uuid::new_v4().to_string(), |
39 | timestamp: Self::get_timestamp(), | 38 | timestamp: SystemTime::now() |
40 | packages: Manager::get_manager(manager)?.get_installed()?, | 39 | .duration_since(SystemTime::UNIX_EPOCH)? |
40 | .as_secs(), | ||
41 | packages: config | ||
42 | .package_manager | ||
43 | .to_package_manager() | ||
44 | .get_installed()?, | ||
41 | files, | 45 | files, |
42 | device: config.device.clone(), | 46 | device: config.device.clone(), |
43 | }) | 47 | }) |
@@ -58,12 +62,14 @@ impl Backup { | |||
58 | path.save(&backup_root)?; | 62 | path.save(&backup_root)?; |
59 | } | 63 | } |
60 | 64 | ||
65 | send_notification("Backup created" , "", notify_rust::Urgency::Normal)?; | ||
66 | |||
61 | Ok(()) | 67 | Ok(()) |
62 | } | 68 | } |
63 | 69 | ||
64 | pub fn get_last(config: &Config) -> Result<Option<Self>> { | 70 | pub fn get_last(config: &Config) -> Result<Option<Self>> { |
65 | let backup_index_root = format!("{}/index.json", config.root); | 71 | let backup_index_root = format!("{}/index.json", config.root); |
66 | info!(?backup_index_root, "backup index location:"); | 72 | debug!(?backup_index_root, "backup index location:"); |
67 | let list: Vec<IndexEntry> = match Self::get_json_content(&backup_index_root) { | 73 | let list: Vec<IndexEntry> = match Self::get_json_content(&backup_index_root) { |
68 | Ok(list) => list, | 74 | Ok(list) => list, |
69 | Err(err) => { | 75 | Err(err) => { |
@@ -74,8 +80,6 @@ impl Backup { | |||
74 | } | 80 | } |
75 | }; | 81 | }; |
76 | 82 | ||
77 | info!(?list, "backup index:"); | ||
78 | |||
79 | Ok(Some(Self::from_index( | 83 | Ok(Some(Self::from_index( |
80 | config, | 84 | config, |
81 | &list.last().ok_or(Error::BackupNotFound)?.id, | 85 | &list.last().ok_or(Error::BackupNotFound)?.id, |
@@ -122,6 +126,8 @@ impl Backup { | |||
122 | path.restore(config, &backup_root)?; | 126 | path.restore(config, &backup_root)?; |
123 | } | 127 | } |
124 | 128 | ||
129 | send_notification("Backup restored" , "", notify_rust::Urgency::Normal)?; | ||
130 | |||
125 | Ok(()) | 131 | Ok(()) |
126 | } | 132 | } |
127 | 133 | ||
@@ -131,13 +137,6 @@ impl Backup { | |||
131 | file.read_to_string(&mut content)?; | 137 | file.read_to_string(&mut content)?; |
132 | Ok(serde_json::from_str(&content)?) | 138 | Ok(serde_json::from_str(&content)?) |
133 | } | 139 | } |
134 | |||
135 | fn get_timestamp() -> u64 { | ||
136 | SystemTime::now() | ||
137 | .duration_since(UNIX_EPOCH) | ||
138 | .unwrap() | ||
139 | .as_secs() | ||
140 | } | ||
141 | } | 140 | } |
142 | 141 | ||
143 | #[derive(Debug, Clone, Serialize, Deserialize)] | 142 | #[derive(Debug, Clone, Serialize, Deserialize)] |
@@ -165,7 +164,7 @@ impl IndexEntry { | |||
165 | 164 | ||
166 | f.write_all(&serde_json::to_vec(&loc)?)?; | 165 | f.write_all(&serde_json::to_vec(&loc)?)?; |
167 | } else { | 166 | } else { |
168 | create_dir_all(&config.root).unwrap(); | 167 | create_dir_all(&config.root)?; |
169 | let mut f = File::create(backup_index_root)?; | 168 | let mut f = File::create(backup_index_root)?; |
170 | f.write_all(&serde_json::to_vec(&vec![self])?)?; | 169 | f.write_all(&serde_json::to_vec(&vec![self])?)?; |
171 | }; | 170 | }; |
@@ -2,8 +2,6 @@ use std::path::PathBuf; | |||
2 | 2 | ||
3 | use clap::{Parser, Subcommand}; | 3 | use clap::{Parser, Subcommand}; |
4 | 4 | ||
5 | use crate::packages::Manager; | ||
6 | |||
7 | #[derive(Parser)] | 5 | #[derive(Parser)] |
8 | pub struct Cli { | 6 | pub struct Cli { |
9 | #[arg(short, long)] | 7 | #[arg(short, long)] |
@@ -16,10 +14,7 @@ pub struct Cli { | |||
16 | #[derive(Subcommand)] | 14 | #[derive(Subcommand)] |
17 | pub enum Subcommands { | 15 | pub enum Subcommands { |
18 | GenerateConfig, | 16 | GenerateConfig, |
19 | Save { | 17 | Save, |
20 | #[arg(short, long)] | ||
21 | package_manager: Option<Manager>, | ||
22 | }, | ||
23 | Restore { | 18 | Restore { |
24 | #[arg(short, long)] | 19 | #[arg(short, long)] |
25 | package_install: bool | 20 | package_install: bool |
diff --git a/src/config.rs b/src/config.rs index 46d2204..848be19 100644 --- a/src/config.rs +++ b/src/config.rs | |||
@@ -4,6 +4,8 @@ use config::{File, Map}; | |||
4 | use serde::{Deserialize, Serialize}; | 4 | use serde::{Deserialize, Serialize}; |
5 | use tracing::{debug, trace}; | 5 | use tracing::{debug, trace}; |
6 | 6 | ||
7 | use crate::{error::{Error, Result}, packages::Manager}; | ||
8 | |||
7 | #[derive(Debug, Serialize, Deserialize)] | 9 | #[derive(Debug, Serialize, Deserialize)] |
8 | #[serde(default)] | 10 | #[serde(default)] |
9 | pub struct Config { | 11 | pub struct Config { |
@@ -11,6 +13,7 @@ pub struct Config { | |||
11 | pub directories: Vec<String>, | 13 | pub directories: Vec<String>, |
12 | pub custom_directories: Map<String, String>, | 14 | pub custom_directories: Map<String, String>, |
13 | pub device: String, | 15 | pub device: String, |
16 | pub package_manager: Manager, | ||
14 | } | 17 | } |
15 | 18 | ||
16 | impl Default for Config { | 19 | impl Default for Config { |
@@ -22,17 +25,18 @@ impl Default for Config { | |||
22 | device: gethostname::gethostname() | 25 | device: gethostname::gethostname() |
23 | .into_string() | 26 | .into_string() |
24 | .expect("invalid hostname string"), | 27 | .expect("invalid hostname string"), |
28 | package_manager: Manager::from_sys().expect("couldn't get package manager"), | ||
25 | } | 29 | } |
26 | } | 30 | } |
27 | } | 31 | } |
28 | 32 | ||
29 | impl Config { | 33 | impl Config { |
30 | pub fn load(path: Option<PathBuf>) -> core::result::Result<Self, config::ConfigError> { | 34 | pub fn load(path: Option<PathBuf>) -> Result<Self> { |
31 | debug!("load config"); | 35 | debug!("load config"); |
32 | let source = if let Some(source) = path { | 36 | let source = if let Some(source) = path { |
33 | source | 37 | source |
34 | } else { | 38 | } else { |
35 | Self::get_location() | 39 | Self::get_location()? |
36 | }; | 40 | }; |
37 | 41 | ||
38 | let config = config::Config::builder() | 42 | let config = config::Config::builder() |
@@ -40,14 +44,14 @@ impl Config { | |||
40 | .add_source(config::Environment::with_prefix("FXBAUP").separator("_")) | 44 | .add_source(config::Environment::with_prefix("FXBAUP").separator("_")) |
41 | .build()?; | 45 | .build()?; |
42 | 46 | ||
43 | let cfg = config.try_deserialize(); | 47 | let cfg = config.try_deserialize()?; |
44 | trace!(?cfg, "loaded config"); | 48 | trace!(?cfg, "loaded config"); |
45 | 49 | ||
46 | cfg | 50 | Ok(cfg) |
47 | } | 51 | } |
48 | 52 | ||
49 | pub fn generate() -> crate::error::Result<()> { | 53 | pub fn generate() -> Result<()> { |
50 | let loc = Self::get_location(); | 54 | let loc = Self::get_location()?; |
51 | create_dir_all(loc.parent().unwrap())?; | 55 | create_dir_all(loc.parent().unwrap())?; |
52 | let mut f = std::fs::File::create(loc)?; | 56 | let mut f = std::fs::File::create(loc)?; |
53 | f.write_all(toml::to_string(&Self::default())?.as_bytes())?; | 57 | f.write_all(toml::to_string(&Self::default())?.as_bytes())?; |
@@ -55,10 +59,12 @@ impl Config { | |||
55 | Ok(()) | 59 | Ok(()) |
56 | } | 60 | } |
57 | 61 | ||
58 | fn get_location() -> PathBuf { | 62 | fn get_location() -> Result<PathBuf> { |
59 | let mut conf_dir = dirs::config_local_dir().unwrap(); | 63 | let Some(mut config_dir) = dirs::config_dir() else { |
60 | conf_dir.push("arbs"); | 64 | return Err(Error::NoSysDir); |
61 | conf_dir.push("config.toml"); | 65 | }; |
62 | conf_dir | 66 | config_dir.push(env!("CARGO_PKG_NAME")); |
67 | config_dir.push("config.toml"); | ||
68 | Ok(config_dir) | ||
63 | } | 69 | } |
64 | } | 70 | } |
diff --git a/src/error.rs b/src/error.rs index cb57e99..8270b45 100644 --- a/src/error.rs +++ b/src/error.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | use tracing::error; | ||
2 | |||
1 | pub type Result<T> = std::result::Result<T, Error>; | 3 | pub type Result<T> = std::result::Result<T, Error>; |
2 | 4 | ||
3 | #[derive(Debug, thiserror::Error)] | 5 | #[derive(Debug, thiserror::Error)] |
@@ -17,6 +19,10 @@ pub enum Error { | |||
17 | #[error("Requested backup not found")] | 19 | #[error("Requested backup not found")] |
18 | BackupNotFound, | 20 | BackupNotFound, |
19 | 21 | ||
22 | // Utils | ||
23 | #[error("System directory not found")] | ||
24 | NoSysDir, | ||
25 | |||
20 | // Packages | 26 | // Packages |
21 | #[error("Unknown Package Manger Output")] | 27 | #[error("Unknown Package Manger Output")] |
22 | UnknownOutput, | 28 | UnknownOutput, |
@@ -26,11 +32,22 @@ pub enum Error { | |||
26 | 32 | ||
27 | // Deps | 33 | // Deps |
28 | #[error(transparent)] | 34 | #[error(transparent)] |
35 | Config(#[from] config::ConfigError), | ||
36 | |||
37 | #[error(transparent)] | ||
29 | SerdeJson(#[from] serde_json::Error), | 38 | SerdeJson(#[from] serde_json::Error), |
30 | 39 | ||
31 | #[error(transparent)] | 40 | #[error(transparent)] |
32 | TomlSerialize(#[from] toml::ser::Error), | 41 | TomlSerialize(#[from] toml::ser::Error), |
33 | 42 | ||
43 | #[cfg(feature = "notifications")] | ||
44 | #[error(transparent)] | ||
45 | Notify(#[from] notify_rust::error::Error), | ||
46 | |||
47 | // Rust | ||
34 | #[error(transparent)] | 48 | #[error(transparent)] |
35 | Io(#[from] std::io::Error), | 49 | Io(#[from] std::io::Error), |
50 | |||
51 | #[error(transparent)] | ||
52 | SystemTime(#[from] std::time::SystemTimeError), | ||
36 | } | 53 | } |
diff --git a/src/main.rs b/src/main.rs index 487d095..ab23ab7 100644 --- a/src/main.rs +++ b/src/main.rs | |||
@@ -2,8 +2,9 @@ use backup::Backup; | |||
2 | use clap::Parser; | 2 | use clap::Parser; |
3 | use cli::Subcommands; | 3 | use cli::Subcommands; |
4 | use config::Config; | 4 | use config::Config; |
5 | use error::Error; | 5 | use error::{Error, Result}; |
6 | use tracing::{debug, level_filters::LevelFilter}; | 6 | use notify_rust::Urgency; |
7 | use tracing::{debug, error, level_filters::LevelFilter}; | ||
7 | use tracing_subscriber::{fmt, layer::SubscriberExt, util::SubscriberInitExt, EnvFilter}; | 8 | use tracing_subscriber::{fmt, layer::SubscriberExt, util::SubscriberInitExt, EnvFilter}; |
8 | 9 | ||
9 | mod backup; | 10 | mod backup; |
@@ -13,9 +14,7 @@ mod error; | |||
13 | mod packages; | 14 | mod packages; |
14 | mod pathinfo; | 15 | mod pathinfo; |
15 | 16 | ||
16 | fn main() -> color_eyre::Result<()> { | 17 | fn main() -> Result<()> { |
17 | color_eyre::install()?; | ||
18 | |||
19 | let file_appender = tracing_appender::rolling::never("./", "arbs.log"); | 18 | let file_appender = tracing_appender::rolling::never("./", "arbs.log"); |
20 | let (non_blocking, _guard) = tracing_appender::non_blocking(file_appender); | 19 | let (non_blocking, _guard) = tracing_appender::non_blocking(file_appender); |
21 | 20 | ||
@@ -35,15 +34,27 @@ fn main() -> color_eyre::Result<()> { | |||
35 | ) | 34 | ) |
36 | .init(); | 35 | .init(); |
37 | debug!("logging initialized"); | 36 | debug!("logging initialized"); |
37 | |||
38 | match run_cli() { | ||
39 | Ok(()) => { println!("OK") ; Ok(())}, | ||
40 | Err(err) => { | ||
41 | error!(?err); | ||
42 | error!("{:?}", std::error::Error::source(&err)); | ||
43 | send_notification("Backup Error", &err.to_string(), Urgency::Critical)?; | ||
44 | Err(err) | ||
45 | } | ||
46 | } | ||
47 | } | ||
38 | 48 | ||
49 | fn run_cli() -> Result<()> { | ||
39 | let cli = cli::Cli::parse(); | 50 | let cli = cli::Cli::parse(); |
40 | 51 | ||
41 | let config = Config::load(cli.config)?; | 52 | let config = Config::load(cli.config)?; |
42 | 53 | ||
43 | match cli.subcommand { | 54 | match cli.subcommand { |
44 | Subcommands::GenerateConfig => Config::generate()?, | 55 | Subcommands::GenerateConfig => Config::generate()?, |
45 | Subcommands::Save { package_manager } => { | 56 | Subcommands::Save => { |
46 | let backup = Backup::create(&config, package_manager)?; | 57 | let backup = Backup::create(&config)?; |
47 | backup.save(&config)?; | 58 | backup.save(&config)?; |
48 | } | 59 | } |
49 | Subcommands::Restore { package_install } => { | 60 | Subcommands::Restore { package_install } => { |
@@ -56,7 +67,27 @@ fn main() -> color_eyre::Result<()> { | |||
56 | } | 67 | } |
57 | 68 | ||
58 | last_backup.restore(&config)?; | 69 | last_backup.restore(&config)?; |
59 | } | 70 | }, |
60 | }; | 71 | }; |
61 | Ok(()) | 72 | Ok(()) |
62 | } | 73 | } |
74 | |||
75 | fn send_notification(summary: &str, body: &str, urgency: Urgency) -> Result<()> { | ||
76 | #[cfg(feature = "notifications")] | ||
77 | { | ||
78 | let Some(mut icon) = dirs::data_dir() else { | ||
79 | return Err(Error::NoSysDir); | ||
80 | }; | ||
81 | icon.push(env!("CARGO_PKG_NAME")); | ||
82 | icon.push("icon.png"); | ||
83 | |||
84 | notify_rust::Notification::new() | ||
85 | .summary(summary) | ||
86 | .body(body) | ||
87 | .icon(&icon.to_string_lossy()) | ||
88 | .timeout(0) | ||
89 | .urgency(urgency) | ||
90 | .show()?; | ||
91 | } | ||
92 | Ok(()) | ||
93 | } | ||
diff --git a/src/packages.rs b/src/packages.rs index de818f4..41b9478 100644 --- a/src/packages.rs +++ b/src/packages.rs | |||
@@ -37,15 +37,12 @@ pub enum Manager { | |||
37 | } | 37 | } |
38 | 38 | ||
39 | impl Manager { | 39 | impl Manager { |
40 | pub fn get_manager(manager: Option<Manager>) -> Result<Box<dyn PackageManager>> { | 40 | pub fn from_sys() -> Result<Self> { |
41 | #[cfg(not(target_os = "linux"))] | 41 | #[cfg(not(target_os = "linux"))] |
42 | return Err(Error::Unsupported); | 42 | return Err(Error::Unsupported); |
43 | 43 | ||
44 | #[cfg(target_os = "linux")] | 44 | #[cfg(target_os = "linux")] |
45 | { | 45 | { |
46 | if let Some(man) = manager { | ||
47 | return Ok(man.to_package_manager()); | ||
48 | } | ||
49 | let mut os_release = File::open("/etc/os-release")?; | 46 | let mut os_release = File::open("/etc/os-release")?; |
50 | let mut content = String::new(); | 47 | let mut content = String::new(); |
51 | os_release.read_to_string(&mut content)?; | 48 | os_release.read_to_string(&mut content)?; |
@@ -63,15 +60,15 @@ impl Manager { | |||
63 | } | 60 | } |
64 | } | 61 | } |
65 | 62 | ||
66 | fn from_str(value: &str) -> Result<Box<dyn PackageManager>> { | 63 | fn from_str(value: &str) -> Result<Self> { |
67 | Ok(match value { | 64 | Ok(match value { |
68 | "arch" => Box::new(Pacman), | 65 | "arch" => Self::Pacman, |
69 | "gentoo" => Box::new(Portage), | 66 | "gentoo" => Self::Portage, |
70 | _ => return Err(Error::Unsupported), | 67 | _ => return Err(Error::Unsupported), |
71 | }) | 68 | }) |
72 | } | 69 | } |
73 | 70 | ||
74 | fn to_package_manager(&self) -> Box<dyn PackageManager> { | 71 | pub fn to_package_manager(&self) -> Box<dyn PackageManager> { |
75 | match self { | 72 | match self { |
76 | Self::Pacman => Box::new(Pacman), | 73 | Self::Pacman => Box::new(Pacman), |
77 | Self::Portage => Box::new(Portage), | 74 | Self::Portage => Box::new(Portage), |
diff --git a/src/pathinfo.rs b/src/pathinfo.rs index 1231ff8..009f46a 100644 --- a/src/pathinfo.rs +++ b/src/pathinfo.rs | |||
@@ -6,7 +6,7 @@ use std::{ | |||
6 | }; | 6 | }; |
7 | 7 | ||
8 | use serde::{Deserialize, Serialize}; | 8 | use serde::{Deserialize, Serialize}; |
9 | use tracing::{debug, info}; | 9 | use tracing::{debug, info, trace}; |
10 | 10 | ||
11 | use crate::{ | 11 | use crate::{ |
12 | backup::{Backup, Id}, | 12 | backup::{Backup, Id}, |
@@ -35,7 +35,7 @@ impl PathInfo { | |||
35 | rel_location: &str, | 35 | rel_location: &str, |
36 | location_root: &LocationRoot, | 36 | location_root: &LocationRoot, |
37 | ) -> Result<Self> { | 37 | ) -> Result<Self> { |
38 | info!("Handling {rel_location}"); | 38 | trace!("Handling {rel_location}"); |
39 | let path = Self::get_abs_path(&location_root.to_string(), rel_location); | 39 | let path = Self::get_abs_path(&location_root.to_string(), rel_location); |
40 | Ok(if path.is_dir() { | 40 | Ok(if path.is_dir() { |
41 | let mut last_modified = Some(String::new()); | 41 | let mut last_modified = Some(String::new()); |
@@ -83,7 +83,7 @@ impl PathInfo { | |||
83 | ) -> Result<Self> { | 83 | ) -> Result<Self> { |
84 | let last_modified = Self::compare_to_last_modified(config, location_root, rel_location)?; | 84 | let last_modified = Self::compare_to_last_modified(config, location_root, rel_location)?; |
85 | 85 | ||
86 | info!("From file {rel_location} ({last_modified:?})"); | 86 | debug!("From file {rel_location} ({last_modified:?})"); |
87 | 87 | ||
88 | Ok(Self { | 88 | Ok(Self { |
89 | rel_location: rel_location.to_string(), | 89 | rel_location: rel_location.to_string(), |
@@ -301,14 +301,15 @@ mod tests { | |||
301 | .custom_directories | 301 | .custom_directories |
302 | .insert("test".to_string(), "/usr/local/test".to_string()); | 302 | .insert("test".to_string(), "/usr/local/test".to_string()); |
303 | 303 | ||
304 | let mut values_ok: Vec<(&str, LocationRoot)> = Vec::new(); | 304 | let values_ok = vec![ |
305 | values_ok.push(("u:test", LocationRoot::User)); | 305 | ("u:test", LocationRoot::User), |
306 | values_ok.push(("s:", LocationRoot::SystemConfig)); | 306 | ("s:", LocationRoot::SystemConfig), |
307 | values_ok.push(("r:", LocationRoot::Root)); | 307 | ("r:", LocationRoot::Root), |
308 | values_ok.push(( | 308 | ( |
309 | "c:test", | 309 | "c:test", |
310 | LocationRoot::Custom("/usr/local/test".to_string()), | 310 | LocationRoot::Custom("/usr/local/test".to_string()), |
311 | )); | 311 | ), |
312 | ]; | ||
312 | 313 | ||
313 | for value in values_ok { | 314 | for value in values_ok { |
314 | println!("Testing {value:?}"); | 315 | println!("Testing {value:?}"); |
@@ -316,18 +317,19 @@ mod tests { | |||
316 | println!("\x1B[FTesting {value:?} ✓"); | 317 | println!("\x1B[FTesting {value:?} ✓"); |
317 | } | 318 | } |
318 | 319 | ||
319 | let mut values_err: Vec<(&str, String)> = Vec::new(); | 320 | let values_err = vec![ |
320 | values_err.push(( | 321 | ( |
321 | "c:rest", | 322 | "c:rest", |
322 | Error::CustomDirectory("rest".to_string()).to_string(), | 323 | Error::CustomDirectory("rest".to_string()).to_string(), |
323 | )); | 324 | ), |
324 | values_err.push(("t:test/", Error::InvalidIndex("t".to_string()).to_string())); | 325 | ("t:test/", Error::InvalidIndex("t".to_string()).to_string()), |
325 | values_err.push(( | 326 | ( |
326 | "test:test/usr", | 327 | "test:test/usr", |
327 | Error::InvalidIndex("test".to_string()).to_string(), | 328 | Error::InvalidIndex("test".to_string()).to_string(), |
328 | )); | 329 | ), |
329 | values_err.push(("/usr/local/test", Error::NoIndex.to_string())); | 330 | ("/usr/local/test", Error::NoIndex.to_string()), |
330 | values_err.push(("c/usr/local/test", Error::NoIndex.to_string())); | 331 | ("c/usr/local/test", Error::NoIndex.to_string()), |
332 | ]; | ||
331 | 333 | ||
332 | for value in values_err { | 334 | for value in values_err { |
333 | println!("Testing {value:?}"); | 335 | println!("Testing {value:?}"); |
@@ -351,47 +353,47 @@ mod tests { | |||
351 | .custom_directories | 353 | .custom_directories |
352 | .insert("test".to_string(), "/usr/local/test".to_string()); | 354 | .insert("test".to_string(), "/usr/local/test".to_string()); |
353 | 355 | ||
354 | let mut values_ok: Vec<(&str, (String, LocationRoot))> = Vec::new(); | 356 | let values_ok = vec![ |
355 | values_ok.push(( | ||
356 | "~/.config/nvim", | ||
357 | (".config/nvim".to_string(), LocationRoot::User), | ||
358 | )); | ||
359 | values_ok.push(( | ||
360 | "u:test/.config/nvim", | ||
361 | (".config/nvim".to_string(), LocationRoot::User), | ||
362 | )); | ||
363 | values_ok.push(( | ||
364 | "r:/.config/nvim", | ||
365 | (".config/nvim".to_string(), LocationRoot::Root), | ||
366 | )); | ||
367 | values_ok.push(( | ||
368 | "r:/.config/nvim", | ||
369 | (".config/nvim".to_string(), LocationRoot::Root), | ||
370 | )); | ||
371 | values_ok.push(( | ||
372 | "s:/.config/nvim", | ||
373 | (".config/nvim".to_string(), LocationRoot::SystemConfig), | ||
374 | )); | ||
375 | values_ok.push(( | ||
376 | "c:test/.config/nvim", | ||
377 | ( | 357 | ( |
378 | ".config/nvim".to_string(), | 358 | "~/.config/nvim", |
379 | LocationRoot::Custom("/usr/local/test".to_string()), | 359 | (".config/nvim".to_string(), LocationRoot::User), |
360 | ), | ||
361 | ( | ||
362 | "u:test/.config/nvim", | ||
363 | (".config/nvim".to_string(), LocationRoot::User), | ||
380 | ), | 364 | ), |
381 | )); | 365 | ( |
366 | "r:/.config/nvim", | ||
367 | (".config/nvim".to_string(), LocationRoot::Root), | ||
368 | ), | ||
369 | ( | ||
370 | "r:/.config/nvim", | ||
371 | (".config/nvim".to_string(), LocationRoot::Root), | ||
372 | ), | ||
373 | ( | ||
374 | "s:/.config/nvim", | ||
375 | (".config/nvim".to_string(), LocationRoot::SystemConfig), | ||
376 | ), | ||
377 | ( | ||
378 | "c:test/.config/nvim", | ||
379 | ( | ||
380 | ".config/nvim".to_string(), | ||
381 | LocationRoot::Custom("/usr/local/test".to_string()), | ||
382 | ), | ||
383 | ), | ||
384 | ]; | ||
382 | 385 | ||
383 | for value in values_ok { | 386 | for value in values_ok { |
384 | print!("Testing {value:?}"); | 387 | print!("Testing {value:?}"); |
385 | assert_eq!(PathInfo::parse_location(&value.0, &config)?, value.1); | 388 | assert_eq!(PathInfo::parse_location(value.0, &config)?, value.1); |
386 | println!("\x1B[FTesting {value:?} ✓"); | 389 | println!("\x1B[FTesting {value:?} ✓"); |
387 | } | 390 | } |
388 | Ok(()) | 391 | Ok(()) |
389 | } | 392 | } |
390 | 393 | ||
391 | #[test] | 394 | #[test] |
392 | fn compare_to_last_modified() -> color_eyre::Result<()> { | 395 | fn compare_to_last_modified() -> Result<()> { |
393 | let mut config = Config::default(); | 396 | let mut config = Config { root: "./backup-test".to_string(), ..Default::default() }; |
394 | config.root = "./backup-test".to_string(); | ||
395 | config | 397 | config |
396 | .directories | 398 | .directories |
397 | .push("u:fx/code/proj/arbs/backup-test-dir".to_string()); | 399 | .push("u:fx/code/proj/arbs/backup-test-dir".to_string()); |
@@ -404,7 +406,7 @@ mod tests { | |||
404 | let mut f = File::create("./backup-test-dir/nothing.txt")?; | 406 | let mut f = File::create("./backup-test-dir/nothing.txt")?; |
405 | f.write_all("unmodified".as_bytes())?; | 407 | f.write_all("unmodified".as_bytes())?; |
406 | 408 | ||
407 | let backup = Backup::create(&config, None)?; | 409 | let backup = Backup::create(&config)?; |
408 | backup.save(&config)?; | 410 | backup.save(&config)?; |
409 | 411 | ||
410 | let mut f = File::create("./backup-test-dir/size.txt")?; | 412 | let mut f = File::create("./backup-test-dir/size.txt")?; |