From 1b9d963556eeacbcd7ecd5c108636dee38d5b7f9 Mon Sep 17 00:00:00 2001 From: Pavlo Myroniuk Date: Fri, 3 Jan 2025 19:54:32 +0200 Subject: [PATCH 1/6] chore(back): update deps; --- dataans/Cargo.lock | 1110 ++++++++++++++++++++------------- dataans/src-tauri/src/main.rs | 7 +- 2 files changed, 695 insertions(+), 422 deletions(-) diff --git a/dataans/Cargo.lock b/dataans/Cargo.lock index 77e057e..7c8fd60 100644 --- a/dataans/Cargo.lock +++ b/dataans/Cargo.lock @@ -11,12 +11,6 @@ dependencies = [ "gimli", ] -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - [[package]] name = "adler2" version = "2.0.0" @@ -89,15 +83,15 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.91" +version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c042108f3ed77fd83760a5fd79b53be043192bb3b9dba91d8c574c0ada7850c8" +checksum = "34ac096ce696dc2fcabef30516bb13c0a68a11d30131d3df6f04711467681b04" [[package]] name = "arbitrary" -version = "1.3.2" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" +checksum = "dde20b3d026af13f561bdd0f15edf01fc734f0dafcedbaf42bba506a9517f223" [[package]] name = "arboard" @@ -107,7 +101,7 @@ checksum = "df099ccb16cd014ff054ac1bf392c67feeef57164b05c42f037cd40f5d4357f4" dependencies = [ "clipboard-win", "core-graphics 0.23.2", - "image 0.25.4", + "image 0.25.5", "log", "objc2", "objc2-app-kit", @@ -125,7 +119,7 @@ checksum = "0ae92a5119aa49cdbcf6b9f893fe4e1d98b04ccbf82ee0584ad948a44a734dea" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] @@ -142,25 +136,25 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] name = "async-trait" -version = "0.1.83" +version = "0.1.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" +checksum = "1b1244b10dcd56c92219da4e14caa97e312079e185f04ba3eea25061561dc0a0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] name = "atk" -version = "0.18.0" +version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4af014b17dd80e8af9fa689b2d4a211ddba6eb583c1622f35d0cb543f6b17e4" +checksum = "241b621213072e993be4f6f3a9e4b45f65b7e6faad43001be957184b7bb1824b" dependencies = [ "atk-sys", "glib", @@ -169,9 +163,9 @@ dependencies = [ [[package]] name = "atk-sys" -version = "0.18.0" +version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "251e0b7d90e33e0ba930891a505a9a35ece37b2dd37a14f3ffc306c13b980009" +checksum = "c5e48b684b0ca77d2bbadeef17424c2ea3c897d44d566a1617e7e8f30614d086" dependencies = [ "glib-sys", "gobject-sys", @@ -199,7 +193,7 @@ dependencies = [ "manyhow", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] @@ -215,7 +209,7 @@ dependencies = [ "proc-macro2", "quote", "quote-use", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] @@ -225,7 +219,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f012b8cc0c850f34117ec8252a44418f2e34a2cf501de89e29b241ae5f79471" dependencies = [ "dirs 4.0.0", - "thiserror 1.0.65", + "thiserror 1.0.69", "winreg 0.10.1", ] @@ -267,7 +261,7 @@ dependencies = [ "addr2line", "cfg-if", "libc", - "miniz_oxide 0.8.0", + "miniz_oxide", "object", "rustc-demangle", "windows-targets 0.52.6", @@ -344,9 +338,9 @@ dependencies = [ [[package]] name = "bitstream-io" -version = "2.5.3" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b81e1519b0d82120d2fd469d5bfb2919a9361c48b02d82d04befc1cdd2002452" +checksum = "6099cdc01846bc367c4e7dd630dc5966dccf36b652fae7a74e17b640411a91b2" [[package]] name = "bitvec" @@ -415,7 +409,7 @@ dependencies = [ "base64 0.13.1", "bitvec", "hex", - "indexmap 2.6.0", + "indexmap 2.7.0", "js-sys", "once_cell", "rand 0.8.5", @@ -428,12 +422,12 @@ dependencies = [ [[package]] name = "bstr" -version = "1.10.0" +version = "1.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40723b8fb387abc38f4f4a37c09073622e41dd12327033091ef8950659e6dc0c" +checksum = "531a9155a481e2ee699d4f98f43c0ca4ff8ee1bfd55c31e9e98fb29d2b176fe0" dependencies = [ "memchr", - "regex-automata 0.4.8", + "regex-automata 0.4.9", "serde", ] @@ -451,9 +445,9 @@ checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "bytemuck" -version = "1.19.0" +version = "1.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8334215b81e418a0a7bdb8ef0849474f40bb10c8b71f1c4ed315cff49f32494d" +checksum = "ef657dfab802224e671f5818e9a4935f9b1957ed18e58292690cc39e7a4092a3" [[package]] name = "byteorder" @@ -469,9 +463,9 @@ checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" [[package]] name = "bytes" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da" +checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b" dependencies = [ "serde", ] @@ -487,7 +481,7 @@ dependencies = [ "glib", "libc", "once_cell", - "thiserror 1.0.65", + "thiserror 1.0.69", ] [[package]] @@ -512,25 +506,25 @@ dependencies = [ [[package]] name = "cargo-platform" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc" +checksum = "e35af189006b9c0f00a064685c727031e3ed2d8020f7ba284d78cc2671bd36ea" dependencies = [ "serde", ] [[package]] name = "cargo_metadata" -version = "0.18.1" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" +checksum = "8769706aad5d996120af43197bf46ef6ad0fda35216b4505f926a365a232d924" dependencies = [ "camino", "cargo-platform", "semver", "serde", "serde_json", - "thiserror 1.0.65", + "thiserror 2.0.9", ] [[package]] @@ -540,14 +534,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a969e13a7589e9e3e4207e153bae624ade2b5622fb4684a4923b23ec3d57719" dependencies = [ "serde", - "toml 0.8.2", + "toml 0.8.19", ] [[package]] name = "cc" -version = "1.1.31" +version = "1.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2e7962b54006dcfcc61cb72735f4d89bb97061dd6a7ed882ec6b8ee53714c6f" +checksum = "a012a0df96dd6d06ba9a1b29d6402d1a5d77c6befd2566afdc26e10603dc93d7" dependencies = [ "jobserver", "libc", @@ -595,9 +589,9 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "chrono" -version = "0.4.38" +version = "0.4.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" +checksum = "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825" dependencies = [ "android-tzdata", "iana-time-zone", @@ -723,7 +717,7 @@ dependencies = [ "nom", "pathdiff", "serde", - "toml 0.8.2", + "toml 0.8.19", ] [[package]] @@ -744,18 +738,18 @@ checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" [[package]] name = "const_format" -version = "0.2.33" +version = "0.2.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50c655d81ff1114fb0dcdea9225ea9f0cc712a6f8d189378e82bdf62a473a64b" +checksum = "126f97965c8ad46d6d9163268ff28432e8f6a1196a55578867832e3049df63dd" dependencies = [ "const_format_proc_macros", ] [[package]] name = "const_format_proc_macros" -version = "0.2.33" +version = "0.2.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eff1a44b93f47b1bac19a27932f5c591e43d1ba357ee4f61526c8a25603f0eb1" +checksum = "1d57c2eccfb16dbac1f4e61e206105db5820c9d26c3c472bc17c774259ef7744" dependencies = [ "proc-macro2", "quote", @@ -777,6 +771,16 @@ dependencies = [ "unicode-segmentation", ] +[[package]] +name = "cookie" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ddef33a339a91ea89fb53151bd0a4689cfce27055c291dfa69945475d22c747" +dependencies = [ + "time", + "version_check", +] + [[package]] name = "core-foundation" version = "0.9.4" @@ -853,9 +857,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.14" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" +checksum = "16b80225097f2e5ae4e7179dd2266824648f3e2f49d9134d584b76389d31c4c3" dependencies = [ "libc", ] @@ -886,18 +890,18 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.13" +version = "0.5.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" +checksum = "06ba6d68e24814cb8de6bb986db8222d3a027d15872cabc0d18817bc3c0e4471" dependencies = [ "crossbeam-utils", ] [[package]] name = "crossbeam-deque" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" +checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" dependencies = [ "crossbeam-epoch", "crossbeam-utils", @@ -914,18 +918,18 @@ dependencies = [ [[package]] name = "crossbeam-queue" -version = "0.3.11" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df0346b5d5e76ac2fe4e327c5fd1118d6be7c51dfb18f9b7922923f287471e35" +checksum = "0f58bbc28f91df819d0aa2a2c00cd19754769c2fad90579b3592b1c9ba7a3115" dependencies = [ "crossbeam-utils", ] [[package]] name = "crossbeam-utils" -version = "0.8.20" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" [[package]] name = "crunchy" @@ -967,17 +971,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331" dependencies = [ "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] name = "ctor" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edb49164822f3ee45b17acd4a208cfc1251410cf0cad9a833234c9890774dd9f" +checksum = "32a2785755761f3ddc1492979ce1e48d2c00d09311c39e4466429188f3dd6501" dependencies = [ "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] @@ -1001,7 +1005,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] @@ -1012,7 +1016,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] @@ -1035,7 +1039,7 @@ dependencies = [ "arboard", "common", "futures", - "image 0.25.4", + "image 0.25.5", "image 0.3.2", "opener", "serde", @@ -1048,9 +1052,9 @@ dependencies = [ "tauri-plugin-fs", "tauri-plugin-global-shortcut", "tauri-plugin-shell", - "thiserror 2.0.7", + "thiserror 2.0.9", "time", - "toml 0.8.2", + "toml 0.8.19", "tracing", "tracing-subscriber", "uuid", @@ -1119,7 +1123,7 @@ checksum = "62d671cc41a825ebabc75757b62d3d168c577f9149b2d49ece1dad1f72119d25" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] @@ -1132,7 +1136,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] @@ -1194,6 +1198,17 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.94", +] + [[package]] name = "dlopen2" version = "0.7.0" @@ -1214,7 +1229,7 @@ checksum = "f2b99bf03862d7f545ebc28ddd33a665b50865f4dfd84031a393823879bd4c54" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] @@ -1276,14 +1291,14 @@ dependencies = [ [[package]] name = "embed-resource" -version = "2.5.0" +version = "2.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4e24052d7be71f0efb50c201557f6fe7d237cfd5a64fd5bcd7fd8fe32dbbffa" +checksum = "b68b6f9f63a0b6a38bc447d4ce84e2b388f3ec95c99c641c8ff0dd3ef89a6379" dependencies = [ "cc", "memchr", "rustc_version", - "toml 0.8.2", + "toml 0.8.19", "vswhom", "winreg 0.52.0", ] @@ -1359,15 +1374,14 @@ dependencies = [ [[package]] name = "exr" -version = "1.72.0" +version = "1.73.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "887d93f60543e9a9362ef8a21beedd0a833c5d9610e18c67abe15a5963dcb1a4" +checksum = "f83197f59927b46c04a183a619b7c29df34e63e63c7869320862268c0ef687e0" dependencies = [ "bit_field", - "flume", "half", "lebe", - "miniz_oxide 0.7.4", + "miniz_oxide", "rayon-core", "smallvec", "zune-inflate", @@ -1391,9 +1405,9 @@ checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" [[package]] name = "fdeflate" -version = "0.3.5" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8090f921a24b04994d9929e204f50b498a33ea6ba559ffaa05e04f7ee7fb5ab" +checksum = "1e6853b52649d4ac5c0bd02320cddc5ba956bdb407c4b75a2c6b75bf51500f8c" dependencies = [ "simd-adler32", ] @@ -1410,21 +1424,12 @@ dependencies = [ [[package]] name = "flate2" -version = "1.0.34" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1b589b4dc103969ad3cf85c950899926ec64300a1a46d76c03a6072957036f0" +checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c" dependencies = [ "crc32fast", - "miniz_oxide 0.8.0", -] - -[[package]] -name = "fluent-uri" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17c704e9dbe1ddd863da1e6ff3567795087b1eb201ce80d8fa81162e1516500d" -dependencies = [ - "bitflags 1.3.2", + "miniz_oxide", ] [[package]] @@ -1462,7 +1467,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] @@ -1563,7 +1568,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] @@ -1607,9 +1612,9 @@ dependencies = [ [[package]] name = "gdk" -version = "0.18.0" +version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5ba081bdef3b75ebcdbfc953699ed2d7417d6bd853347a42a37d76406a33646" +checksum = "d9f245958c627ac99d8e529166f9823fb3b838d1d41fd2b297af3075093c2691" dependencies = [ "cairo-rs", "gdk-pixbuf", @@ -1648,9 +1653,9 @@ dependencies = [ [[package]] name = "gdk-sys" -version = "0.18.0" +version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31ff856cb3386dae1703a920f803abafcc580e9b5f711ca62ed1620c25b51ff2" +checksum = "5c2d13f38594ac1e66619e188c6d5a1adb98d11b2fcf7894fc416ad76aa2f3f7" dependencies = [ "cairo-sys-rs", "gdk-pixbuf-sys", @@ -1665,9 +1670,9 @@ dependencies = [ [[package]] name = "gdkwayland-sys" -version = "0.18.0" +version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a90fbf5c033c65d93792192a49a8efb5bb1e640c419682a58bb96f5ae77f3d4a" +checksum = "140071d506d223f7572b9f09b5e155afbd77428cd5cc7af8f2694c41d98dfe69" dependencies = [ "gdk-sys", "glib-sys", @@ -1679,9 +1684,9 @@ dependencies = [ [[package]] name = "gdkx11" -version = "0.18.0" +version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db2ea8a4909d530f79921290389cbd7c34cb9d623bfe970eaae65ca5f9cd9cce" +checksum = "3caa00e14351bebbc8183b3c36690327eb77c49abc2268dd4bd36b856db3fbfe" dependencies = [ "gdk", "gdkx11-sys", @@ -1693,9 +1698,9 @@ dependencies = [ [[package]] name = "gdkx11-sys" -version = "0.18.0" +version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fee8f00f4ee46cad2939b8990f5c70c94ff882c3028f3cc5abf950fa4ab53043" +checksum = "6e2e7445fe01ac26f11601db260dd8608fe172514eb63b3b5e261ea6b0f4428d" dependencies = [ "gdk-sys", "glib-sys", @@ -1780,7 +1785,7 @@ dependencies = [ "once_cell", "pin-project-lite", "smallvec", - "thiserror 1.0.65", + "thiserror 1.0.69", ] [[package]] @@ -1816,7 +1821,7 @@ dependencies = [ "memchr", "once_cell", "smallvec", - "thiserror 1.0.65", + "thiserror 1.0.69", ] [[package]] @@ -1826,11 +1831,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bb0228f477c0900c880fd78c8759b95c7636dbd7842707f49e132378aa2acdc" dependencies = [ "heck 0.4.1", - "proc-macro-crate 2.0.2", + "proc-macro-crate 2.0.0", "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] @@ -1845,15 +1850,15 @@ dependencies = [ [[package]] name = "glob" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" +checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" [[package]] name = "global-hotkey" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1b75248f33c73df1ed69673f6cb36d2e048ae84d29aa1d3e53199d138ebb1df" +checksum = "b00d88f1be7bf4cd2e61623ce08e84be2dfa4eab458e5d632d3dab95f16c1f64" dependencies = [ "crossbeam-channel", "keyboard-types", @@ -1861,7 +1866,7 @@ dependencies = [ "objc2-app-kit", "once_cell", "serde", - "thiserror 1.0.65", + "thiserror 1.0.69", "windows-sys 0.59.0", "x11-dl", ] @@ -1881,7 +1886,7 @@ dependencies = [ "pin-project", "serde", "serde_json", - "thiserror 1.0.65", + "thiserror 1.0.69", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", @@ -1897,7 +1902,7 @@ dependencies = [ "js-sys", "serde", "serde_json", - "thiserror 1.0.65", + "thiserror 1.0.69", "wasm-bindgen", "web-sys", ] @@ -1928,9 +1933,9 @@ dependencies = [ [[package]] name = "gtk" -version = "0.18.1" +version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93c4f5e0e20b60e10631a5f06da7fe3dda744b05ad0ea71fee2f47adf865890c" +checksum = "fd56fb197bfc42bd5d2751f4f017d44ff59fbb58140c6b49f9b3b2bdab08506a" dependencies = [ "atk", "cairo-rs", @@ -1949,9 +1954,9 @@ dependencies = [ [[package]] name = "gtk-sys" -version = "0.18.0" +version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "771437bf1de2c1c0b496c11505bdf748e26066bbe942dfc8f614c9460f6d7722" +checksum = "8f29a1c21c59553eb7dd40e918be54dccd60c52b049b75119d5d96ce6b624414" dependencies = [ "atk-sys", "cairo-sys-rs", @@ -1967,15 +1972,15 @@ dependencies = [ [[package]] name = "gtk3-macros" -version = "0.18.0" +version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6063efb63db582968fb7df72e1ae68aa6360dcfb0a75143f34fc7d616bad75e" +checksum = "52ff3c5b21f14f0736fed6dcfc0bfb4225ebf5725f3c0209edeec181e4d73e9d" dependencies = [ "proc-macro-crate 1.3.1", "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] @@ -2006,9 +2011,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.15.0" +version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" +checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" [[package]] name = "hashlink" @@ -2031,12 +2036,6 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" -[[package]] -name = "hermit-abi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" - [[package]] name = "hex" version = "0.4.3" @@ -2063,11 +2062,11 @@ dependencies = [ [[package]] name = "home" -version = "0.5.9" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" +checksum = "589533453244b0995c858700322199b2becb13b627df2851f64a2775d024abcf" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -2095,13 +2094,13 @@ dependencies = [ [[package]] name = "http" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" +checksum = "f16ca2af56261c99fba8bac40a10251ce8188205a4c448fbb745a2e4daa76fea" dependencies = [ "bytes", "fnv", - "itoa 1.0.11", + "itoa 1.0.14", ] [[package]] @@ -2141,9 +2140,9 @@ checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" [[package]] name = "hyper" -version = "1.5.0" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbbff0a806a4728c99295b254c8838933b5b082d75e3cb70c8dab21fdfbcfa9a" +checksum = "256fb8d4bd6413123cc9d91832d78325c48ff41677595be797d90f42969beae0" dependencies = [ "bytes", "futures-channel", @@ -2151,7 +2150,7 @@ dependencies = [ "http", "http-body", "httparse", - "itoa 1.0.11", + "itoa 1.0.14", "pin-project-lite", "smallvec", "tokio", @@ -2160,9 +2159,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b" +checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" dependencies = [ "bytes", "futures-channel", @@ -2210,6 +2209,124 @@ dependencies = [ "png", ] +[[package]] +name = "icu_collections" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locid" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locid_transform" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locid_transform_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" + +[[package]] +name = "icu_properties" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" + +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_provider_macros" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.94", +] + [[package]] name = "ident_case" version = "1.0.1" @@ -2218,12 +2335,23 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.5.0" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" +dependencies = [ + "icu_normalizer", + "icu_properties", ] [[package]] @@ -2236,7 +2364,7 @@ dependencies = [ "image 0.24.9", "rand 0.8.5", "sha3", - "thiserror 1.0.65", + "thiserror 1.0.69", "tracing", ] @@ -2260,9 +2388,9 @@ dependencies = [ [[package]] name = "image" -version = "0.25.4" +version = "0.25.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc144d44a31d753b02ce64093d532f55ff8dc4ebf2ffb8a63c0dda691385acae" +checksum = "cd6f44aed642f18953a158afeb30206f4d50da59fbc66ecb53c66488de73563b" dependencies = [ "bytemuck", "byteorder-lite", @@ -2310,12 +2438,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.6.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" +checksum = "62f822373a4fe84d4bb149bf54e584a7f4abec90e072ed49cda0edea5b95471f" dependencies = [ "equivalent", - "hashbrown 0.15.0", + "hashbrown 0.15.2", "serde", ] @@ -2328,15 +2456,6 @@ dependencies = [ "cfb", ] -[[package]] -name = "instant" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" -dependencies = [ - "cfg-if", -] - [[package]] name = "interpolate_name" version = "0.2.4" @@ -2345,7 +2464,7 @@ checksum = "c34819042dc3d3971c46c2190835914dfbe0c3c13f61449b2997f4e9722dfa60" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] @@ -2356,9 +2475,12 @@ checksum = "71dd52191aae121e8611f1e8dc3e324dd0dd1dee1e6dd91d10ee07a3cfb4d9d8" [[package]] name = "inventory" -version = "0.3.15" +version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f958d3d68f4167080a18141e10381e7634563984a537f2a49a30fd8e53ac5767" +checksum = "e5d80fade88dd420ce0d9ab6f7c58ef2272dde38db874657950f827d4982c817" +dependencies = [ + "rustversion", +] [[package]] name = "ipnet" @@ -2402,9 +2524,9 @@ checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" [[package]] name = "itoa" -version = "1.0.11" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" [[package]] name = "javascriptcore-rs" @@ -2440,7 +2562,7 @@ dependencies = [ "combine", "jni-sys", "log", - "thiserror 1.0.65", + "thiserror 1.0.69", "walkdir", "windows-sys 0.45.0", ] @@ -2478,39 +2600,16 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "json-patch" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b1fb8864823fad91877e6caea0baca82e49e8db50f8e5c9f9a453e27d3330fc" -dependencies = [ - "jsonptr 0.4.7", - "serde", - "serde_json", - "thiserror 1.0.65", -] - [[package]] name = "json-patch" version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "863726d7afb6bc2590eeff7135d923545e5e964f004c2ccf8716c25e70a86f08" dependencies = [ - "jsonptr 0.6.3", - "serde", - "serde_json", - "thiserror 1.0.65", -] - -[[package]] -name = "jsonptr" -version = "0.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c6e529149475ca0b2820835d3dce8fcc41c6b943ca608d32f35b449255e4627" -dependencies = [ - "fluent-uri", + "jsonptr", "serde", "serde_json", + "thiserror 1.0.69", ] [[package]] @@ -2600,7 +2699,7 @@ dependencies = [ "config", "regex", "serde", - "thiserror 1.0.65", + "thiserror 1.0.69", "typed-builder", ] @@ -2616,7 +2715,7 @@ dependencies = [ "futures", "getrandom 0.2.15", "html-escape", - "indexmap 2.6.0", + "indexmap 2.7.0", "itertools", "js-sys", "leptos_reactive", @@ -2642,13 +2741,13 @@ checksum = "6cb53d4794240b684a2f4be224b84bee9e62d2abc498cf2bcd643cd565e01d96" dependencies = [ "anyhow", "camino", - "indexmap 2.6.0", + "indexmap 2.7.0", "parking_lot", "proc-macro2", "quote", "rstml", "serde", - "syn 2.0.90", + "syn 2.0.94", "walkdir", ] @@ -2680,7 +2779,7 @@ dependencies = [ "quote", "rstml", "server_fn_macro", - "syn 2.0.90", + "syn 2.0.94", "tracing", "uuid", ] @@ -2694,7 +2793,7 @@ dependencies = [ "base64 0.22.1", "cfg-if", "futures", - "indexmap 2.6.0", + "indexmap 2.7.0", "js-sys", "oco_ref", "paste", @@ -2705,7 +2804,7 @@ dependencies = [ "serde-wasm-bindgen", "serde_json", "slotmap", - "thiserror 1.0.65", + "thiserror 1.0.69", "tracing", "wasm-bindgen", "wasm-bindgen-futures", @@ -2724,7 +2823,7 @@ dependencies = [ "leptos_reactive", "serde", "server_fn", - "thiserror 1.0.65", + "thiserror 1.0.69", "tracing", ] @@ -2754,9 +2853,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.161" +version = "0.2.169" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" +checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" [[package]] name = "libdbus-sys" @@ -2770,13 +2869,12 @@ dependencies = [ [[package]] name = "libfuzzer-sys" -version = "0.4.7" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a96cfd5557eb82f2b83fed4955246c988d331975a002961b07c81584d107e7f7" +checksum = "9b9569d2f74e257076d8c6bfa73fb505b46b851e51ddaecc825944aa3bed17fa" dependencies = [ "arbitrary", "cc", - "once_cell", ] [[package]] @@ -2828,6 +2926,12 @@ version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" +[[package]] +name = "litemap" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104" + [[package]] name = "lock_api" version = "0.4.12" @@ -2877,7 +2981,7 @@ dependencies = [ "manyhow-macros", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] @@ -2937,6 +3041,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ea1f30cedd69f0a2954655f7188c6a834246d2bcf1e315e2ac40c4b24dc9519" dependencies = [ "cfg-if", + "rayon", ] [[package]] @@ -2978,18 +3083,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" -dependencies = [ - "adler", -] - -[[package]] -name = "miniz_oxide" -version = "0.8.0" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" +checksum = "4ffbe83022cedc1d264172192511ae958937694cd57ce297164951b8b3568394" dependencies = [ "adler2", "simd-adler32", @@ -2997,11 +3093,10 @@ dependencies = [ [[package]] name = "mio" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" +checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" dependencies = [ - "hermit-abi", "libc", "wasi 0.11.0+wasi-snapshot-preview1", "windows-sys 0.52.0", @@ -3009,9 +3104,9 @@ dependencies = [ [[package]] name = "muda" -version = "0.15.1" +version = "0.15.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8123dfd4996055ac9b15a60ad263b44b01e539007523ad7a4a533a3d93b0591" +checksum = "fdae9c00e61cc0579bcac625e8ad22104c60548a025bfc972dc83868a28e1484" dependencies = [ "crossbeam-channel", "dpi", @@ -3023,7 +3118,7 @@ dependencies = [ "once_cell", "png", "serde", - "thiserror 1.0.65", + "thiserror 1.0.69", "windows-sys 0.59.0", ] @@ -3039,7 +3134,7 @@ dependencies = [ "ndk-sys", "num_enum", "raw-window-handle", - "thiserror 1.0.65", + "thiserror 1.0.69", ] [[package]] @@ -3145,7 +3240,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] @@ -3204,10 +3299,10 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ - "proc-macro-crate 2.0.2", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] @@ -3439,9 +3534,9 @@ dependencies = [ [[package]] name = "object" -version = "0.36.5" +version = "0.36.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" +checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" dependencies = [ "memchr", ] @@ -3453,7 +3548,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c51ebcefb2f0b9a5e0bea115532c8ae4215d1b01eff176d0f4ba4192895c2708" dependencies = [ "serde", - "thiserror 1.0.65", + "thiserror 1.0.69", ] [[package]] @@ -3464,9 +3559,9 @@ checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "open" -version = "5.3.0" +version = "5.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61a877bf6abd716642a53ef1b89fb498923a4afca5c754f9050b4d081c05c4b3" +checksum = "3ecd52f0b8d15c40ce4820aa251ed5de032e5d91fab27f7db2f40d42a8bdf69c" dependencies = [ "is-wsl", "libc", @@ -3576,9 +3671,9 @@ checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] name = "pathdiff" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d61c5ce1153ab5b689d0c074c4e7fc613e942dfb7dd9eea5ab202d2ad91fe361" +checksum = "df94ce210e5bc13cb6651479fa48d14f601d9858cfe0467f43ae157023b938d3" [[package]] name = "pem-rfc7468" @@ -3699,7 +3794,7 @@ dependencies = [ "phf_shared 0.11.2", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] @@ -3746,7 +3841,7 @@ checksum = "3c0f5fad0874fc7abcd4d750e76917eaebbecaa2c20bde22e1dbeeba8beb758c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] @@ -3795,7 +3890,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42cf17e9a1800f5f396bc67d193dc9411b59012a5876445ef450d449881e1016" dependencies = [ "base64 0.22.1", - "indexmap 2.6.0", + "indexmap 2.7.0", "quick-xml", "serde", "time", @@ -3803,15 +3898,15 @@ dependencies = [ [[package]] name = "png" -version = "0.17.14" +version = "0.17.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52f9d46a34a05a6a57566bc2bfae066ef07585a6e3fa30fbbdff5936380623f0" +checksum = "82151a2fc869e011c153adc57cf2789ccb8d9906ce52c0b39a6b5697749d7526" dependencies = [ "bitflags 1.3.2", "crc32fast", "fdeflate", "flate2", - "miniz_oxide 0.8.0", + "miniz_oxide", ] [[package]] @@ -3842,7 +3937,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" dependencies = [ "proc-macro2", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] @@ -3857,12 +3952,20 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "2.0.2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b00f26d3400549137f92511a46ac1cd8ce37cb5598a96d382381458b992a5d24" +checksum = "7e8366a6159044a37876a2b9817124296703c586a5c92e2c53751fa06d8d43e8" dependencies = [ - "toml_datetime", - "toml_edit 0.20.2", + "toml_edit 0.20.7", +] + +[[package]] +name = "proc-macro-crate" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" +dependencies = [ + "toml_edit 0.22.22", ] [[package]] @@ -3955,7 +4058,7 @@ checksum = "af066a9c399a26e020ada66a034357a868728e72cd426f3adcd35f80d88d88c8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", "version_check", "yansi", ] @@ -3976,7 +4079,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a65f2e60fbf1063868558d69c6beacf412dc755f9fc020f514b7955fc914fe30" dependencies = [ "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] @@ -4005,9 +4108,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.37" +version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" +checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc" dependencies = [ "proc-macro2", ] @@ -4031,7 +4134,7 @@ dependencies = [ "proc-macro-utils 0.10.0", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] @@ -4151,7 +4254,7 @@ dependencies = [ "rand_chacha 0.3.1", "simd_helpers", "system-deps", - "thiserror 1.0.65", + "thiserror 1.0.69", "v_frame", "wasm-bindgen", ] @@ -4167,6 +4270,7 @@ dependencies = [ "loop9", "quick-error", "rav1e", + "rayon", "rgb", ] @@ -4198,9 +4302,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.7" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" +checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834" dependencies = [ "bitflags 2.6.0", ] @@ -4213,7 +4317,7 @@ checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" dependencies = [ "getrandom 0.2.15", "libredox", - "thiserror 1.0.65", + "thiserror 1.0.69", ] [[package]] @@ -4224,7 +4328,7 @@ checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.8", + "regex-automata 0.4.9", "regex-syntax 0.8.5", ] @@ -4239,9 +4343,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" dependencies = [ "aho-corasick", "memchr", @@ -4262,9 +4366,9 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "reqwest" -version = "0.12.8" +version = "0.12.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f713147fbe92361e52392c73b8c9e48c04c6625bce969ef54dc901e58e042a7b" +checksum = "43e734407157c3c2034e0258f5e4473ddb361b1e85f95a66690d67264d7cd1da" dependencies = [ "base64 0.22.1", "bytes", @@ -4288,6 +4392,7 @@ dependencies = [ "sync_wrapper", "tokio", "tokio-util", + "tower", "tower-service", "url", "wasm-bindgen", @@ -4332,9 +4437,9 @@ dependencies = [ "proc-macro2", "proc-macro2-diagnostics", "quote", - "syn 2.0.90", + "syn 2.0.94", "syn_derive", - "thiserror 1.0.65", + "thiserror 1.0.69", ] [[package]] @@ -4371,6 +4476,12 @@ dependencies = [ "windows-sys 0.59.0", ] +[[package]] +name = "rustversion" +version = "1.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4" + [[package]] name = "ryu" version = "1.0.18" @@ -4410,7 +4521,7 @@ dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] @@ -4441,15 +4552,15 @@ dependencies = [ [[package]] name = "self_cell" -version = "1.0.4" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d369a96f978623eb3dc28807c4852d6cc617fed53da5d3c400feff1ef34a714a" +checksum = "c2fdfc24bc566f839a2da4c4295b82db7d25a24253867d5c64355abb5799bdbe" [[package]] name = "semver" -version = "1.0.23" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" +checksum = "3cb6eb87a131f756572d7fb904f6e7b68633f09cca868c5df1c4b8d1a694bbba" dependencies = [ "serde", ] @@ -4465,9 +4576,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.213" +version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ea7893ff5e2466df8d720bb615088341b295f849602c6956047f8f80f0e9bc1" +checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70" dependencies = [ "serde_derive", ] @@ -4505,13 +4616,13 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.213" +version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e85ad2009c50b58e87caa8cd6dac16bdf511bbfb7af6c33df902396aa480fa5" +checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] @@ -4522,17 +4633,17 @@ checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] name = "serde_json" -version = "1.0.132" +version = "1.0.134" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d726bfaff4b320266d395898905d0eba0345aae23b54aee3a737e260fd46db03" +checksum = "d00f4175c42ee48b15416f6193a959ba3a0d67fc699a0db9ad12df9f83991c7d" dependencies = [ - "indexmap 2.6.0", - "itoa 1.0.11", + "indexmap 2.7.0", + "itoa 1.0.14", "memchr", "ryu", "serde", @@ -4546,7 +4657,7 @@ checksum = "0431a35568651e363364210c91983c1da5eb29404d9f0928b67d4ebcfa7d330c" dependencies = [ "percent-encoding", "serde", - "thiserror 1.0.65", + "thiserror 1.0.69", ] [[package]] @@ -4557,7 +4668,7 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] @@ -4576,22 +4687,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ "form_urlencoded", - "itoa 1.0.11", + "itoa 1.0.14", "ryu", "serde", ] [[package]] name = "serde_with" -version = "3.11.0" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e28bdad6db2b8340e449f7108f020b3b092e8583a9e3fb82713e1d4e71fe817" +checksum = "d6b6f7f2fcb69f747921f79f3926bd1e203fce4fef62c268dd3abfb6d86029aa" dependencies = [ "base64 0.22.1", "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.6.0", + "indexmap 2.7.0", "serde", "serde_derive", "serde_json", @@ -4601,14 +4712,14 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.11.0" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d846214a9854ef724f3da161b426242d8de7c1fc7de2f89bb1efcb154dca79d" +checksum = "8d00caa5193a3c8362ac2b73be6b9e768aa5a4b2f721d8f4b339600c3cb51f8e" dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] @@ -4653,7 +4764,7 @@ dependencies = [ "serde_json", "serde_qs", "server_fn_macro_default", - "thiserror 1.0.65", + "thiserror 1.0.69", "url", "wasm-bindgen", "wasm-bindgen-futures", @@ -4672,7 +4783,7 @@ dependencies = [ "convert_case 0.6.0", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", "xxhash-rust", ] @@ -4683,7 +4794,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f2aa8119b558a17992e0ac1fd07f080099564f24532858811ce04f742542440" dependencies = [ "server_fn_macro", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] @@ -4814,9 +4925,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.5.7" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" +checksum = "c970269d99b64e60ec3bd6ad27270092a5394c4e309314b18ae3fe575695fbe8" dependencies = [ "libc", "windows-sys 0.52.0", @@ -4933,7 +5044,7 @@ dependencies = [ "hashbrown 0.14.5", "hashlink", "hex", - "indexmap 2.6.0", + "indexmap 2.7.0", "log", "memchr", "once_cell", @@ -4944,7 +5055,7 @@ dependencies = [ "sha2", "smallvec", "sqlformat", - "thiserror 1.0.65", + "thiserror 1.0.69", "time", "tokio", "tokio-stream", @@ -4963,7 +5074,7 @@ dependencies = [ "quote", "sqlx-core", "sqlx-macros-core", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] @@ -4986,7 +5097,7 @@ dependencies = [ "sqlx-mysql", "sqlx-postgres", "sqlx-sqlite", - "syn 2.0.90", + "syn 2.0.94", "tempfile", "tokio", "url", @@ -5015,7 +5126,7 @@ dependencies = [ "hex", "hkdf", "hmac", - "itoa 1.0.11", + "itoa 1.0.14", "log", "md-5", "memchr", @@ -5029,7 +5140,7 @@ dependencies = [ "smallvec", "sqlx-core", "stringprep", - "thiserror 1.0.65", + "thiserror 1.0.69", "time", "tracing", "uuid", @@ -5057,7 +5168,7 @@ dependencies = [ "hkdf", "hmac", "home", - "itoa 1.0.11", + "itoa 1.0.14", "log", "md-5", "memchr", @@ -5069,7 +5180,7 @@ dependencies = [ "smallvec", "sqlx-core", "stringprep", - "thiserror 1.0.65", + "thiserror 1.0.69", "time", "tracing", "uuid", @@ -5180,9 +5291,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.90" +version = "2.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31" +checksum = "987bc0be1cdea8b10216bd06e2ca407d40b9543468fafd3ddfb02f36e77f71f3" dependencies = [ "proc-macro2", "quote", @@ -5198,18 +5309,29 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] name = "sync_wrapper" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" dependencies = [ "futures-core", ] +[[package]] +name = "synstructure" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.94", +] + [[package]] name = "syntect" version = "5.2.0" @@ -5227,7 +5349,7 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "thiserror 1.0.65", + "thiserror 1.0.69", "walkdir", "yaml-rust", ] @@ -5241,15 +5363,15 @@ dependencies = [ "cfg-expr", "heck 0.5.0", "pkg-config", - "toml 0.8.2", + "toml 0.8.19", "version-compare", ] [[package]] name = "tao" -version = "0.30.3" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0dbbebe82d02044dfa481adca1550d6dd7bd16e086bc34fa0fbecceb5a63751" +checksum = "cc6b53216f32e60efc27dfa111268481e4dfba53e553e4cdebcaed9db36c11bb" dependencies = [ "bitflags 2.6.0", "cocoa", @@ -5262,7 +5384,6 @@ dependencies = [ "gdkwayland-sys", "gdkx11-sys", "gtk", - "instant", "jni", "lazy_static", "libc", @@ -5292,7 +5413,7 @@ checksum = "f4e16beb8b2ac17db28eab8bca40e62dbfbb34c0fcdc6d9826b11b7b5d047dfd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] @@ -5309,9 +5430,9 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" [[package]] name = "tauri" -version = "2.0.6" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3889b392db6d32a105d3757230ea0220090b8f94c90d3e60b6c5eb91178ab1b" +checksum = "2e2e3349fbb2be7af9fad1b43d61ac83ba55ab48d47fbe1b2732f0c8211610a9" dependencies = [ "anyhow", "bytes", @@ -5347,7 +5468,7 @@ dependencies = [ "tauri-runtime", "tauri-runtime-wry", "tauri-utils", - "thiserror 1.0.65", + "thiserror 2.0.9", "tokio", "tray-icon", "url", @@ -5360,36 +5481,36 @@ dependencies = [ [[package]] name = "tauri-build" -version = "2.0.2" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f96827ccfb1aa40d55d0ded79562d18ba18566657a553f992a982d755148376" +checksum = "b274ec7239ada504deb615f1c8abd7ba99631e879709e6f10e5d17217058d976" dependencies = [ "anyhow", "cargo_toml", "dirs 5.0.1", "glob", "heck 0.5.0", - "json-patch 3.0.1", + "json-patch", "schemars", "semver", "serde", "serde_json", "tauri-utils", "tauri-winres", - "toml 0.8.2", + "toml 0.8.19", "walkdir", ] [[package]] name = "tauri-codegen" -version = "2.0.2" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8947f16f47becd9e9cd39b74ee337fd1981574d78819be18e4384d85e5a0b82f" +checksum = "f77894f9ddb5cb6c04fcfe8c8869ebe0aded4dabf19917118d48be4a95599ab5" dependencies = [ "base64 0.22.1", "brotli", "ico", - "json-patch 2.0.0", + "json-patch", "plist", "png", "proc-macro2", @@ -5398,9 +5519,9 @@ dependencies = [ "serde", "serde_json", "sha2", - "syn 2.0.90", + "syn 2.0.94", "tauri-utils", - "thiserror 1.0.65", + "thiserror 2.0.9", "time", "url", "uuid", @@ -5409,23 +5530,23 @@ dependencies = [ [[package]] name = "tauri-macros" -version = "2.0.2" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bd1c8d4a66799d3438747c3a79705cd665a95d6f24cb5f315413ff7a981fe2a" +checksum = "3240a5caed760a532e8f687be6f05b2c7d11a1d791fb53ccc08cfeb3e5308736" dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", "tauri-codegen", "tauri-utils", ] [[package]] name = "tauri-plugin" -version = "2.0.2" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fa4e6c94cb1d635f65a770c69e23de1bc054b0e4c554fa037a7cc7676333d39" +checksum = "5841b9a0200e954ef7457f8d327091424328891e267a97b641dc246cc54d0dec" dependencies = [ "anyhow", "glob", @@ -5434,30 +5555,29 @@ dependencies = [ "serde", "serde_json", "tauri-utils", - "toml 0.8.2", + "toml 0.8.19", "walkdir", ] [[package]] name = "tauri-plugin-autostart" -version = "2.0.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bba6bb936e0fd0a58ed958b49e2e423dd40949c9d9425cc991be996959e3838e" +checksum = "a9c13f843e5e5df3eed270fc42b02923cc1a6b5c7e56b0f3ac1d858ab2c8b5fb" dependencies = [ "auto-launch", - "log", "serde", "serde_json", "tauri", "tauri-plugin", - "thiserror 1.0.65", + "thiserror 2.0.9", ] [[package]] name = "tauri-plugin-fs" -version = "2.0.3" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96ba7d46e86db8c830d143ef90ab5a453328365b0cc834c24edea4267b16aba0" +checksum = "a1a1edf18000f02903a7c2e5997fb89aca455ecbc0acc15c6535afbb883be223" dependencies = [ "anyhow", "dunce", @@ -5469,16 +5589,18 @@ dependencies = [ "serde_repr", "tauri", "tauri-plugin", - "thiserror 1.0.65", + "tauri-utils", + "thiserror 2.0.9", + "toml 0.8.19", "url", "uuid", ] [[package]] name = "tauri-plugin-global-shortcut" -version = "2.0.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c15fb7f5e4c80a73ce97217dcff27e423f496178cbcb87e13b4efe99eebb550" +checksum = "00f646a09511e8d283267dcdaa08c2ef27c4116bf271d9114849d9ca215606c3" dependencies = [ "global-hotkey", "log", @@ -5486,14 +5608,14 @@ dependencies = [ "serde_json", "tauri", "tauri-plugin", - "thiserror 1.0.65", + "thiserror 2.0.9", ] [[package]] name = "tauri-plugin-shell" -version = "2.0.2" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ad7880c5586b6b2104be451e3d7fc0f3800c84bda69e9ba81c828f87cb34267" +checksum = "bb2c50a63e60fb8925956cc5b7569f4b750ac197a4d39f13b8dd46ea8e2bad79" dependencies = [ "encoding_rs", "log", @@ -5506,15 +5628,15 @@ dependencies = [ "shared_child", "tauri", "tauri-plugin", - "thiserror 1.0.65", + "thiserror 2.0.9", "tokio", ] [[package]] name = "tauri-runtime" -version = "2.1.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1ef7363e7229ac8d04e8a5d405670dbd43dde8fc4bc3bc56105c35452d03784" +checksum = "2274ef891ccc0a8d318deffa9d70053f947664d12d58b9c0d1ae5e89237e01f7" dependencies = [ "dpi", "gtk", @@ -5524,16 +5646,16 @@ dependencies = [ "serde", "serde_json", "tauri-utils", - "thiserror 1.0.65", + "thiserror 2.0.9", "url", "windows", ] [[package]] name = "tauri-runtime-wry" -version = "2.1.2" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62fa2068e8498ad007b54d5773d03d57c3ff6dd96f8c8ce58beff44d0d5e0d30" +checksum = "3707b40711d3b9f6519150869e358ffbde7c57567fb9b5a8b51150606939b2a0" dependencies = [ "gtk", "http", @@ -5557,9 +5679,9 @@ dependencies = [ [[package]] name = "tauri-utils" -version = "2.0.2" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fc65d6f5c54e56b66258948a6d9e47a82ea41f4b5a7612bfbdd1634c2913ed0" +checksum = "96fb10e7cc97456b2d5b9c03e335b5de5da982039a303a20d10006885e4523a0" dependencies = [ "brotli", "cargo_metadata", @@ -5567,8 +5689,9 @@ dependencies = [ "dunce", "glob", "html5ever", + "http", "infer", - "json-patch 2.0.0", + "json-patch", "kuchikiki", "log", "memchr", @@ -5583,8 +5706,8 @@ dependencies = [ "serde_json", "serde_with", "swift-rs", - "thiserror 1.0.65", - "toml 0.8.2", + "thiserror 2.0.9", + "toml 0.8.19", "url", "urlpattern", "uuid", @@ -5603,12 +5726,13 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.14.0" +version = "3.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c" +checksum = "9a8a559c81686f576e8cd0290cd2a24a2a9ad80c98b3478856500fcbd7acd704" dependencies = [ "cfg-if", "fastrand", + "getrandom 0.2.15", "once_cell", "rustix", "windows-sys 0.59.0", @@ -5633,42 +5757,42 @@ checksum = "8eaa81235c7058867fa8c0e7314f33dcce9c215f535d1913822a2b3f5e289f3c" [[package]] name = "thiserror" -version = "1.0.65" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d11abd9594d9b38965ef50805c5e469ca9cc6f197f883f717e0269a3057b3d5" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" dependencies = [ - "thiserror-impl 1.0.65", + "thiserror-impl 1.0.69", ] [[package]] name = "thiserror" -version = "2.0.7" +version = "2.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93605438cbd668185516ab499d589afb7ee1859ea3d5fc8f6b0755e1c7443767" +checksum = "f072643fd0190df67a8bab670c20ef5d8737177d6ac6b2e9a236cb096206b2cc" dependencies = [ - "thiserror-impl 2.0.7", + "thiserror-impl 2.0.9", ] [[package]] name = "thiserror-impl" -version = "1.0.65" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae71770322cbd277e69d762a16c444af02aa0575ac0d174f0b9562d3b37f8602" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] name = "thiserror-impl" -version = "2.0.7" +version = "2.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1d8749b4531af2117677a5fcd12b1348a3fe2b81e36e61ffeac5c4aa3273e36" +checksum = "7b50fa271071aae2e6ee85f842e2e28ba8cd2c5fb67f11fcb1fd70b276f9e7d4" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] @@ -5694,12 +5818,12 @@ dependencies = [ [[package]] name = "time" -version = "0.3.36" +version = "0.3.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" +checksum = "35e7868883861bd0e56d9ac6efcaaca0d6d5d82a2a7ec8209ff492c07cf37b21" dependencies = [ "deranged", - "itoa 1.0.11", + "itoa 1.0.14", "js-sys", "num-conv", "powerfmt", @@ -5716,19 +5840,29 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" +checksum = "2834e6017e3e5e4b9834939793b282bc03b37a3336245fa820e35e233e2a85de" dependencies = [ "num-conv", "time-core", ] +[[package]] +name = "tinystr" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +dependencies = [ + "displaydoc", + "zerovec", +] + [[package]] name = "tinyvec" -version = "1.8.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" +checksum = "022db8904dfa342efe721985167e9fcd16c29b226db4397ed752a761cfce81e8" dependencies = [ "tinyvec_macros", ] @@ -5767,9 +5901,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.12" +version = "0.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" +checksum = "d7fcaa8d55a2bdd6b83ace262b016eca0d79ee02818c5c1bcdf0305114081078" dependencies = [ "bytes", "futures-core", @@ -5792,21 +5926,21 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.2" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "185d8ab0dfbb35cf1399a6344d8484209c088f75f8f68230da55d48d95d43e3d" +checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.20.2", + "toml_edit 0.22.22", ] [[package]] name = "toml_datetime" -version = "0.6.3" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" dependencies = [ "serde", ] @@ -5817,26 +5951,58 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.6.0", + "indexmap 2.7.0", "serde", "serde_spanned", "toml_datetime", - "winnow", + "winnow 0.5.40", ] [[package]] name = "toml_edit" -version = "0.20.2" +version = "0.20.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" +checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81" dependencies = [ - "indexmap 2.6.0", + "indexmap 2.7.0", + "toml_datetime", + "winnow 0.5.40", +] + +[[package]] +name = "toml_edit" +version = "0.22.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" +dependencies = [ + "indexmap 2.7.0", "serde", "serde_spanned", "toml_datetime", - "winnow", + "winnow 0.6.22", ] +[[package]] +name = "tower" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper", + "tokio", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-layer" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" + [[package]] name = "tower-service" version = "0.3.3" @@ -5845,9 +6011,9 @@ checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" -version = "0.1.40" +version = "0.1.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" dependencies = [ "log", "pin-project-lite", @@ -5857,20 +6023,20 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.27" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] name = "tracing-core" -version = "0.1.32" +version = "0.1.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" dependencies = [ "once_cell", "valuable", @@ -5889,9 +6055,9 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.18" +version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" dependencies = [ "matchers", "nu-ansi-term", @@ -5907,9 +6073,9 @@ dependencies = [ [[package]] name = "tray-icon" -version = "0.19.1" +version = "0.19.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c92af36a182b46206723bdf8a7942e20838cde1cf062e5b97854d57eb01763b" +checksum = "d48a05076dd272615d03033bf04f480199f7d1b66a8ac64d75c625fc4a70c06b" dependencies = [ "core-graphics 0.24.0", "crossbeam-channel", @@ -5922,7 +6088,7 @@ dependencies = [ "once_cell", "png", "serde", - "thiserror 1.0.65", + "thiserror 1.0.69", "windows-sys 0.59.0", ] @@ -5949,7 +6115,7 @@ checksum = "1f718dfaf347dcb5b983bfc87608144b0bad87970aebcbea5ce44d2a30c08e63" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] @@ -6007,9 +6173,9 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.17" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" +checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5" [[package]] name = "unicode-id" @@ -6019,9 +6185,9 @@ checksum = "10103c57044730945224467c09f71a4db0071c123a0648cc3e818913bde6b561" [[package]] name = "unicode-ident" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" +checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" [[package]] name = "unicode-normalization" @@ -6058,9 +6224,9 @@ checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" [[package]] name = "url" -version = "2.5.2" +version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" +checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" dependencies = [ "form_urlencoded", "idna", @@ -6086,12 +6252,24 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" +[[package]] +name = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + [[package]] name = "utf8-width" version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "86bd8d4e895da8537e5315b8254664e6b769c4ff3db18321b297a1e7004392e3" +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + [[package]] name = "uuid" version = "1.11.0" @@ -6216,7 +6394,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", "wasm-bindgen-shared", ] @@ -6250,7 +6428,7 @@ checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -6341,9 +6519,9 @@ dependencies = [ [[package]] name = "webview2-com" -version = "0.33.0" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f61ff3d9d0ee4efcb461b14eb3acfda2702d10dc329f339303fc3e57215ae2c" +checksum = "823e7ebcfaea51e78f72c87fc3b65a1e602c321f407a0b36dbb327d7bb7cd921" dependencies = [ "webview2-com-macros", "webview2-com-sys", @@ -6361,16 +6539,16 @@ checksum = "1d228f15bba3b9d56dde8bddbee66fa24545bd17b48d5128ccf4a8742b18e431" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] name = "webview2-com-sys" -version = "0.33.0" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3a3e2eeb58f82361c93f9777014668eb3d07e7d174ee4c819575a9208011886" +checksum = "7a82bce72db6e5ee83c68b5de1e2cd6ea195b9fbff91cb37df5884cbe3222df4" dependencies = [ - "thiserror 1.0.65", + "thiserror 1.0.69", "windows", "windows-core 0.58.0", ] @@ -6476,7 +6654,7 @@ checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] @@ -6487,7 +6665,7 @@ checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] @@ -6752,6 +6930,15 @@ dependencies = [ "memchr", ] +[[package]] +name = "winnow" +version = "0.6.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39281189af81c07ec09db316b302a3e67bf9bd7cbf6c820b50e35fee9c2fa980" +dependencies = [ + "memchr", +] + [[package]] name = "winreg" version = "0.10.1" @@ -6771,14 +6958,27 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" + [[package]] name = "wry" -version = "0.46.3" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd5cdf57c66813d97601181349c63b96994b3074fc3d7a31a8cce96e968e3bbd" +checksum = "1e644bf458e27b11b0ecafc9e5633d1304fdae82baca1d42185669752fe6ca4f" dependencies = [ "base64 0.22.1", "block2", + "cookie", "crossbeam-channel", "dpi", "dunce", @@ -6802,7 +7002,8 @@ dependencies = [ "sha2", "soup3", "tao-macros", - "thiserror 1.0.65", + "thiserror 2.0.9", + "url", "webkit2gtk", "webkit2gtk-sys", "webview2-com", @@ -6861,9 +7062,9 @@ checksum = "ec107c4503ea0b4a98ef47356329af139c0a4f7750e621cf2973cd3385ebcb3d" [[package]] name = "xxhash-rust" -version = "0.8.12" +version = "0.8.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a5cbf750400958819fb6178eaa83bee5cd9c29a26a40cc241df8c70fdd46984" +checksum = "fdd20c5420375476fbd4394763288da7eb0cc0b8c11deed431a91562af7335d3" [[package]] name = "yaml-rust" @@ -6880,6 +7081,30 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" +[[package]] +name = "yoke" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.94", + "synstructure", +] + [[package]] name = "zerocopy" version = "0.7.35" @@ -6898,7 +7123,28 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", +] + +[[package]] +name = "zerofrom" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.94", + "synstructure", ] [[package]] @@ -6907,6 +7153,28 @@ version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" +[[package]] +name = "zerovec" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.94", +] + [[package]] name = "zune-core" version = "0.4.12" @@ -6924,9 +7192,9 @@ dependencies = [ [[package]] name = "zune-jpeg" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16099418600b4d8f028622f73ff6e3deaabdff330fb9a2a131dea781ee8b0768" +checksum = "99a5bab8d7dedf81405c4bb1f2b83ea057643d9cb28778cea9eecddeedd2e028" dependencies = [ "zune-core", ] diff --git a/dataans/src-tauri/src/main.rs b/dataans/src-tauri/src/main.rs index 4e8d1ea..8c8b208 100644 --- a/dataans/src-tauri/src/main.rs +++ b/dataans/src-tauri/src/main.rs @@ -198,7 +198,12 @@ fn main() { config::open_theme_file, code_block::parse_code, ]) - .build(tauri::generate_context!()) + .build( + { + #![allow(deprecated)] + tauri::generate_context!() + }, + ) .expect("error while building tauri application") .run(|_app_handle, event| { if let RunEvent::ExitRequested { api, .. } = event { From 465849739281cc44d75b5903d824251ac501aa07 Mon Sep 17 00:00:00 2001 From: Pavlo Myroniuk Date: Fri, 3 Jan 2025 20:39:31 +0200 Subject: [PATCH 2/6] refactor(back): error handling. remove custom result object; --- dataans/common/src/error.rs | 90 ++++++------------- .../src/dataans/command/export/mod.rs | 4 +- dataans/src-tauri/src/dataans/command/file.rs | 15 ++-- dataans/src-tauri/src/dataans/command/mod.rs | 5 -- dataans/src-tauri/src/dataans/command/note.rs | 14 +-- .../src-tauri/src/dataans/command/space.rs | 10 +-- dataans/src-tauri/src/dataans/error.rs | 8 ++ 7 files changed, 53 insertions(+), 93 deletions(-) diff --git a/dataans/common/src/error.rs b/dataans/common/src/error.rs index 3ad746d..0285692 100644 --- a/dataans/common/src/error.rs +++ b/dataans/common/src/error.rs @@ -1,70 +1,32 @@ -use std::fmt; +use std::path::PathBuf; use serde::{Deserialize, Serialize}; -/// Custom result type. -/// -/// The frontend does not need to know details of the error. A simple [String] is enough. -/// If the user wants more info about the error, they can find it in the dataans log file. #[derive(Debug, Serialize, Deserialize)] -pub struct DataansResult { - ok: Option, - err: Option, +pub enum CommandError { + /// DbError. + DbError(String), + /// IO error. + IoError(String), + /// JSON error. + JsonError(String), + /// Time format error. + TimeFormatError(String), + /// Path is not UTF-8. + PathIsNotUtf8(PathBuf), + /// Clipboard error. + Clipboard(String), + /// Image error. + Image(String), + /// Image generation error. + ImageGeneration(String), + /// Image from raw error. + ImageFromRaw, + /// Other. + Other(String), } -impl DataansResult { - /// Create ok. - pub fn ok(ok: T) -> Self { - Self { - ok: Some(ok), - err: None, - } - } - - /// Create err. - pub fn err(err: String) -> Self { - Self { - ok: None, - err: Some(err), - } - } - - /// Check result status. - pub fn is_ok(&self) -> bool { - self.ok.is_some() - } -} - -impl From> for Result { - fn from(result: DataansResult) -> Result { - let DataansResult { ok, err } = result; - - if let Some(ok) = ok { - Ok(ok) - } else { - Err(err.expect("Err obj should present")) - } - } -} - -impl From> for DataansResult { - fn from(err: Result) -> Self { - match err { - Ok(value) => DataansResult::ok(value), - Err(err) => DataansResult::err(err.to_string()), - } - } -} - -/// Dummy unit type because `()` is not enough :). -#[derive(Serialize, Deserialize, Debug, Copy, Clone, PartialEq, Eq, Default)] -pub struct DummyUnit(u8); - -impl From> for DataansResult { - fn from(err: Result<(), E>) -> Self { - match err { - Ok(_) => DataansResult::ok(DummyUnit::default()), - Err(err) => DataansResult::err(err.to_string()), - } - } -} +/// TODO. +pub type CommandResult = Result; +/// TODO. +pub type CommandResultEmpty = Result<(), CommandError>; diff --git a/dataans/src-tauri/src/dataans/command/export/mod.rs b/dataans/src-tauri/src/dataans/command/export/mod.rs index a9ceacc..3986762 100644 --- a/dataans/src-tauri/src/dataans/command/export/mod.rs +++ b/dataans/src-tauri/src/dataans/command/export/mod.rs @@ -4,12 +4,12 @@ mod md; use std::fs; use std::path::{Path, PathBuf}; +use common::error::CommandResult; use common::DataExportConfig; use tauri::State; use time::macros::format_description; use time::OffsetDateTime; -use crate::dataans::command::CommandResult; use crate::dataans::{DataansError, DataansState}; use crate::BACKUPS_DIR; @@ -56,5 +56,5 @@ pub async fn export_app_data( state: State<'_, DataansState>, export_config: DataExportConfig, ) -> CommandResult { - Ok(export_data(state, export_config).await.into()) + Ok(export_data(state, export_config).await?) } diff --git a/dataans/src-tauri/src/dataans/command/file.rs b/dataans/src-tauri/src/dataans/command/file.rs index b1a17ab..89ffef9 100644 --- a/dataans/src-tauri/src/dataans/command/file.rs +++ b/dataans/src-tauri/src/dataans/command/file.rs @@ -1,8 +1,8 @@ +use common::error::{CommandResult, CommandResultEmpty}; use common::note::File; use tauri::State; use uuid::Uuid; -use super::{CommandResult, CommandResultEmpty}; use crate::dataans::DataansState; #[instrument(ret, skip(state))] @@ -11,28 +11,23 @@ pub async fn upload_file(state: State<'_, DataansState>, id: Uuid, name: String, Ok(state .file_service .upload_file(id, name, &data, &state.app_data_dir) - .await - .into()) + .await?) } #[instrument(ret, skip(state))] #[tauri::command] pub async fn delete_file(state: State<'_, DataansState>, id: Uuid) -> CommandResultEmpty { - Ok(state.file_service.delete_file(id).await.into()) + Ok(state.file_service.delete_file(id).await?) } #[instrument(ret, skip(state))] #[tauri::command] pub async fn gen_random_avatar(state: State<'_, DataansState>) -> CommandResult { - Ok(state.file_service.gen_random_avatar(&state.app_data_dir).await.into()) + Ok(state.file_service.gen_random_avatar(&state.app_data_dir).await?) } #[instrument(ret, skip(state))] #[tauri::command] pub async fn handle_clipboard_image(state: State<'_, DataansState>) -> CommandResult { - Ok(state - .file_service - .handle_clipboard_image(&state.app_data_dir) - .await - .into()) + Ok(state.file_service.handle_clipboard_image(&state.app_data_dir).await?) } diff --git a/dataans/src-tauri/src/dataans/command/mod.rs b/dataans/src-tauri/src/dataans/command/mod.rs index b8122cc..3876961 100644 --- a/dataans/src-tauri/src/dataans/command/mod.rs +++ b/dataans/src-tauri/src/dataans/command/mod.rs @@ -2,8 +2,3 @@ pub mod export; pub mod file; pub mod note; pub mod space; - -use common::error::{DataansResult, DummyUnit}; - -type CommandResult = Result, ()>; -type CommandResultEmpty = Result, ()>; diff --git a/dataans/src-tauri/src/dataans/command/note.rs b/dataans/src-tauri/src/dataans/command/note.rs index f39b34f..e380075 100644 --- a/dataans/src-tauri/src/dataans/command/note.rs +++ b/dataans/src-tauri/src/dataans/command/note.rs @@ -1,32 +1,32 @@ +use common::error::{CommandResult, CommandResultEmpty}; use common::note::{Id as NoteId, NoteFullOwned, OwnedNote, UpdateNote}; use common::space::Id as SpaceId; use tauri::State; -use super::{CommandResult, CommandResultEmpty}; use crate::dataans::DataansState; #[instrument(ret, skip(state))] #[tauri::command] pub async fn list_notes(state: State<'_, DataansState>, space_id: SpaceId) -> CommandResult> { - Ok(state.note_service.space_notes(space_id).await.into()) + Ok(state.note_service.space_notes(space_id).await?) } #[instrument(ret, skip(state))] #[tauri::command] pub async fn create_note(state: State<'_, DataansState>, note: OwnedNote) -> CommandResultEmpty { - Ok(state.note_service.create_note(note).await.into()) + Ok(state.note_service.create_note(note).await?) } #[instrument(ret, skip(state))] #[tauri::command] pub async fn update_note(state: State<'_, DataansState>, note_data: UpdateNote<'_>) -> CommandResultEmpty { - Ok(state.note_service.update_note(note_data).await.into()) + Ok(state.note_service.update_note(note_data).await?) } #[instrument(ret, skip(state))] #[tauri::command] pub async fn delete_note(state: State<'_, DataansState>, note_id: NoteId) -> CommandResultEmpty { - Ok(state.note_service.delete_note(note_id).await.into()) + Ok(state.note_service.delete_note(note_id).await?) } #[instrument(level = "trace", ret, skip(state))] @@ -36,11 +36,11 @@ pub async fn search_notes_in_space( query: String, space_id: SpaceId, ) -> CommandResult> { - Ok(state.note_service.search_notes_in_space(&query, space_id).await.into()) + Ok(state.note_service.search_notes_in_space(&query, space_id).await?) } #[instrument(level = "trace", ret, skip(state))] #[tauri::command] pub async fn search_notes(state: State<'_, DataansState>, query: String) -> CommandResult> { - Ok(state.note_service.search_notes(&query).await.into()) + Ok(state.note_service.search_notes(&query).await?) } diff --git a/dataans/src-tauri/src/dataans/command/space.rs b/dataans/src-tauri/src/dataans/command/space.rs index dd9f639..cce25d1 100644 --- a/dataans/src-tauri/src/dataans/command/space.rs +++ b/dataans/src-tauri/src/dataans/command/space.rs @@ -1,29 +1,29 @@ +use common::error::{CommandResult, CommandResultEmpty}; use common::space::{DeleteSpace, OwnedSpace, UpdateSpace}; use tauri::State; -use super::{CommandResult, CommandResultEmpty}; use crate::dataans::DataansState; #[instrument(level = "trace", ret, skip(state))] #[tauri::command] pub async fn list_spaces(state: State<'_, DataansState>) -> CommandResult> { - Ok(state.space_service.spaces().await.into()) + Ok(state.space_service.spaces().await?) } #[instrument(level = "trace", ret, skip(state))] #[tauri::command] pub async fn create_space(state: State<'_, DataansState>, space_data: OwnedSpace) -> CommandResultEmpty { - Ok(state.space_service.create_space(space_data).await.into()) + Ok(state.space_service.create_space(space_data).await?) } #[instrument(level = "trace", ret, skip(state))] #[tauri::command] pub async fn update_space(state: State<'_, DataansState>, space_data: UpdateSpace<'static>) -> CommandResultEmpty { - Ok(state.space_service.update_space(space_data).await.into()) + Ok(state.space_service.update_space(space_data).await?) } #[instrument(level = "trace", ret, skip(state))] #[tauri::command] pub async fn delete_space(state: State<'_, DataansState>, space_data: DeleteSpace) -> CommandResultEmpty { - Ok(state.space_service.delete_space(space_data).await.into()) + Ok(state.space_service.delete_space(space_data).await?) } diff --git a/dataans/src-tauri/src/dataans/error.rs b/dataans/src-tauri/src/dataans/error.rs index 0898d4a..4d96202 100644 --- a/dataans/src-tauri/src/dataans/error.rs +++ b/dataans/src-tauri/src/dataans/error.rs @@ -1,6 +1,7 @@ use std::io::Error as IoError; use std::path::PathBuf; +use common::error::CommandError; use thiserror::Error; use crate::dataans::db::DbError; @@ -34,3 +35,10 @@ pub enum DataansError { #[error("Can not create an image from raw image data")] ImageFromRaw, } + +impl From for CommandError { + fn from(error: DataansError) -> Self { + // TODO: + Self::Other(error.to_string()) + } +} From c06522c1e028b984674a9b9600f6383ae837276e Mon Sep 17 00:00:00 2001 From: Pavlo Myroniuk Date: Fri, 3 Jan 2025 21:33:03 +0200 Subject: [PATCH 3/6] refactor(front): error handling; --- dataans/common/src/error.rs | 33 ++++------- dataans/src-tauri/src/dataans/error.rs | 2 +- dataans/src/app.rs | 22 +++++--- dataans/src/app_info/app_info_window.rs | 18 ++++-- dataans/src/app_info/export.rs | 2 +- dataans/src/backend/autostart.rs | 21 +++---- dataans/src/backend/export.rs | 17 +++--- dataans/src/backend/file.rs | 46 +++++++--------- dataans/src/backend/mod.rs | 52 +++++++----------- dataans/src/backend/notes.rs | 73 +++++++++++++------------ dataans/src/backend/spaces.rs | 47 ++++++++-------- dataans/src/common/attachment.rs | 4 +- dataans/src/notes/md_node/code_block.rs | 2 +- 13 files changed, 164 insertions(+), 175 deletions(-) diff --git a/dataans/common/src/error.rs b/dataans/common/src/error.rs index 0285692..32cdfdc 100644 --- a/dataans/common/src/error.rs +++ b/dataans/common/src/error.rs @@ -1,29 +1,20 @@ -use std::path::PathBuf; +use std::fmt; use serde::{Deserialize, Serialize}; +/// Command Error. #[derive(Debug, Serialize, Deserialize)] pub enum CommandError { - /// DbError. - DbError(String), - /// IO error. - IoError(String), - /// JSON error. - JsonError(String), - /// Time format error. - TimeFormatError(String), - /// Path is not UTF-8. - PathIsNotUtf8(PathBuf), - /// Clipboard error. - Clipboard(String), - /// Image error. - Image(String), - /// Image generation error. - ImageGeneration(String), - /// Image from raw error. - ImageFromRaw, - /// Other. - Other(String), + /// Dataans inner error. + Dataans(String), + /// Error parsing error. + FromJsValue(String), +} + +impl fmt::Display for CommandError { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + write!(f, "{:?}", self) + } } /// TODO. diff --git a/dataans/src-tauri/src/dataans/error.rs b/dataans/src-tauri/src/dataans/error.rs index 4d96202..bb9bf7d 100644 --- a/dataans/src-tauri/src/dataans/error.rs +++ b/dataans/src-tauri/src/dataans/error.rs @@ -39,6 +39,6 @@ pub enum DataansError { impl From for CommandError { fn from(error: DataansError) -> Self { // TODO: - Self::Other(error.to_string()) + Self::Dataans(error.to_string()) } } diff --git a/dataans/src/app.rs b/dataans/src/app.rs index 75e3d77..941e405 100644 --- a/dataans/src/app.rs +++ b/dataans/src/app.rs @@ -51,16 +51,24 @@ pub fn App() -> impl IntoView { let global_config = expect_context::>(); spawn_local(async move { - let config = load_config().await; - info!("config: {:?}", config); + match load_config().await { + Ok(config) => { + info!("{:?}", config); - let theme = config.appearance.theme.clone(); + let theme = config.appearance.theme.clone(); - global_config.set(config.clone()); - set_config.set(config); + global_config.set(config.clone()); + set_config.set(config); - let theme = load_theme(&theme).await; - set_theme_css.set(theme.to_css()); + // TODO. + let theme = load_theme(&theme).await.unwrap(); + set_theme_css.set(theme.to_css()); + } + Err(err) => { + error!("{:?}", err); + // TODO: toastr. + } + } }); let global_state = expect_context::>(); diff --git a/dataans/src/app_info/app_info_window.rs b/dataans/src/app_info/app_info_window.rs index de8f183..c9210db 100644 --- a/dataans/src/app_info/app_info_window.rs +++ b/dataans/src/app_info/app_info_window.rs @@ -21,15 +21,25 @@ pub fn AppInfoWindow(#[prop(into)] close: Callback<(), ()>) -> impl IntoView { let enable_autostart = move |_| { spawn_local(async move { - let flag = crate::backend::autostart::enable().await; - set_autostart.set(flag); + match crate::backend::autostart::enable().await { + Ok(flag) => set_autostart.set(flag), + Err(err) => { + error!("{:?}", err); + // TODO: toastr. + } + } }) }; let disable_autostart = move |_| { spawn_local(async move { - let flag = crate::backend::autostart::disable().await; - set_autostart.set(flag); + match crate::backend::autostart::disable().await { + Ok(flag) => set_autostart.set(flag), + Err(err) => { + error!("{:?}", err); + // TODO: toastr. + } + } }) }; diff --git a/dataans/src/app_info/export.rs b/dataans/src/app_info/export.rs index a1689e1..6811c7e 100644 --- a/dataans/src/app_info/export.rs +++ b/dataans/src/app_info/export.rs @@ -19,7 +19,7 @@ pub fn Export() -> impl IntoView { async move { match export_data(export_config).await { Ok(backup_dir) => set_backup_dir.set(Some(backup_dir)), - Err(err) => error!("{}", err), + Err(err) => error!("{:?}", err), } } }); diff --git a/dataans/src/backend/autostart.rs b/dataans/src/backend/autostart.rs index e903de3..aba8371 100644 --- a/dataans/src/backend/autostart.rs +++ b/dataans/src/backend/autostart.rs @@ -1,27 +1,24 @@ // https://github.com/tauri-apps/plugins-workspace/blob/715a0477be8f6f77af0377f4eca2b649554446be/plugins/autostart/api-iife.js -use serde_wasm_bindgen::{from_value, to_value}; +use common::error::CommandResult; -use crate::backend::{invoke, EmptyArgs}; +use crate::backend::{invoke_command, EmptyArgs}; -pub async fn enable() -> bool { - let args = to_value(&EmptyArgs {}).expect("EmptyArgs serialization to JsValue should not fail."); - invoke("plugin:autostart|enable", args).await; +pub async fn enable() -> CommandResult { + let _: () = invoke_command("plugin:autostart|enable", &EmptyArgs {}).await?; is_enabled().await } -pub async fn disable() -> bool { - let args = to_value(&EmptyArgs {}).expect("EmptyArgs serialization to JsValue should not fail."); - invoke("plugin:autostart|disable", args).await; +pub async fn disable() -> CommandResult { + let _: () = invoke_command("plugin:autostart|disable", &EmptyArgs {}).await?; is_enabled().await } -pub async fn is_enabled() -> bool { - let args = to_value(&EmptyArgs {}).expect("EmptyArgs serialization to JsValue should not fail."); - let is_enabled = invoke("plugin:autostart|is_enabled", args).await; +pub async fn is_enabled() -> CommandResult { + let is_enabled = invoke_command("plugin:autostart|is_enabled", &EmptyArgs {}).await?; trace!("Is autostart enabled: {:?}.", is_enabled); - from_value(is_enabled).expect("bool deserialization from JsValue should not fail.") + Ok(is_enabled) } diff --git a/dataans/src/backend/export.rs b/dataans/src/backend/export.rs index d74a909..fd5f798 100644 --- a/dataans/src/backend/export.rs +++ b/dataans/src/backend/export.rs @@ -1,11 +1,10 @@ use std::path::PathBuf; +use common::error::CommandResult; use common::{DataExportConfig, APP_PLUGIN_NAME}; use serde::Serialize; -use serde_wasm_bindgen::to_value; -use super::from_js_value; -use crate::backend::invoke; +use crate::backend::invoke_command; #[derive(Serialize)] #[serde(rename_all = "camelCase")] @@ -13,10 +12,10 @@ struct ExportConfig { export_config: DataExportConfig, } -pub async fn export_data(export_config: DataExportConfig) -> Result { - let args = - to_value(&ExportConfig { export_config }).expect("ExportConfig serialization to JsValue should not fail."); - let backup_path = invoke(&format!("plugin:{}|export_app_data", APP_PLUGIN_NAME), args).await; - - from_js_value(backup_path) +pub async fn export_data(export_config: DataExportConfig) -> CommandResult { + invoke_command( + &format!("plugin:{}|export_app_data", APP_PLUGIN_NAME), + &ExportConfig { export_config }, + ) + .await } diff --git a/dataans/src/backend/file.rs b/dataans/src/backend/file.rs index e260da9..c494a6a 100644 --- a/dataans/src/backend/file.rs +++ b/dataans/src/backend/file.rs @@ -1,12 +1,12 @@ use std::path::Path; +use common::error::{CommandResult, CommandResultEmpty}; use common::note::File; use common::APP_PLUGIN_NAME; use serde::Serialize; -use serde_wasm_bindgen::to_value; use uuid::Uuid; -use super::{from_js_value, invoke, DummyResult, EmptyArgs}; +use crate::backend::{invoke_command, EmptyArgs}; #[derive(Serialize)] #[serde(rename_all = "camelCase")] @@ -16,11 +16,12 @@ struct FileData<'name, 'data> { data: &'data [u8], } -pub async fn upload_file(id: Uuid, name: &str, data: &[u8]) -> Result { - let args = to_value(&FileData { id, name, data }).expect("FileData serialization to JsValue should not fail."); - let file = invoke(&format!("plugin:{}|upload_file", APP_PLUGIN_NAME), args).await; - - from_js_value(file) +pub async fn upload_file(id: Uuid, name: &str, data: &[u8]) -> CommandResult { + invoke_command( + &format!("plugin:{}|upload_file", APP_PLUGIN_NAME), + &FileData { id, name, data }, + ) + .await } #[derive(Serialize)] @@ -29,25 +30,20 @@ struct FileId { id: Uuid, } -pub async fn remove_file(id: Uuid) -> DummyResult { - let args = to_value(&FileId { id }).expect("FileId serialization to JsValue should not fail."); - let result = invoke(&format!("plugin:{}|delete_file", APP_PLUGIN_NAME), args).await; - - from_js_value(result) +pub async fn remove_file(id: Uuid) -> CommandResultEmpty { + invoke_command(&format!("plugin:{}|delete_file", APP_PLUGIN_NAME), &FileId { id }).await } -pub async fn gen_avatar() -> Result { - let args = to_value(&EmptyArgs {}).expect("EmptyArgs serialization to JsValue should not fail."); - let image = invoke(&format!("plugin:{}|gen_random_avatar", APP_PLUGIN_NAME), args).await; - - from_js_value(image) +pub async fn gen_avatar() -> CommandResult { + invoke_command(&format!("plugin:{}|gen_random_avatar", APP_PLUGIN_NAME), &EmptyArgs {}).await } -pub async fn load_clipboard_image() -> Result { - let args = to_value(&EmptyArgs {}).expect("EmptyArgs serialization to JsValue should not fail."); - let image = invoke(&format!("plugin:{}|handle_clipboard_image", APP_PLUGIN_NAME), args).await; - - from_js_value(image) +pub async fn load_clipboard_image() -> CommandResult { + invoke_command( + &format!("plugin:{}|handle_clipboard_image", APP_PLUGIN_NAME), + &EmptyArgs {}, + ) + .await } #[derive(Serialize)] @@ -57,11 +53,9 @@ struct FilePath<'path> { } pub async fn open(path: &Path) { - let args = to_value(&FilePath { path }).expect("FilePath serialization to JsValue should not fail."); - let _ = invoke("open", args).await; + let _: CommandResultEmpty = invoke_command("open", &FilePath { path }).await; } pub async fn reveal(path: &Path) { - let args = to_value(&FilePath { path }).expect("FilePath serialization to JsValue should not fail."); - let _ = invoke("reveal", args).await; + let _: CommandResultEmpty = invoke_command("reveal", &FilePath { path }).await; } diff --git a/dataans/src/backend/mod.rs b/dataans/src/backend/mod.rs index 0cd4c81..1a63671 100644 --- a/dataans/src/backend/mod.rs +++ b/dataans/src/backend/mod.rs @@ -6,14 +6,13 @@ pub mod spaces; use std::path::Path; +use common::error::{CommandError, CommandResult, CommandResultEmpty}; use common::{Config, Theme}; use serde::Serialize; use serde_wasm_bindgen::{from_value, to_value}; use wasm_bindgen::prelude::wasm_bindgen; use wasm_bindgen::JsValue; -pub type DummyResult = Result; - /// Accepts image fs path and returns its Tauri asset url. pub fn convert_file_src(image_path: impl AsRef) -> String { let image_path = image_path.as_ref(); @@ -34,17 +33,19 @@ pub fn convert_file_src(image_path: impl AsRef) -> String { #[wasm_bindgen] extern "C" { - #[wasm_bindgen(js_namespace = ["window", "__TAURI__", "core"])] - async fn invoke(cmd: &str, args: JsValue) -> JsValue; + #[wasm_bindgen(js_namespace = ["window", "__TAURI__", "core"], catch)] + async fn invoke(cmd: &str, args: JsValue) -> Result; } -fn from_js_value(value: JsValue) -> Result { - use common::error::DataansResult; - use serde_wasm_bindgen::from_value; +pub async fn invoke_command(command: &str, args: &impl Serialize) -> CommandResult { + let theme_value = invoke( + command, + to_value(&args).map_err(|err| CommandError::FromJsValue(err.to_string()))?, + ) + .await + .map_err(|err| from_value::(err).unwrap_or_else(|err| CommandError::FromJsValue(err.to_string())))?; - from_value::>(value) - .expect("DataansResult deserialization should not fail") - .into() + from_value(theme_value).map_err(|err| CommandError::FromJsValue(err.to_string())) } #[derive(Serialize)] @@ -53,36 +54,27 @@ struct ThemeFilepath<'path> { file_path: &'path Path, } -pub async fn load_theme(file_path: &Path) -> Theme { - let args = to_value(&ThemeFilepath { file_path }).expect("ThemeFilepath serialization to JsValue should not fail."); - let theme_value = invoke("theme", args).await; - - from_value(theme_value).expect("Theme object deserialization from JsValue should not fail.") +pub async fn load_theme(file_path: &Path) -> CommandResult { + invoke_command("theme", &ThemeFilepath { file_path }).await } #[derive(Serialize)] pub struct EmptyArgs {} pub async fn open_config_file() { - let args = to_value(&EmptyArgs {}).expect("EmptyArgs serialization to JsValue should not fail."); - let _ = invoke("open_config_file", args).await; + let _: CommandResultEmpty = invoke_command("open_config_file", &EmptyArgs {}).await; } pub async fn open_theme_file(file_path: &Path) { - let args = to_value(&ThemeFilepath { file_path }).expect("ThemeFilepath serialization to JsValue should not fail."); - let _ = invoke("open_theme_file", args).await; + let _: CommandResultEmpty = invoke_command("open_theme_file", &ThemeFilepath { file_path }).await; } pub async fn open_config_file_folder() { - let args = to_value(&EmptyArgs {}).expect("EmptyArgs serialization to JsValue should not fail."); - let _ = invoke("open_config_file_folder", args).await; + let _: CommandResultEmpty = invoke_command("open_config_file_folder", &EmptyArgs {}).await; } -pub async fn load_config() -> Config { - let args = to_value(&EmptyArgs {}).expect("EmptyArgs serialization to JsValue should not fail."); - let theme_value = invoke("config", args).await; - - from_value(theme_value).expect("Config object deserialization from JsValue should not fail.") +pub async fn load_config() -> CommandResult { + invoke_command("config", &EmptyArgs {}).await } #[derive(Serialize)] @@ -92,10 +84,6 @@ struct ParseCodeArgs<'lang, 'code> { code: &'code str, } -pub async fn parse_code(lang: &str, code: &str) -> String { - let args = - to_value(&ParseCodeArgs { lang, code }).expect("ParseCodeArgs serialization to JsValue should not fail."); - let html = invoke("parse_code", args).await; - - from_value(html).expect("String object deserialization from JsValue should not fail.") +pub async fn parse_code(lang: &str, code: &str) -> CommandResult { + invoke_command("parse_code", &ParseCodeArgs { lang, code }).await } diff --git a/dataans/src/backend/notes.rs b/dataans/src/backend/notes.rs index be034bb..ab76ac6 100644 --- a/dataans/src/backend/notes.rs +++ b/dataans/src/backend/notes.rs @@ -1,11 +1,10 @@ +use common::error::{CommandResult, CommandResultEmpty}; use common::note::{Id as NoteId, Note, NoteFullOwned, OwnedNote, UpdateNote}; use common::space::Id as SpaceId; use common::APP_PLUGIN_NAME; use serde::Serialize; -use serde_wasm_bindgen::to_value; -use super::{from_js_value, DummyResult}; -use crate::backend::invoke; +use crate::backend::invoke_command; #[derive(Serialize)] #[serde(rename_all = "camelCase")] @@ -13,11 +12,12 @@ struct ListNotesArgs { pub space_id: SpaceId, } -pub async fn list_notes(space_id: SpaceId) -> Result, String> { - let args = to_value(&ListNotesArgs { space_id }).expect("ListNotesArgs serialization to JsValue should not fail."); - let notes = invoke(&format!("plugin:{}|list_notes", APP_PLUGIN_NAME), args).await; - - from_js_value(notes) +pub async fn list_notes(space_id: SpaceId) -> CommandResult> { + invoke_command( + &format!("plugin:{}|list_notes", APP_PLUGIN_NAME), + &ListNotesArgs { space_id }, + ) + .await } #[derive(Serialize)] @@ -26,11 +26,12 @@ struct CreateNoteArgs<'text> { pub note: Note<'text>, } -pub async fn create_note(note: Note<'_>) -> DummyResult { - let args = to_value(&CreateNoteArgs { note }).expect("CreateNoteArgs serialization to JsValue should not fail."); - let result = invoke(&format!("plugin:{}|create_note", APP_PLUGIN_NAME), args).await; - - from_js_value(result) +pub async fn create_note(note: Note<'_>) -> CommandResultEmpty { + invoke_command( + &format!("plugin:{}|create_note", APP_PLUGIN_NAME), + &CreateNoteArgs { note }, + ) + .await } #[derive(Serialize)] @@ -39,12 +40,12 @@ struct UpdateNoteArgs<'text> { pub note_data: UpdateNote<'text>, } -pub async fn update_note(note_data: UpdateNote<'_>) -> DummyResult { - let args = - to_value(&UpdateNoteArgs { note_data }).expect("UpdateNoteArgs serialization to JsValue should not fail."); - let result = invoke(&format!("plugin:{}|update_note", APP_PLUGIN_NAME), args).await; - - from_js_value(result) +pub async fn update_note(note_data: UpdateNote<'_>) -> CommandResultEmpty { + invoke_command( + &format!("plugin:{}|update_note", APP_PLUGIN_NAME), + &UpdateNoteArgs { note_data }, + ) + .await } #[derive(Serialize)] @@ -53,11 +54,12 @@ struct DeleteNoteArgs { pub note_id: NoteId, } -pub async fn delete_note(note_id: NoteId) -> DummyResult { - let args = to_value(&DeleteNoteArgs { note_id }).expect("DeleteNoteArgs serialization to JsValue should not fail."); - let result = invoke(&format!("plugin:{}|delete_note", APP_PLUGIN_NAME), args).await; - - from_js_value(result) +pub async fn delete_note(note_id: NoteId) -> CommandResultEmpty { + invoke_command( + &format!("plugin:{}|delete_note", APP_PLUGIN_NAME), + &DeleteNoteArgs { note_id }, + ) + .await } #[derive(Serialize)] @@ -67,12 +69,12 @@ struct SearchNotesInSpaceArgs<'query> { pub query: &'query str, } -pub async fn search_notes_in_space(space_id: SpaceId, query: &str) -> Result, String> { - let args = to_value(&SearchNotesInSpaceArgs { space_id, query }) - .expect("SearchNotesInSpaceArgs serialization to JsValue should not fail."); - let notes = invoke(&format!("plugin:{}|search_notes_in_space", APP_PLUGIN_NAME), args).await; - - from_js_value(notes) +pub async fn search_notes_in_space(space_id: SpaceId, query: &str) -> CommandResult> { + invoke_command( + &format!("plugin:{}|search_notes_in_space", APP_PLUGIN_NAME), + &SearchNotesInSpaceArgs { space_id, query }, + ) + .await } #[derive(Serialize)] @@ -81,9 +83,10 @@ struct SearchNotesArgs<'query> { pub query: &'query str, } -pub async fn search_notes(query: &str) -> Result, String> { - let args = to_value(&SearchNotesArgs { query }).expect("SearchNotesArgs serialization to JsValue should not fail."); - let notes = invoke(&format!("plugin:{}|search_notes", APP_PLUGIN_NAME), args).await; - - from_js_value(notes) +pub async fn search_notes(query: &str) -> CommandResult> { + invoke_command( + &format!("plugin:{}|search_notes", APP_PLUGIN_NAME), + &SearchNotesArgs { query }, + ) + .await } diff --git a/dataans/src/backend/spaces.rs b/dataans/src/backend/spaces.rs index b1759f3..5bfb093 100644 --- a/dataans/src/backend/spaces.rs +++ b/dataans/src/backend/spaces.rs @@ -1,16 +1,12 @@ +use common::error::{CommandResult, CommandResultEmpty}; use common::space::{DeleteSpace, OwnedSpace, Space, UpdateSpace}; use common::APP_PLUGIN_NAME; use serde::{Deserialize, Serialize}; -use serde_wasm_bindgen::to_value; -use super::{from_js_value, DummyResult}; -use crate::backend::{invoke, EmptyArgs}; +use crate::backend::{invoke_command, EmptyArgs}; -pub async fn list_spaces() -> Result, String> { - let args = to_value(&EmptyArgs {}).expect("EmptyArgs serialization to JsValue should not fail."); - let spaces = invoke(&format!("plugin:{}|list_spaces", APP_PLUGIN_NAME), args).await; - - from_js_value(spaces) +pub async fn list_spaces() -> CommandResult> { + invoke_command(&format!("plugin:{}|list_spaces", APP_PLUGIN_NAME), &EmptyArgs {}).await } #[derive(Serialize, Deserialize)] @@ -19,11 +15,12 @@ struct CreateSpaceArgs<'name, 'avatar> { space_data: Space<'name, 'avatar>, } -pub async fn create_space(space_data: Space<'_, '_>) -> DummyResult { - let args = to_value(&CreateSpaceArgs { space_data }).expect("Space serialization to JsValue should not fail."); - let result = invoke(&format!("plugin:{}|create_space", APP_PLUGIN_NAME), args).await; - - from_js_value(result) +pub async fn create_space(space_data: Space<'_, '_>) -> CommandResultEmpty { + invoke_command( + &format!("plugin:{}|create_space", APP_PLUGIN_NAME), + &CreateSpaceArgs { space_data }, + ) + .await } #[derive(Serialize, Deserialize)] @@ -32,12 +29,12 @@ struct UpdateSpaceArgs<'name> { space_data: UpdateSpace<'name>, } -pub async fn update_space(space_data: UpdateSpace<'_>) -> DummyResult { - let args = - to_value(&UpdateSpaceArgs { space_data }).expect("UpdateSpace serialization to JsValue should not fail."); - let result = invoke(&format!("plugin:{}|update_space", APP_PLUGIN_NAME), args).await; - - from_js_value(result) +pub async fn update_space(space_data: UpdateSpace<'_>) -> CommandResultEmpty { + invoke_command( + &format!("plugin:{}|update_space", APP_PLUGIN_NAME), + &UpdateSpaceArgs { space_data }, + ) + .await } #[derive(Serialize, Deserialize)] @@ -46,10 +43,10 @@ struct DeleteSpaceArgs { space_data: DeleteSpace, } -pub async fn delete_space(space_data: DeleteSpace) -> DummyResult { - let args = - to_value(&DeleteSpaceArgs { space_data }).expect("DeleteSpace serialization to JsValue should not fail."); - let result = invoke(&format!("plugin:{}|delete_space", APP_PLUGIN_NAME), args).await; - - from_js_value(result) +pub async fn delete_space(space_data: DeleteSpace) -> CommandResultEmpty { + invoke_command( + &format!("plugin:{}|delete_space", APP_PLUGIN_NAME), + &DeleteSpaceArgs { space_data }, + ) + .await } diff --git a/dataans/src/common/attachment.rs b/dataans/src/common/attachment.rs index e0ac638..4cb0c81 100644 --- a/dataans/src/common/attachment.rs +++ b/dataans/src/common/attachment.rs @@ -58,5 +58,7 @@ async fn upload_file(blob: Blob, name: String, id: Uuid) -> Result let mut file_bytes = vec![0; file_raw_data.length() as usize]; file_raw_data.copy_to(file_bytes.as_mut_slice()); - crate::backend::file::upload_file(id, &name, &file_bytes).await + crate::backend::file::upload_file(id, &name, &file_bytes) + .await + .map_err(|err| err.to_string()) } diff --git a/dataans/src/notes/md_node/code_block.rs b/dataans/src/notes/md_node/code_block.rs index a554de1..be35b80 100644 --- a/dataans/src/notes/md_node/code_block.rs +++ b/dataans/src/notes/md_node/code_block.rs @@ -11,7 +11,7 @@ pub fn CodeBlock(code: String, lang: String) -> impl IntoView { move |_| { let code_value = code_value.clone(); let lang = language.clone(); - async move { parse_code(&lang, &code_value).await } + async move { parse_code(&lang, &code_value).await.unwrap_or(code_value.clone()) } }, ); From fdb66d498320d116bc8aa1daec2b1ea803d0787d Mon Sep 17 00:00:00 2001 From: Pavlo Myroniuk Date: Fri, 3 Jan 2025 21:52:29 +0200 Subject: [PATCH 4/6] fix(front): modal window z-index; --- dataans/public/css/modal.css | 1 + 1 file changed, 1 insertion(+) diff --git a/dataans/public/css/modal.css b/dataans/public/css/modal.css index 66431da..ef30bef 100644 --- a/dataans/public/css/modal.css +++ b/dataans/public/css/modal.css @@ -9,4 +9,5 @@ justify-content: center; align-items: center; background-color: rgba(0.3, 0.3, 0.3, 0.7); + z-index: 2; } From c45c2acc687add9214022a93f060f9f6f1bed0a6 Mon Sep 17 00:00:00 2001 From: Pavlo Myroniuk Date: Fri, 3 Jan 2025 21:59:15 +0200 Subject: [PATCH 5/6] feat(front): add folder light icon; --- .../public/icons/{folder.png => folder-dark.png} | Bin dataans/public/icons/folder-light.png | Bin 0 -> 290 bytes dataans/src/app_info/app_info_window.rs | 4 ++-- dataans/src/app_info/export.rs | 2 +- dataans/src/common/file.rs | 2 +- 5 files changed, 4 insertions(+), 4 deletions(-) rename dataans/public/icons/{folder.png => folder-dark.png} (100%) create mode 100644 dataans/public/icons/folder-light.png diff --git a/dataans/public/icons/folder.png b/dataans/public/icons/folder-dark.png similarity index 100% rename from dataans/public/icons/folder.png rename to dataans/public/icons/folder-dark.png diff --git a/dataans/public/icons/folder-light.png b/dataans/public/icons/folder-light.png new file mode 100644 index 0000000000000000000000000000000000000000..2c706a2a7d8e9c238f841bab9da868116bff6e0f GIT binary patch literal 290 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA1|-9oezpTC&H|6fVg?3oVGw3ym^DWND0s!w z#WAE}&f6J|T+I$VuD0&G-$_>Oo#$p^-+0fPYn%9tN$*}|U6C|?P(NYrq56M0KGy}E zI25@=LR!=RxV~U0iGKU1_{gu8+chzIL*Rl z3*LK)wDxK^lG|q2JZ%q8kew&sbYkTX YrnvAsnwMWM1cd^Fr>mdKI;Vst03}at^8f$< literal 0 HcmV?d00001 diff --git a/dataans/src/app_info/app_info_window.rs b/dataans/src/app_info/app_info_window.rs index c9210db..062ec79 100644 --- a/dataans/src/app_info/app_info_window.rs +++ b/dataans/src/app_info/app_info_window.rs @@ -63,7 +63,7 @@ pub fn AppInfoWindow(#[prop(into)] close: Callback<(), ()>) -> impl IntoView { title="Open config file location" on:click=open_config_file_folder > - edit note + edit note {move || if is_autostart_enabled.get() {view! { @@ -122,7 +122,7 @@ pub fn AppInfoWindow(#[prop(into)] close: Callback<(), ()>) -> impl IntoView { title="Open theme file location" on:click=move |_| open_theme_file(theme.clone()) > - edit note + edit note diff --git a/dataans/src/app_info/export.rs b/dataans/src/app_info/export.rs index 6811c7e..e7a452f 100644 --- a/dataans/src/app_info/export.rs +++ b/dataans/src/app_info/export.rs @@ -102,7 +102,7 @@ pub fn Export() -> impl IntoView { title="Open backup folder" on:click=move |_| open_backup_folder(backup_dir.clone()) > - edit note + edit note } }} diff --git a/dataans/src/common/file.rs b/dataans/src/common/file.rs index 640574a..c8294a1 100644 --- a/dataans/src/common/file.rs +++ b/dataans/src/common/file.rs @@ -32,7 +32,7 @@ pub fn File(file: File, edit_mode: bool, #[prop(into)] remove_file: Callback + } }} From c13207ecad76526e8220ac5d960caea685c131f5 Mon Sep 17 00:00:00 2001 From: Pavlo Myroniuk Date: Fri, 3 Jan 2025 22:11:22 +0200 Subject: [PATCH 6/6] refactor: small refactoring; --- dataans/common/src/error.rs | 17 +++++++++++------ dataans/common/src/lib.rs | 2 +- dataans/src-tauri/src/dataans/error.rs | 1 - dataans/src/backend/mod.rs | 6 +++--- 4 files changed, 15 insertions(+), 11 deletions(-) diff --git a/dataans/common/src/error.rs b/dataans/common/src/error.rs index 32cdfdc..7012f3f 100644 --- a/dataans/common/src/error.rs +++ b/dataans/common/src/error.rs @@ -2,13 +2,15 @@ use std::fmt; use serde::{Deserialize, Serialize}; -/// Command Error. +/// Error object returned from the Tauri command. +/// +/// [CommandError] is shared between app frontend and backend. #[derive(Debug, Serialize, Deserialize)] pub enum CommandError { - /// Dataans inner error. + /// Any error inside app backend. Dataans(String), - /// Error parsing error. - FromJsValue(String), + /// Error during deserialization from [JsValue] or serialization into [JsValue]. + JsValue(String), } impl fmt::Display for CommandError { @@ -17,7 +19,10 @@ impl fmt::Display for CommandError { } } -/// TODO. +/// Result type of the Tauri command. pub type CommandResult = Result; -/// TODO. + +/// Empty Tauri command result. +/// +/// Use this type when the Tauri command should not return any data but may fail. pub type CommandResultEmpty = Result<(), CommandError>; diff --git a/dataans/common/src/lib.rs b/dataans/common/src/lib.rs index df2ddd7..a346938 100644 --- a/dataans/common/src/lib.rs +++ b/dataans/common/src/lib.rs @@ -1,7 +1,7 @@ #![doc = include_str!("../README.md")] #![warn(missing_docs)] -/// Contains general error type for tauri frontend and backend. +/// Contains general error and result types for Tauri commands. pub mod error; /// Contains schema definitions for data export. pub mod export; diff --git a/dataans/src-tauri/src/dataans/error.rs b/dataans/src-tauri/src/dataans/error.rs index bb9bf7d..cc2c2ed 100644 --- a/dataans/src-tauri/src/dataans/error.rs +++ b/dataans/src-tauri/src/dataans/error.rs @@ -38,7 +38,6 @@ pub enum DataansError { impl From for CommandError { fn from(error: DataansError) -> Self { - // TODO: Self::Dataans(error.to_string()) } } diff --git a/dataans/src/backend/mod.rs b/dataans/src/backend/mod.rs index 1a63671..3fc58f0 100644 --- a/dataans/src/backend/mod.rs +++ b/dataans/src/backend/mod.rs @@ -40,12 +40,12 @@ extern "C" { pub async fn invoke_command(command: &str, args: &impl Serialize) -> CommandResult { let theme_value = invoke( command, - to_value(&args).map_err(|err| CommandError::FromJsValue(err.to_string()))?, + to_value(&args).map_err(|err| CommandError::JsValue(err.to_string()))?, ) .await - .map_err(|err| from_value::(err).unwrap_or_else(|err| CommandError::FromJsValue(err.to_string())))?; + .map_err(|err| from_value::(err).unwrap_or_else(|err| CommandError::JsValue(err.to_string())))?; - from_value(theme_value).map_err(|err| CommandError::FromJsValue(err.to_string())) + from_value(theme_value).map_err(|err| CommandError::JsValue(err.to_string())) } #[derive(Serialize)]