diff --git a/.github/workflows/lang-python.yml b/.github/workflows/lang-python.yml index 349ec65d..c1f1fd33 100644 --- a/.github/workflows/lang-python.yml +++ b/.github/workflows/lang-python.yml @@ -4,8 +4,11 @@ on: push: branches: - main - - master + - release pull_request: + branches: + - main + - release jobs: linux: @@ -54,7 +57,7 @@ jobs: release: name: Release runs-on: ubuntu-latest - if: "startsWith(github.ref, 'refs/tags/')" + if: startsWith(github.ref, 'refs/tags/') needs: [ macos, windows, linux ] steps: - uses: actions/download-artifact@v2 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 11b4d5ca..d2c50f2d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,5 +1,9 @@ name: 'test tauri on pr' -on: [pull_request] +on: + pull_request: + branches: + - main + - release jobs: test-tauri: diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index 9c22b6da..9d6ca962 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -1,6 +1,9 @@ name: 'update' -on: pull_request +on: + pull_request: + branches: + - release jobs: create-release: diff --git a/.gitignore b/.gitignore index cbaa150f..530c395f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,7 @@ # packages /0.9 /releases -/watcher +/resources # general /tags diff --git a/Cargo.lock b/Cargo.lock index 04cc6230..cc9829a9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,6 +2,15 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "addr2line" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +dependencies = [ + "gimli", +] + [[package]] name = "adler" version = "1.0.2" @@ -10,9 +19,9 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "aho-corasick" -version = "0.7.20" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" dependencies = [ "memchr", ] @@ -32,6 +41,12 @@ dependencies = [ "alloc-no-stdlib", ] +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + [[package]] name = "android_system_properties" version = "0.1.5" @@ -41,11 +56,59 @@ dependencies = [ "libc", ] +[[package]] +name = "anstream" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ab91ebe16eb252986481c5b62f6098f3b698a45e34b5b98200cf20dd2484a44" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" + +[[package]] +name = "anstyle-parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "317b9a89c1868f5ea6ff1d9539a69f45dffc21ce321ac1fd1160dfa48c8e2140" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" +dependencies = [ + "windows-sys", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628" +dependencies = [ + "anstyle", + "windows-sys", +] + [[package]] name = "anyhow" -version = "1.0.70" +version = "1.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7de8ce5e0f9f8d88245311066a578d72b7af3e7088f32783804676302df237e4" +checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" [[package]] name = "anymap2" @@ -55,11 +118,12 @@ checksum = "d301b3b94cb4b2f23d7917810addbbaff90738e0ca2be692bd027e70d7e0330c" [[package]] name = "aquamarine" -version = "0.1.12" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a941c39708478e8eea39243b5983f1c42d2717b3620ee91f4a52115fd02ac43f" +checksum = "df752953c49ce90719c7bf1fc587bc8227aed04732ea0c0f85e5397d7fdbd1a1" dependencies = [ - "itertools 0.9.0", + "include_dir", + "itertools", "proc-macro-error", "proc-macro2", "quote", @@ -73,7 +137,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c3d816ce6f0e2909a96830d6911c2aff044370b1ef92d7f267b43bae5addedd" dependencies = [ "atk-sys", - "bitflags", + "bitflags 1.3.2", "glib", "libc", ] @@ -87,42 +151,30 @@ dependencies = [ "glib-sys", "gobject-sys", "libc", - "system-deps 6.0.4", + "system-deps 6.2.0", ] [[package]] -name = "attohttpc" -version = "0.22.0" +name = "autocfg" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fcf00bc6d5abb29b5f97e3c61a90b6d3caa12f3faf897d4a3e3607c050a35a7" -dependencies = [ - "flate2", - "http", - "log", - "native-tls", - "serde", - "serde_json", - "serde_urlencoded", - "url", -] +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] -name = "atty" -version = "0.2.14" +name = "backtrace" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" dependencies = [ - "hermit-abi 0.1.19", + "addr2line", + "cc", + "cfg-if", "libc", - "winapi", + "miniz_oxide", + "object", + "rustc-demangle", ] -[[package]] -name = "autocfg" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" - [[package]] name = "base64" version = "0.13.1" @@ -131,9 +183,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.0" +version = "0.21.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a" +checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" [[package]] name = "bincode" @@ -150,6 +202,12 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "bitflags" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" + [[package]] name = "block" version = "0.1.6" @@ -173,9 +231,9 @@ checksum = "cfa8873f51c92e232f9bac4065cddef41b714152812bfc5f7672ba16d6ef8cd9" [[package]] name = "brotli" -version = "3.3.4" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1a0b1dbcc8ae29329621f8d4f0d835787c1c38bb1401979b49d13b0b305ff68" +checksum = "516074a47ef4bce09577a3b379392300159ce5b1ba2e501ff1c819950066100f" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -184,9 +242,9 @@ dependencies = [ [[package]] name = "brotli-decompressor" -version = "2.3.4" +version = "2.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b6561fd3f895a11e8f72af2cb7d22e08366bebc2b6b57f7744c4bda27034744" +checksum = "4e2e4afe60d7dd600fdd3de8d0f08c2b7ec039712e3b6137ff98b7004e82de4f" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -194,9 +252,9 @@ dependencies = [ [[package]] name = "bstr" -version = "1.4.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d4260bcc2e8fc9df1eac4919a720effeb63a3f0952f5bf4944adfa18897f09" +checksum = "542f33a8835a0884b006a0c3df3dadd99c0c3f296ed26c2fdc8028e01ad6230c" dependencies = [ "memchr", "serde", @@ -204,27 +262,30 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.12.0" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" +checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" [[package]] name = "bytemuck" -version = "1.13.1" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17febce684fd15d89027105661fec94afb475cb995fbc59d2865198446ba2eea" +checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6" [[package]] name = "byteorder" -version = "1.4.3" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" +dependencies = [ + "serde", +] [[package]] name = "cairo-rs" @@ -232,7 +293,7 @@ version = "0.15.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c76ee391b03d35510d9fa917357c7f1855bd9a6659c95a1b392e33f49b3369bc" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cairo-sys-rs", "glib", "libc", @@ -247,26 +308,27 @@ checksum = "3c55d429bef56ac9172d25fecb85dc8068307d17acd74b377866b7a1ef25d3c8" dependencies = [ "glib-sys", "libc", - "system-deps 6.0.4", + "system-deps 6.2.0", ] [[package]] name = "cargo_toml" -version = "0.13.3" +version = "0.15.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497049e9477329f8f6a559972ee42e117487d01d1e8c2cc9f836ea6fa23a9e1a" +checksum = "599aa35200ffff8f04c1925aa1acc92fa2e08874379ef42e210a80e527e60838" dependencies = [ "serde", - "toml 0.5.11", + "toml 0.7.8", ] [[package]] name = "cc" -version = "1.0.79" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" dependencies = [ "jobserver", + "libc", ] [[package]] @@ -283,7 +345,7 @@ checksum = "d38f2da7a0a2c4ccf0065be06397cc26a81f4e528be095826eee9d4adbb8c60f" dependencies = [ "byteorder", "fnv", - "uuid 1.3.1", + "uuid", ] [[package]] @@ -297,11 +359,12 @@ dependencies = [ [[package]] name = "cfg-expr" -version = "0.14.0" +version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a35b255461940a32985c627ce82900867c61db1659764d3675ea81963f72a4c6" +checksum = "03915af431787e6ffdcc74c645077518c6b6e01f80b761e0fbbfa288536311b3" dependencies = [ "smallvec", + "target-lexicon", ] [[package]] @@ -312,68 +375,58 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.24" +version = "0.4.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e3c5919066adf22df73762e50cffcde3a758f2a848b113b586d1f86728b673b" +checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" dependencies = [ + "android-tzdata", "iana-time-zone", "js-sys", - "num-integer", "num-traits", "serde", - "time 0.1.45", "wasm-bindgen", - "winapi", + "windows-targets 0.48.5", ] [[package]] name = "clap" -version = "3.2.23" +version = "4.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71655c45cb9845d3270c9d6df84ebe72b4dad3c2ba3f7023ad47c144e4e473a5" +checksum = "2275f18819641850fa26c89acc84d465c1bf91ce57bc2748b28c420473352f64" dependencies = [ - "atty", - "bitflags", + "clap_builder", "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07cdf1b148b25c1e1f7a42225e30a0d99a615cd4637eae7365548dd4529b95bc" +dependencies = [ + "anstream", + "anstyle", "clap_lex", - "indexmap", - "once_cell", "strsim", - "termcolor", - "textwrap", ] [[package]] name = "clap_derive" -version = "3.2.18" +version = "4.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea0c8bce528c4be4da13ea6fead8965e95b6073585a2f05204bd8f4119f82a65" +checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" dependencies = [ "heck 0.4.1", - "proc-macro-error", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.39", ] [[package]] name = "clap_lex" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" -dependencies = [ - "os_str_bytes", -] - -[[package]] -name = "cluFlock" -version = "1.2.7" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5c0fabbd86438044c17b633a514a4e5512f356ee114d7378665d24212462f88" -dependencies = [ - "libc", - "winapi", -] +checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" [[package]] name = "cocoa" @@ -381,7 +434,7 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f425db7937052c684daec3bd6375c8abe2d146dca4b8b143d6db777c39138f3a" dependencies = [ - "bitflags", + "bitflags 1.3.2", "block", "cocoa-foundation", "core-foundation", @@ -393,35 +446,30 @@ dependencies = [ [[package]] name = "cocoa-foundation" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "931d3837c286f56e3c58423ce4eba12d08db2374461a785c86f672b08b5650d6" +checksum = "8c6234cbb2e4c785b456c0644748b1ac416dd045799740356f8363dfe00c93f7" dependencies = [ - "bitflags", + "bitflags 1.3.2", "block", "core-foundation", "core-graphics-types", - "foreign-types", "libc", "objc", ] -[[package]] -name = "codespan-reporting" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" -dependencies = [ - "termcolor", - "unicode-width", -] - [[package]] name = "color_quant" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" +[[package]] +name = "colorchoice" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" + [[package]] name = "combine" version = "4.6.6" @@ -470,7 +518,7 @@ version = "0.22.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2581bbab3b8ffc6fcbd550bf46c355135d16e9ff2a6ea032ad6b9bf1d7efe4fb" dependencies = [ - "bitflags", + "bitflags 1.3.2", "core-foundation", "core-graphics-types", "foreign-types", @@ -479,21 +527,20 @@ dependencies = [ [[package]] name = "core-graphics-types" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a68b68b3446082644c91ac778bf50cd4104bfb002b5a6a7c44cca5a2c70788b" +checksum = "2bb142d41022986c1d8ff29103a1411c8a3dfad3552f87a4f8dc50d61d4f4e33" dependencies = [ - "bitflags", + "bitflags 1.3.2", "core-foundation", - "foreign-types", "libc", ] [[package]] name = "cpufeatures" -version = "0.2.6" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "280a9f2d8b3a38871a3c8a46fb80db65e5e5ed97da80c4d08bf27fb63e35e181" +checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" dependencies = [ "libc", ] @@ -544,14 +591,14 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.14" +version = "0.9.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46bd5f3f85273295a9d14aedfb86f6aadbff6d8f5295c4a9edb08e819dcf5695" +checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" dependencies = [ "autocfg", "cfg-if", "crossbeam-utils", - "memoffset 0.8.0", + "memoffset", "scopeguard", ] @@ -567,9 +614,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.15" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b" +checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" dependencies = [ "cfg-if", ] @@ -603,12 +650,12 @@ dependencies = [ [[package]] name = "cssparser-macros" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfae75de57f2b2e85e8768c3ea840fd159c8f33e2b6522c7835b7abac81be16e" +checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331" dependencies = [ "quote", - "syn 1.0.109", + "syn 2.0.39", ] [[package]] @@ -621,61 +668,11 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "cty" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35" - -[[package]] -name = "cxx" -version = "1.0.94" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f61f1b6389c3fe1c316bf8a4dccc90a38208354b330925bce1f74a6c4756eb93" -dependencies = [ - "cc", - "cxxbridge-flags", - "cxxbridge-macro", - "link-cplusplus", -] - -[[package]] -name = "cxx-build" -version = "1.0.94" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12cee708e8962df2aeb38f594aae5d827c022b6460ac71a7a3e2c3c2aae5a07b" -dependencies = [ - "cc", - "codespan-reporting", - "once_cell", - "proc-macro2", - "quote", - "scratch", - "syn 2.0.15", -] - -[[package]] -name = "cxxbridge-flags" -version = "1.0.94" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7944172ae7e4068c533afbb984114a56c46e9ccddda550499caa222902c7f7bb" - -[[package]] -name = "cxxbridge-macro" -version = "1.0.94" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2345488264226bf682893e25de0769f3360aac9957980ec49361b083ddaa5bc5" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.15", -] - [[package]] name = "darling" -version = "0.20.1" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0558d22a7b463ed0241e993f76f09f30b126687447751a8638587b864e4b3944" +checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e" dependencies = [ "darling_core", "darling_macro", @@ -683,27 +680,37 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.1" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab8bfa2e259f8ee1ce5e97824a3c55ec4404a0d772ca7fa96bf19f0752a046eb" +checksum = "177e3443818124b357d8e76f53be906d60937f0d3a90773a664fa63fa253e621" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", "strsim", - "syn 2.0.15", + "syn 2.0.39", ] [[package]] name = "darling_macro" -version = "0.20.1" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29a358ff9f12ec09c3e61fef9b5a9902623a695a46a917b07f269bff1445611a" +checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" dependencies = [ "darling_core", "quote", - "syn 2.0.15", + "syn 2.0.39", +] + +[[package]] +name = "deranged" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f32d04922c60427da6f9fef14d042d9edddef64cb9d4ce0d64d0685fbeb1fd3" +dependencies = [ + "powerfmt", + "serde", ] [[package]] @@ -730,6 +737,12 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "deunicode" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a1abaf4d861455be59f64fd2b55606cb151fce304ede7165f410243ce96bde6" + [[package]] name = "dev_utils" version = "0.0.1" @@ -740,12 +753,6 @@ dependencies = [ "thot-core", ] -[[package]] -name = "diff" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" - [[package]] name = "difflib" version = "0.4.0" @@ -754,9 +761,9 @@ checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8" [[package]] name = "digest" -version = "0.10.6" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer", "crypto-common", @@ -764,9 +771,9 @@ dependencies = [ [[package]] name = "dircpy" -version = "0.3.14" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10b6622b9d0dc20c70e74ff24c56493278d7d9299ac8729deb923703616e5a7e" +checksum = "8466f8d28ca6da4c9dfbbef6ad4bff6f2fdd5e412d821025b0d3f0a9d74a8c1e" dependencies = [ "jwalk", "log", @@ -775,9 +782,9 @@ dependencies = [ [[package]] name = "directories" -version = "4.0.1" +version = "5.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f51c5d4ddabd36886dd3e1438cb358cdcb0d7c499cb99cb4ac2e38e18b5cb210" +checksum = "9a49173b84e034382284f27f1af4dcbbd231ffa358c0fe316541a7337f376a35" dependencies = [ "dirs-sys", ] @@ -794,13 +801,14 @@ dependencies = [ [[package]] name = "dirs-sys" -version = "0.3.7" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" +checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" dependencies = [ "libc", + "option-ext", "redox_users", - "winapi", + "windows-sys", ] [[package]] @@ -828,30 +836,43 @@ checksum = "1435fa1053d8b2fbbe9be7e97eca7f33d37b28409959813daefc1446a14247f1" [[package]] name = "dtoa" -version = "0.4.8" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56899898ce76aaf4a0f24d914c97ea6ed976d42fec6ad33fcbb0a1103e07b2b0" +checksum = "dcbb2bf8e87535c23f7a8a321e364ce21462d0ff10cb6407820e8e96dfff6653" [[package]] name = "dtoa-short" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bde03329ae10e79ede66c9ce4dc930aa8599043b0743008548680f25b91502d6" +checksum = "dbaceec3c6e4211c79e7b1800fb9680527106beb2f9c51904a3210c03a448c74" dependencies = [ "dtoa", ] [[package]] name = "dunce" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bd4b30a6560bbd9b4620f4de34c3f14f60848e58a9b7216801afcb4c7b31c3c" +checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" [[package]] name = "either" -version = "1.8.1" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" + +[[package]] +name = "embed-resource" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" +checksum = "f54cc3e827ee1c3812239a9a41dede7b4d7d5d5464faa32d71bd7cba28ce2cb2" +dependencies = [ + "cc", + "rustc_version", + "toml 0.8.8", + "vswhom", + "winreg 0.51.0", +] [[package]] name = "embed_plist" @@ -861,137 +882,106 @@ checksum = "4ef6b89e5b37196644d8796de5268852ff179b44e96276cf4290264843743bb7" [[package]] name = "encoding_rs" -version = "0.8.32" +version = "0.8.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394" +checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" dependencies = [ "cfg-if", ] [[package]] name = "env_logger" -version = "0.9.3" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7" +checksum = "95b3f3e67048839cb0d0781f445682a35113da7121f7c949db0e2be96a4fbece" dependencies = [ - "atty", "humantime", + "is-terminal", "log", "regex", "termcolor", ] [[package]] -name = "errno" -version = "0.3.1" +name = "equivalent" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" -dependencies = [ - "errno-dragonfly", - "libc", - "windows-sys 0.48.0", -] +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] -name = "errno-dragonfly" -version = "0.1.2" +name = "errno" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" +checksum = "f258a7194e7f7c2a7837a8913aeab7fd8c383457034fa20ce4dd3dcb813e8eb8" dependencies = [ - "cc", "libc", -] - -[[package]] -name = "extendr-api" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e36d66fa307948c291a6fc5b09d8295dd58e88ab5e8d782d30e23670113e9ab" -dependencies = [ - "extendr-engine", - "extendr-macros", - "lazy_static", - "libR-sys", - "paste", -] - -[[package]] -name = "extendr-engine" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8298d5a2e38bb91820b92bbd7e5aaf1d3b95ed9f096fc66393c50af38ff8155d" -dependencies = [ - "libR-sys", -] - -[[package]] -name = "extendr-macros" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09bf0849f0d48209be8163378248137fed5ccb5f464d171cf93a19f31a9e6c67" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", + "windows-sys", ] [[package]] name = "fake" -version = "2.5.0" +version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d68f517805463f3a896a9d29c1d6ff09d3579ded64a7201b4069f8f9c0d52fd" +checksum = "26221445034074d46b276e13eb97a265ebdb8ed8da705c4dddd3dd20b66b45d2" dependencies = [ + "deunicode", "rand 0.8.5", ] [[package]] name = "fastrand" -version = "1.9.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" -dependencies = [ - "instant", -] +checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" [[package]] name = "fdeflate" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d329bdeac514ee06249dabc27877490f17f5d371ec693360768b838e19f3ae10" +checksum = "64d6dafc854908ff5da46ff3f8f473c6984119a2876a383a860246dd7841a868" dependencies = [ "simd-adler32", ] [[package]] name = "field-offset" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3cf3a800ff6e860c863ca6d4b16fd999db8b752819c1606884047b73e468535" +checksum = "38e2275cc4e4fc009b0669731a1e5ab7ebf11f469eaede2bab9309a5b4d6057f" dependencies = [ - "memoffset 0.8.0", + "memoffset", "rustc_version", ] +[[package]] +name = "file-id" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6584280525fb2059cba3db2c04abf947a1a29a45ddae89f3870f8281704fafc9" +dependencies = [ + "windows-sys", +] + [[package]] name = "filetime" -version = "0.2.21" +version = "0.2.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cbc844cecaee9d4443931972e1289c8ff485cb4cc2767cb03ca139ed6885153" +checksum = "d4029edd3e734da6fe05b6cd7bd2960760a616bd2ddd0d59a0124746d6272af0" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.2.16", - "windows-sys 0.48.0", + "redox_syscall 0.3.5", + "windows-sys", ] [[package]] name = "flate2" -version = "1.0.25" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8a2db397cb1c8772f31494cb8917e48cd1e64f0fa7efac59fbd741a0a8ce841" +checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" dependencies = [ "crc32fast", - "miniz_oxide 0.6.2", + "miniz_oxide", ] [[package]] @@ -1026,9 +1016,9 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "form_urlencoded" -version = "1.1.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ "percent-encoding", ] @@ -1039,6 +1029,15 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" +[[package]] +name = "fsevent-sys" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76ee7a02da4d231650c7cea31349b889be2f45ddb3ef3032d2ec8185f6313fd2" +dependencies = [ + "libc", +] + [[package]] name = "futf" version = "0.1.5" @@ -1051,9 +1050,9 @@ dependencies = [ [[package]] name = "futures" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" +checksum = "da0290714b38af9b4a7b094b8a37086d1b4e61f2df9122c3cad2577669145335" dependencies = [ "futures-channel", "futures-core", @@ -1066,9 +1065,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" +checksum = "ff4dd66668b557604244583e3e1e1eada8c5c2e96a6d0d6653ede395b78bbacb" dependencies = [ "futures-core", "futures-sink", @@ -1076,15 +1075,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" +checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" [[package]] name = "futures-executor" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" +checksum = "0f4fb8693db0cf099eadcca0efe2a5a22e4550f98ed16aba6c48700da29597bc" dependencies = [ "futures-core", "futures-task", @@ -1093,38 +1092,38 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" +checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" [[package]] name = "futures-macro" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" +checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.39", ] [[package]] name = "futures-sink" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" +checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817" [[package]] name = "futures-task" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" +checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2" [[package]] name = "futures-util" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" +checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104" dependencies = [ "futures-channel", "futures-core", @@ -1153,7 +1152,7 @@ version = "0.15.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a6e05c1f572ab0e1f15be94217f0dc29088c248b14f792a5ff0af0d84bcda9e8" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cairo-rs", "gdk-pixbuf", "gdk-sys", @@ -1169,7 +1168,7 @@ version = "0.15.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad38dd9cc8b099cceecdf41375bb6d481b1b5a7cd5cd603e10a69a9383f8619a" dependencies = [ - "bitflags", + "bitflags 1.3.2", "gdk-pixbuf-sys", "gio", "glib", @@ -1186,7 +1185,7 @@ dependencies = [ "glib-sys", "gobject-sys", "libc", - "system-deps 6.0.4", + "system-deps 6.2.0", ] [[package]] @@ -1203,7 +1202,7 @@ dependencies = [ "libc", "pango-sys", "pkg-config", - "system-deps 6.0.4", + "system-deps 6.2.0", ] [[package]] @@ -1217,7 +1216,7 @@ dependencies = [ "gobject-sys", "libc", "pkg-config", - "system-deps 6.0.4", + "system-deps 6.2.0", ] [[package]] @@ -1229,21 +1228,21 @@ dependencies = [ "gdk-sys", "glib-sys", "libc", - "system-deps 6.0.4", + "system-deps 6.2.0", "x11", ] [[package]] name = "generator" -version = "0.7.3" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33a20a288a94683f5f4da0adecdbe095c94a77c295e514cc6484e9394dd8376e" +checksum = "5cc16584ff22b460a382b7feec54b23d2908d858152e5739a120b949293bd74e" dependencies = [ "cc", "libc", "log", "rustversion", - "windows 0.44.0", + "windows 0.48.0", ] [[package]] @@ -1269,9 +1268,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.9" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4" +checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" dependencies = [ "cfg-if", "js-sys", @@ -1280,13 +1279,19 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "gimli" +version = "0.28.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" + [[package]] name = "gio" version = "0.15.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68fdbc90312d462781a395f7a16d96a2b379bb6ef8cd6310a2df272771c4283b" dependencies = [ - "bitflags", + "bitflags 1.3.2", "futures-channel", "futures-core", "futures-io", @@ -1306,7 +1311,7 @@ dependencies = [ "glib-sys", "gobject-sys", "libc", - "system-deps 6.0.4", + "system-deps 6.2.0", "winapi", ] @@ -1316,7 +1321,7 @@ version = "0.15.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "edb0306fbad0ab5428b0ca674a23893db909a98582969c9b537be4ced78c505d" dependencies = [ - "bitflags", + "bitflags 1.3.2", "futures-channel", "futures-core", "futures-executor", @@ -1352,7 +1357,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef4b192f8e65e9cf76cbf4ea71fa8e3be4a0e18ffe3d68b8da6836974cc5bad4" dependencies = [ "libc", - "system-deps 6.0.4", + "system-deps 6.2.0", ] [[package]] @@ -1363,43 +1368,75 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "globset" -version = "0.4.10" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "029d74589adefde59de1a0c4f4732695c32805624aec7b68d91503d4dba79afc" +checksum = "57da3b9b5b85bd66f31093f8c408b90a74431672542466497dcbdfdc02034be1" dependencies = [ "aho-corasick", "bstr", - "fnv", "log", - "regex", + "regex-automata 0.4.3", + "regex-syntax 0.8.2", ] [[package]] name = "gloo" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a4bef6b277b3ab073253d4bca60761240cf8d6998f4bd142211957b69a61b20" +checksum = "28999cda5ef6916ffd33fb4a7b87e1de633c47c0dc6d97905fee1cdaa142b94d" dependencies = [ - "gloo-console", - "gloo-dialogs", - "gloo-events", - "gloo-file", - "gloo-history", - "gloo-net", - "gloo-render", - "gloo-storage", - "gloo-timers", - "gloo-utils", - "gloo-worker", + "gloo-console 0.2.3", + "gloo-dialogs 0.1.1", + "gloo-events 0.1.2", + "gloo-file 0.2.3", + "gloo-history 0.1.5", + "gloo-net 0.3.1", + "gloo-render 0.1.1", + "gloo-storage 0.2.2", + "gloo-timers 0.2.6", + "gloo-utils 0.1.7", + "gloo-worker 0.2.1", ] [[package]] -name = "gloo-console" -version = "0.2.3" +name = "gloo" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82b7ce3c05debe147233596904981848862b068862e9ec3e34be446077190d3f" +checksum = "cd35526c28cc55c1db77aed6296de58677dbab863b118483a27845631d870249" dependencies = [ - "gloo-utils", + "gloo-console 0.3.0", + "gloo-dialogs 0.2.0", + "gloo-events 0.2.0", + "gloo-file 0.3.0", + "gloo-history 0.2.1", + "gloo-net 0.4.0", + "gloo-render 0.2.0", + "gloo-storage 0.3.0", + "gloo-timers 0.3.0", + "gloo-utils 0.2.0", + "gloo-worker 0.4.0", +] + +[[package]] +name = "gloo-console" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82b7ce3c05debe147233596904981848862b068862e9ec3e34be446077190d3f" +dependencies = [ + "gloo-utils 0.1.7", + "js-sys", + "serde", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "gloo-console" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a17868f56b4a24f677b17c8cb69958385102fa879418052d60b50bc1727e261" +dependencies = [ + "gloo-utils 0.2.0", "js-sys", "serde", "wasm-bindgen", @@ -1416,6 +1453,16 @@ dependencies = [ "web-sys", ] +[[package]] +name = "gloo-dialogs" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf4748e10122b01435750ff530095b1217cf6546173459448b83913ebe7815df" +dependencies = [ + "wasm-bindgen", + "web-sys", +] + [[package]] name = "gloo-events" version = "0.1.2" @@ -1426,14 +1473,36 @@ dependencies = [ "web-sys", ] +[[package]] +name = "gloo-events" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27c26fb45f7c385ba980f5fa87ac677e363949e065a083722697ef1b2cc91e41" +dependencies = [ + "wasm-bindgen", + "web-sys", +] + [[package]] name = "gloo-file" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8d5564e570a38b43d78bdc063374a0c3098c4f0d64005b12f9bbe87e869b6d7" +dependencies = [ + "gloo-events 0.1.2", + "js-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "gloo-file" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97563d71863fb2824b2e974e754a81d19c4a7ec47b09ced8a0e6656b6d54bd1f" dependencies = [ "futures-channel", - "gloo-events", + "gloo-events 0.2.0", "js-sys", "wasm-bindgen", "web-sys", @@ -1441,14 +1510,31 @@ dependencies = [ [[package]] name = "gloo-history" -version = "0.1.3" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85725d90bf0ed47063b3930ef28e863658a7905989e9929a8708aab74a1d5e7f" +dependencies = [ + "gloo-events 0.1.2", + "gloo-utils 0.1.7", + "serde", + "serde-wasm-bindgen 0.5.0", + "serde_urlencoded", + "thiserror", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "gloo-history" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd451019e0b7a2b8a7a7b23e74916601abf1135c54664e57ff71dcc26dfcdeb7" +checksum = "0c4022e82f5f9e03cb1251b13c0a967e0600e97aa179c617f6519bac40640160" dependencies = [ - "gloo-events", - "gloo-utils", + "getrandom 0.2.11", + "gloo-events 0.2.0", + "gloo-utils 0.2.0", "serde", - "serde-wasm-bindgen", + "serde-wasm-bindgen 0.6.1", "serde_urlencoded", "thiserror", "wasm-bindgen", @@ -1457,14 +1543,36 @@ dependencies = [ [[package]] name = "gloo-net" -version = "0.2.6" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a66b4e3c7d9ed8d315fd6b97c8b1f74a7c6ecbbc2320e65ae7ed38b7068cc620" +dependencies = [ + "futures-channel", + "futures-core", + "futures-sink", + "gloo-utils 0.1.7", + "http", + "js-sys", + "pin-project", + "serde", + "serde_json", + "thiserror", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "gloo-net" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9902a044653b26b99f7e3693a42f171312d9be8b26b5697bd1e43ad1f8a35e10" +checksum = "8ac9e8288ae2c632fa9f8657ac70bfe38a1530f345282d7ba66a1f70b72b7dc4" dependencies = [ "futures-channel", "futures-core", "futures-sink", - "gloo-utils", + "gloo-utils 0.2.0", + "http", "js-sys", "pin-project", "serde", @@ -1485,13 +1593,38 @@ dependencies = [ "web-sys", ] +[[package]] +name = "gloo-render" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56008b6744713a8e8d98ac3dcb7d06543d5662358c9c805b4ce2167ad4649833" +dependencies = [ + "wasm-bindgen", + "web-sys", +] + [[package]] name = "gloo-storage" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d6ab60bf5dbfd6f0ed1f7843da31b41010515c745735c970e821945ca91e480" dependencies = [ - "gloo-utils", + "gloo-utils 0.1.7", + "js-sys", + "serde", + "serde_json", + "thiserror", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "gloo-storage" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbc8031e8c92758af912f9bc08fbbadd3c6f3cfcbf6b64cdf3d6a81f0139277a" +dependencies = [ + "gloo-utils 0.2.0", "js-sys", "serde", "serde_json", @@ -1505,6 +1638,16 @@ name = "gloo-timers" version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "gloo-timers" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbb143cf96099802033e0d4f4963b19fd2e0b728bcf076cd9cf7f6634f092994" dependencies = [ "futures-channel", "futures-core", @@ -1514,9 +1657,22 @@ dependencies = [ [[package]] name = "gloo-utils" -version = "0.1.6" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "037fcb07216cb3a30f7292bd0176b050b7b9a052ba830ef7d5d65f6dc64ba58e" +dependencies = [ + "js-sys", + "serde", + "serde_json", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "gloo-utils" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8e8fc851e9c7b9852508bc6e3f690f452f474417e8545ec9857b7f7377036b5" +checksum = "0b5555354113b18c547c1d3a98fbf7fb32a9ff4f6fa112ce823a21641a0ba3aa" dependencies = [ "js-sys", "serde", @@ -1533,8 +1689,8 @@ checksum = "13471584da78061a28306d1359dd0178d8d6fc1c7c80e5e35d27260346e0516a" dependencies = [ "anymap2", "bincode", - "gloo-console", - "gloo-utils", + "gloo-console 0.2.3", + "gloo-utils 0.1.7", "js-sys", "serde", "wasm-bindgen", @@ -1542,6 +1698,37 @@ dependencies = [ "web-sys", ] +[[package]] +name = "gloo-worker" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76495d3dd87de51da268fa3a593da118ab43eb7f8809e17eb38d3319b424e400" +dependencies = [ + "bincode", + "futures", + "gloo-utils 0.2.0", + "gloo-worker-macros", + "js-sys", + "pinned", + "serde", + "thiserror", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "gloo-worker-macros" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "956caa58d4857bc9941749d55e4bd3000032d8212762586fa5705632967140e7" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.39", +] + [[package]] name = "gobject-sys" version = "0.15.10" @@ -1550,7 +1737,7 @@ checksum = "0d57ce44246becd17153bd035ab4d32cfee096a657fc01f2231c9278378d1e0a" dependencies = [ "glib-sys", "libc", - "system-deps 6.0.4", + "system-deps 6.2.0", ] [[package]] @@ -1560,7 +1747,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "92e3004a2d5d6d8b5057d2b57b3712c9529b62e82c77f25c1fecde1fd5c23bd0" dependencies = [ "atk", - "bitflags", + "bitflags 1.3.2", "cairo-rs", "field-offset", "futures-channel", @@ -1591,7 +1778,7 @@ dependencies = [ "gobject-sys", "libc", "pango-sys", - "system-deps 6.0.4", + "system-deps 6.2.0", ] [[package]] @@ -1608,6 +1795,25 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "h2" +version = "0.3.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d6250322ef6e60f93f9a2162799302cd6f68f79f6e5d85c8c16f14d1d958178" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http", + "indexmap 2.1.0", + "slab", + "tokio", + "tokio-util", + "tracing", +] + [[package]] name = "has_id" version = "0.0.1" @@ -1631,6 +1837,12 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +[[package]] +name = "hashbrown" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" + [[package]] name = "heck" version = "0.3.3" @@ -1648,27 +1860,9 @@ checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - -[[package]] -name = "hermit-abi" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" -dependencies = [ - "libc", -] - -[[package]] -name = "hermit-abi" -version = "0.3.1" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" +checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" [[package]] name = "hex" @@ -1684,7 +1878,21 @@ checksum = "e5c13fb08e5d4dfc151ee5e88bae63f7773d61852f3bdc73c9f4b9e1bde03148" dependencies = [ "log", "mac", - "markup5ever", + "markup5ever 0.10.1", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "html5ever" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bea68cab48b8459f17cf1c944c67ddc572d272d9f2b274140f223ecb1da4a3b7" +dependencies = [ + "log", + "mac", + "markup5ever 0.11.0", "proc-macro2", "quote", "syn 1.0.109", @@ -1692,13 +1900,24 @@ dependencies = [ [[package]] name = "http" -version = "0.2.9" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" +checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" dependencies = [ "bytes", "fnv", - "itoa 1.0.6", + "itoa 1.0.9", +] + +[[package]] +name = "http-body" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" +dependencies = [ + "bytes", + "http", + "pin-project-lite", ] [[package]] @@ -1707,34 +1926,82 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21dec9db110f5f872ed9699c3ecf50cf16f423502706ba5c72462e28d3157573" +[[package]] +name = "httparse" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + [[package]] name = "humantime" version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" +[[package]] +name = "hyper" +version = "0.14.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa 1.0.9", + "pin-project-lite", + "socket2 0.4.10", + "tokio", + "tower-service", + "tracing", + "want", +] + +[[package]] +name = "hyper-tls" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" +dependencies = [ + "bytes", + "hyper", + "native-tls", + "tokio", + "tokio-native-tls", +] + [[package]] name = "iana-time-zone" -version = "0.1.56" +version = "0.1.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0722cd7114b7de04316e7ea5456a0bbb20e4adb46fd27a3697adb812cff0f37c" +checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "windows 0.48.0", + "windows-core", ] [[package]] name = "iana-time-zone-haiku" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0703ae284fc167426161c2e3f1da3ea71d94b21bedbcc9494e92b28e334e3dca" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" dependencies = [ - "cxx", - "cxx-build", + "cc", ] [[package]] @@ -1755,20 +2022,19 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.2.3" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" +checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" dependencies = [ - "matches", "unicode-bidi", "unicode-normalization", ] [[package]] name = "idna" -version = "0.3.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -1776,27 +2042,25 @@ dependencies = [ [[package]] name = "ignore" -version = "0.4.18" +version = "0.4.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "713f1b139373f96a2e0ce3ac931cd01ee973c3c5dd7c40c0c2efe96ad2b6751d" +checksum = "747ad1b4ae841a78e8aba0d63adbfbeaea26b517b63705d47856b73015d27060" dependencies = [ - "crossbeam-utils", + "crossbeam-deque", "globset", - "lazy_static", "log", "memchr", - "regex", + "regex-automata 0.4.3", "same-file", - "thread_local", "walkdir", "winapi-util", ] [[package]] name = "image" -version = "0.24.6" +version = "0.24.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "527909aa81e20ac3a44803521443a765550f09b5130c2c2fa1ea59c2f8f50a3a" +checksum = "6f3dfdbdd72063086ff443e297b61695500514b1e41095b6fb9a5ab48a70a711" dependencies = [ "bytemuck", "byteorder", @@ -1807,11 +2071,41 @@ dependencies = [ [[package]] name = "implicit-clone" -version = "0.3.5" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40fc102e70475c320b185cd18c1e48bba2d7210b63970a4d581ef903e4368ef7" +checksum = "fc06a255cbf402a52ae399c05a518c68c569c916ea11423620111df576b9b9bb" dependencies = [ - "indexmap", + "implicit-clone-derive", + "indexmap 2.1.0", +] + +[[package]] +name = "implicit-clone-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9311685eb9a34808bbb0608ad2fcab9ae216266beca5848613e95553ac914e3b" +dependencies = [ + "quote", + "syn 2.0.39", +] + +[[package]] +name = "include_dir" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18762faeff7122e89e0857b02f7ce6fcc0d101d5e9ad2ad7846cc01d61b7f19e" +dependencies = [ + "include_dir_macros", +] + +[[package]] +name = "include_dir_macros" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b139284b5cf57ecfa712bcc66950bb635b31aff41c188e8a4cfc758eca374a3f" +dependencies = [ + "proc-macro2", + "quote", ] [[package]] @@ -1821,15 +2115,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", - "hashbrown", + "hashbrown 0.12.3", "serde", ] [[package]] -name = "indoc" -version = "1.0.9" +name = "indexmap" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa799dd5ed20a7e349f3b4639aa80d74549c81716d9ec4f994c9b5815598306" +checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +dependencies = [ + "equivalent", + "hashbrown 0.14.3", + "serde", +] [[package]] name = "infer" @@ -1840,6 +2139,26 @@ dependencies = [ "cfb", ] +[[package]] +name = "inotify" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8069d3ec154eb856955c1c0fbffefbf5f3c40a104ec912d4797314c1801abff" +dependencies = [ + "bitflags 1.3.2", + "inotify-sys", + "libc", +] + +[[package]] +name = "inotify-sys" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e05c02b5e89bff3b946cedeca278abc628fe811e604f027c45a8aa3cf793d0eb" +dependencies = [ + "libc", +] + [[package]] name = "instant" version = "0.1.12" @@ -1850,23 +2169,39 @@ dependencies = [ ] [[package]] -name = "io-lifetimes" -version = "1.0.10" +name = "ipnet" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c66c74d2ae7e79a5a8f7ac924adbe38ee42a859c6539ad869eb51f0b52dc220" +checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" + +[[package]] +name = "is-docker" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "928bae27f42bc99b60d9ac7334e3a21d10ad8f1835a4e12ec3ec0464765ed1b3" dependencies = [ - "hermit-abi 0.3.1", - "libc", - "windows-sys 0.48.0", + "once_cell", ] [[package]] -name = "itertools" -version = "0.9.0" +name = "is-terminal" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b" +checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ - "either", + "hermit-abi", + "rustix", + "windows-sys", +] + +[[package]] +name = "is-wsl" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "173609498df190136aa7dea1a91db051746d339e18476eed5ca40521f02d7aa5" +dependencies = [ + "is-docker", + "once_cell", ] [[package]] @@ -1886,9 +2221,9 @@ checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" [[package]] name = "itoa" -version = "1.0.6" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "javascriptcore-rs" @@ -1896,7 +2231,7 @@ version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf053e7843f2812ff03ef5afe34bb9c06ffee120385caad4f6b9967fcd37d41c" dependencies = [ - "bitflags", + "bitflags 1.3.2", "glib", "javascriptcore-rs-sys", ] @@ -1935,53 +2270,62 @@ checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" [[package]] name = "jobserver" -version = "0.1.26" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "936cfd212a0155903bcbc060e316fb6cc7cbf2e1907329391ebadc1fe0ce77c2" +checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" dependencies = [ "libc", ] [[package]] name = "js-sys" -version = "0.3.61" +version = "0.3.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445dde2150c55e483f3d8416706b97ec8e8237c307e5b7b4b8dd15e6af2a0730" +checksum = "54c0c35952f67de54bb584e9fd912b3023117cbafc0a77d8f3dee1fb5f572fe8" dependencies = [ "wasm-bindgen", ] [[package]] name = "json-patch" -version = "0.2.7" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb3fa5a61630976fc4c353c70297f2e93f1930e3ccee574d59d618ccbd5154ce" +checksum = "55ff1e1486799e3f64129f8ccad108b38290df9cd7015cd31bed17239f0789d6" dependencies = [ "serde", "serde_json", - "treediff 3.0.2", + "thiserror", + "treediff", ] [[package]] -name = "json-patch" -version = "1.0.0" +name = "jwalk" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f54898088ccb91df1b492cc80029a6fdf1c48ca0db7c6822a8babad69c94658" +checksum = "2735847566356cd2179a2a38264839308f7079fa96e6bd5a42d740460e003c56" dependencies = [ - "serde", - "serde_json", - "thiserror", - "treediff 4.0.2", + "crossbeam", + "rayon", ] [[package]] -name = "jwalk" -version = "0.6.2" +name = "kqueue" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dbcda57db8b6dc067e589628b7348639014e793d9e8137d8cf215e8b133a0bd" +checksum = "7447f1ca1b7b563588a205fe93dea8df60fd981423a768bc1c0ded35ed147d0c" dependencies = [ - "crossbeam", - "rayon", + "kqueue-sys", + "libc", +] + +[[package]] +name = "kqueue-sys" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed9625ffda8729b85e45cf04090035ac368927b8cebc34898e7c120f52e4838b" +dependencies = [ + "bitflags 1.3.2", + "libc", ] [[package]] @@ -1991,22 +2335,29 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ea8e9c6e031377cff82ee3001dc8026cdf431ed4e2e6b51f98ab8c73484a358" dependencies = [ "cssparser", - "html5ever", + "html5ever 0.25.2", "matches", "selectors", ] [[package]] -name = "lazy_static" -version = "1.4.0" +name = "kuchikiki" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "f29e4755b7b995046f510a7520c42b2fed58b77bd94d5a87a8eb43d2fd126da8" +dependencies = [ + "cssparser", + "html5ever 0.26.0", + "indexmap 1.9.3", + "matches", + "selectors", +] [[package]] -name = "libR-sys" -version = "0.4.0" +name = "lazy_static" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd728a97b9b0975f546bc865a7413e0ce6f98a8f6cea52e77dc5ee0bcea00adf" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libappindicator" @@ -2034,9 +2385,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.141" +version = "0.2.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3304a64d199bb964be99741b7a14d26972741915b3649639149b2479bb46f4b5" +checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" [[package]] name = "libloading" @@ -2049,34 +2400,36 @@ dependencies = [ ] [[package]] -name = "line-wrap" -version = "0.1.1" +name = "libredox" +version = "0.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f30344350a2a51da54c1d53be93fade8a237e545dbcc4bdbe635413f2117cab9" +checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" dependencies = [ - "safemem", + "bitflags 2.4.1", + "libc", + "redox_syscall 0.4.1", ] [[package]] -name = "link-cplusplus" -version = "1.0.8" +name = "line-wrap" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecd207c9c713c34f95a097a5b029ac2ce6010530c7b49d7fea24d977dede04f5" +checksum = "f30344350a2a51da54c1d53be93fade8a237e545dbcc4bdbe635413f2117cab9" dependencies = [ - "cc", + "safemem", ] [[package]] name = "linux-raw-sys" -version = "0.3.1" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d59d8c75012853d2e872fb56bc8a2e53718e2cafe1a4c823143141c6d90c322f" +checksum = "969488b55f8ac402214f3f5fd243ebb7206cf82de60d3172994707a4bcc2b829" [[package]] name = "lock_api" -version = "0.4.9" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" +checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" dependencies = [ "autocfg", "scopeguard", @@ -2084,12 +2437,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.17" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" -dependencies = [ - "cfg-if", -] +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] name = "loom" @@ -2112,21 +2462,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4" -[[package]] -name = "macrotest" -version = "1.0.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7489ae0986ce45414b7b3122c2e316661343ecf396b206e3e15f07c846616f10" -dependencies = [ - "diff", - "glob", - "prettyplease", - "serde", - "serde_json", - "syn 1.0.109", - "toml 0.5.11", -] - [[package]] name = "malloc_buf" version = "0.0.6" @@ -2144,7 +2479,21 @@ checksum = "a24f40fb03852d1cdd84330cddcaf98e9ec08a7b7768e952fad3b4cf048ec8fd" dependencies = [ "log", "phf 0.8.0", - "phf_codegen", + "phf_codegen 0.8.0", + "string_cache", + "string_cache_codegen", + "tendril", +] + +[[package]] +name = "markup5ever" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a2629bb1404f3d34c2e921f21fd34ba00b206124c81f65c50b43b6aaefeb016" +dependencies = [ + "log", + "phf 0.10.1", + "phf_codegen 0.10.0", "string_cache", "string_cache_codegen", "tendril", @@ -2156,7 +2505,7 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" dependencies = [ - "regex-automata", + "regex-automata 0.1.10", ] [[package]] @@ -2167,27 +2516,24 @@ checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" [[package]] name = "memchr" -version = "2.5.0" +version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" [[package]] name = "memoffset" -version = "0.6.5" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" dependencies = [ "autocfg", ] [[package]] -name = "memoffset" -version = "0.8.0" +name = "mime" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1" -dependencies = [ - "autocfg", -] +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "minisign-verify" @@ -2197,21 +2543,24 @@ checksum = "933dca44d65cdd53b355d0b73d380a2ff5da71f87f036053188bf1eab6a19881" [[package]] name = "miniz_oxide" -version = "0.6.2" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" +checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" dependencies = [ "adler", + "simd-adler32", ] [[package]] -name = "miniz_oxide" -version = "0.7.1" +name = "mio" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +checksum = "3dce281c5e46beae905d4de1870d8b1509a9142b62eedf18b443b011ca8343d0" dependencies = [ - "adler", - "simd-adler32", + "libc", + "log", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys", ] [[package]] @@ -2277,7 +2626,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2032c77e030ddee34a6787a64166008da93f6a352b629261d0fee232b8742dd4" dependencies = [ - "bitflags", + "bitflags 1.3.2", "jni-sys", "ndk-sys", "num_enum", @@ -2318,27 +2667,53 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" [[package]] -name = "ntest" -version = "0.7.5" +name = "notify" +version = "6.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c544e496c816f0a59645c0bb69097e453df203954ae2ed4b3ac4251fad69d44" +checksum = "6205bd8bb1e454ad2e27422015fb5e4f2bcc7e08fa8f27058670d208324a4d2d" dependencies = [ - "ntest_proc_macro_helper", - "ntest_test_cases", - "ntest_timeout", + "bitflags 2.4.1", + "crossbeam-channel", + "filetime", + "fsevent-sys", + "inotify", + "kqueue", + "libc", + "log", + "mio", + "walkdir", + "windows-sys", ] [[package]] -name = "ntest_proc_macro_helper" -version = "0.7.5" +name = "notify-debouncer-full" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f52e34b414605b77efc95c3f0ecef01df0c324bcc7f68d9a9cb7a7552777e52" +checksum = "49f5dab59c348b9b50cf7f261960a20e389feb2713636399cd9082cd4b536154" +dependencies = [ + "crossbeam-channel", + "file-id", + "log", + "notify", + "parking_lot", + "walkdir", +] + +[[package]] +name = "ntest" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da8ec6d2b73d45307e926f5af46809768581044384637af6b3f3fe7c3c88f512" +dependencies = [ + "ntest_test_cases", + "ntest_timeout", +] [[package]] name = "ntest_test_cases" -version = "0.7.5" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99a81eb400abc87063f829560bc5c5c835177703b83d1cd991960db0b2a00abe" +checksum = "be7d33be719c6f4d09e64e27c1ef4e73485dc4cc1f4d22201f89860a7fe22e22" dependencies = [ "proc-macro2", "quote", @@ -2347,11 +2722,10 @@ dependencies = [ [[package]] name = "ntest_timeout" -version = "0.7.5" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b10db009e117aca57cbfb70ac332348f9a89d09ff7204497c283c0f7a0c96323" +checksum = "066b468120587a402f0b47d8f80035c921f6a46f8209efd0632a89a16f5188a4" dependencies = [ - "ntest_proc_macro_helper", "proc-macro-crate", "proc-macro2", "quote", @@ -2391,20 +2765,20 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.15" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" dependencies = [ "autocfg", ] [[package]] name = "num_cpus" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.2.6", + "hermit-abi", "libc", ] @@ -2429,15 +2803,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "num_threads" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44" -dependencies = [ - "libc", -] - [[package]] name = "objc" version = "0.2.7" @@ -2477,29 +2842,39 @@ dependencies = [ "objc", ] +[[package]] +name = "object" +version = "0.32.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" +dependencies = [ + "memchr", +] + [[package]] name = "once_cell" -version = "1.17.1" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[package]] name = "open" -version = "3.2.0" +version = "5.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2078c0039e6a54a0c42c28faa984e115fb4c2d5bf2208f77d1961002df8576f8" +checksum = "90878fb664448b54c4e592455ad02831e23a3f7e157374a8b95654731aac7349" dependencies = [ + "is-wsl", + "libc", "pathdiff", - "windows-sys 0.42.0", ] [[package]] name = "openssl" -version = "0.10.50" +version = "0.10.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e30d8bc91859781f0a943411186324d580f2bbeb71b452fe91ae344806af3f1" +checksum = "79a4c6c3a2b158f7f8f2a2fc5a969fa3a068df6fc9dbb4a43845436e3af7c800" dependencies = [ - "bitflags", + "bitflags 2.4.1", "cfg-if", "foreign-types", "libc", @@ -2516,7 +2891,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.39", ] [[package]] @@ -2527,9 +2902,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.85" +version = "0.9.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d3d193fb1488ad46ffe3aaabc912cc931d02ee8518fe2959aea8ef52718b0c0" +checksum = "3812c071ba60da8b5677cc12bcb1d42989a65553772897a7e0355545a819838f" dependencies = [ "cc", "libc", @@ -2537,22 +2912,22 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" + [[package]] name = "os_pipe" -version = "1.1.3" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a53dbb20faf34b16087a931834cba2d7a73cc74af2b7ef345a4c8324e2409a12" +checksum = "0ae859aa07428ca9a929b936690f8b12dc5f11dd8c6992a18ca93919f28bc177" dependencies = [ "libc", - "windows-sys 0.45.0", + "windows-sys", ] -[[package]] -name = "os_str_bytes" -version = "6.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ceedf44fb00f2d1984b0bc98102627ce622e083e49a5bacdb3e514fa4238e267" - [[package]] name = "overload" version = "0.1.1" @@ -2565,7 +2940,7 @@ version = "0.15.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22e4045548659aee5313bde6c582b0d83a627b7904dd20dc2d9ef0895d414e4f" dependencies = [ - "bitflags", + "bitflags 1.3.2", "glib", "libc", "once_cell", @@ -2581,7 +2956,7 @@ dependencies = [ "glib-sys", "gobject-sys", "libc", - "system-deps 6.0.4", + "system-deps 6.2.0", ] [[package]] @@ -2596,23 +2971,17 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.7" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" +checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.2.16", + "redox_syscall 0.4.1", "smallvec", - "windows-sys 0.45.0", + "windows-targets 0.48.5", ] -[[package]] -name = "paste" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f746c4065a8fa3fe23974dd82f15431cc8d40779821001404d10d2e79ca7d79" - [[package]] name = "pathdiff" version = "0.2.1" @@ -2621,9 +2990,9 @@ checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" [[package]] name = "percent-encoding" -version = "2.2.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "phf" @@ -2651,10 +3020,20 @@ dependencies = [ name = "phf_codegen" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbffee61585b0411840d3ece935cce9cb6321f01c45477d30066498cd5e1a815" +checksum = "cbffee61585b0411840d3ece935cce9cb6321f01c45477d30066498cd5e1a815" +dependencies = [ + "phf_generator 0.8.0", + "phf_shared 0.8.0", +] + +[[package]] +name = "phf_codegen" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fb1c3a8bc4dd4e5cfce29b44ffc14bedd2ee294559a294e2a4d4c9e9a6a13cd" dependencies = [ - "phf_generator 0.8.0", - "phf_shared 0.8.0", + "phf_generator 0.10.0", + "phf_shared 0.10.0", ] [[package]] @@ -2725,29 +3104,29 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.0.12" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad29a609b6bcd67fee905812e544992d216af9d755757c05ed2d0e15a74c6ecc" +checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.0.12" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" +checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.39", ] [[package]] name = "pin-project-lite" -version = "0.2.9" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] name = "pin-utils" @@ -2768,37 +3147,43 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" +checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" [[package]] name = "plist" -version = "1.4.3" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bd9647b268a3d3e14ff09c23201133a62589c658db02bb7388c7246aafe0590" +checksum = "e5699cc8a63d1aa2b1ee8e12b9ad70ac790d65788cd36101fa37f87ea46c4cef" dependencies = [ - "base64 0.21.0", - "indexmap", + "base64 0.21.5", + "indexmap 2.1.0", "line-wrap", "quick-xml", "serde", - "time 0.3.15", + "time", ] [[package]] name = "png" -version = "0.17.8" +version = "0.17.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aaeebc51f9e7d2c150d3f3bfeb667f2aa985db5ef1e3d212847bdedb488beeaa" +checksum = "dd75bf2d8dd3702b9707cdbc56a5b9ef42cec752eb8b3bafc01234558442aa64" dependencies = [ - "bitflags", + "bitflags 1.3.2", "crc32fast", "fdeflate", "flate2", - "miniz_oxide 0.7.1", + "miniz_oxide", ] +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + [[package]] name = "ppv-lite86" version = "0.2.17" @@ -2819,7 +3204,7 @@ checksum = "59230a63c37f3e18569bdb90e4a89cbf5bf8b06fea0b84e65ea10cc4df47addd" dependencies = [ "difflib", "float-cmp", - "itertools 0.10.5", + "itertools", "normalize-line-endings", "predicates-core", "regex", @@ -2843,12 +3228,12 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.1.25" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8646e95016a7a6c4adea95bafa8a16baab64b583356217f2c85db4a39d9a86" +checksum = "ae005bd773ab59b4725093fd7df83fd7892f7d8eafb48dbd7de6e024e4215f9d" dependencies = [ "proc-macro2", - "syn 1.0.109", + "syn 2.0.39", ] [[package]] @@ -2858,7 +3243,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" dependencies = [ "once_cell", - "toml_edit", + "toml_edit 0.19.15", ] [[package]] @@ -2893,9 +3278,9 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" [[package]] name = "proc-macro2" -version = "1.0.56" +version = "1.0.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435" +checksum = "39278fbbf5fb4f646ce651690877f89d1c5811a3d4acb27700c1cb3cdb78fd3b" dependencies = [ "unicode-ident", ] @@ -2907,7 +3292,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "03b55e106e5791fa5a13abd13c85d6127312e8e09098059ca2bc9b03ca4cf488" dependencies = [ "futures", - "gloo", + "gloo 0.8.1", "num_cpus", "once_cell", "pin-project", @@ -2917,91 +3302,20 @@ dependencies = [ "wasm-bindgen-futures", ] -[[package]] -name = "pyo3" -version = "0.17.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "268be0c73583c183f2b14052337465768c07726936a260f480f0857cb95ba543" -dependencies = [ - "cfg-if", - "indoc", - "libc", - "memoffset 0.6.5", - "parking_lot", - "pyo3-build-config", - "pyo3-ffi", - "pyo3-macros", - "serde", - "unindent", -] - -[[package]] -name = "pyo3-build-config" -version = "0.17.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28fcd1e73f06ec85bf3280c48c67e731d8290ad3d730f8be9dc07946923005c8" -dependencies = [ - "once_cell", - "target-lexicon", -] - -[[package]] -name = "pyo3-ffi" -version = "0.17.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f6cb136e222e49115b3c51c32792886defbfb0adead26a688142b346a0b9ffc" -dependencies = [ - "libc", - "pyo3-build-config", -] - -[[package]] -name = "pyo3-macros" -version = "0.17.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94144a1266e236b1c932682136dc35a9dee8d3589728f68130c7c3861ef96b28" -dependencies = [ - "proc-macro2", - "pyo3-macros-backend", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "pyo3-macros-backend" -version = "0.17.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8df9be978a2d2f0cdebabb03206ed73b11314701a5bfe71b0d753b81997777f" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "pythonize" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f7f0c136f5fbc01868185eef462800e49659eb23acca83b9e884367a006acb6" -dependencies = [ - "pyo3", - "serde", -] - [[package]] name = "quick-xml" -version = "0.28.2" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ce5e73202a820a31f8a0ee32ada5e21029c81fd9e3ebf668a40832e4219d9d1" +checksum = "1004a344b30a54e2ee58d66a71b32d2db2feb0a31f9a2d302bf0536f15de2a33" dependencies = [ "memchr", ] [[package]] name = "quote" -version = "1.0.26" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -3066,7 +3380,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.9", + "getrandom 0.2.11", ] [[package]] @@ -3089,18 +3403,15 @@ dependencies = [ [[package]] name = "raw-window-handle" -version = "0.5.0" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed7e3d950b66e19e0c372f3fa3fbbcf85b1746b571f74e0c2af6042a5c93420a" -dependencies = [ - "cty", -] +checksum = "f2ff9a1f06a88b01621b7ae906ef0211290d1c8a168a15542486a8f61c0833b9" [[package]] name = "rayon" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" +checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1" dependencies = [ "either", "rayon-core", @@ -3108,54 +3419,53 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" +checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed" dependencies = [ - "crossbeam-channel", "crossbeam-deque", "crossbeam-utils", - "num_cpus", ] [[package]] name = "redox_syscall" -version = "0.2.16" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] name = "redox_syscall" -version = "0.3.5" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] name = "redox_users" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" +checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" dependencies = [ - "getrandom 0.2.9", - "redox_syscall 0.2.16", + "getrandom 0.2.11", + "libredox", "thiserror", ] [[package]] name = "regex" -version = "1.7.3" +version = "1.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b1f693b24f6ac912f4893ef08244d70b6067480d2f1a46e950c9691e6749d1d" +checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" dependencies = [ "aho-corasick", "memchr", - "regex-syntax", + "regex-automata 0.4.3", + "regex-syntax 0.8.2", ] [[package]] @@ -3164,7 +3474,18 @@ version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" dependencies = [ - "regex-syntax", + "regex-syntax 0.6.29", +] + +[[package]] +name = "regex-automata" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax 0.8.2", ] [[package]] @@ -3173,6 +3494,52 @@ version = "0.6.29" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" +[[package]] +name = "regex-syntax" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" + +[[package]] +name = "reqwest" +version = "0.11.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "046cd98826c46c2ac8ddecae268eb5c2e58628688a5fc7a2643704a73faba95b" +dependencies = [ + "base64 0.21.5", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "hyper", + "hyper-tls", + "ipnet", + "js-sys", + "log", + "mime", + "native-tls", + "once_cell", + "percent-encoding", + "pin-project-lite", + "serde", + "serde_json", + "serde_urlencoded", + "system-configuration", + "tokio", + "tokio-native-tls", + "tokio-util", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-streams", + "web-sys", + "winreg 0.50.0", +] + [[package]] name = "rfd" version = "0.10.0" @@ -3203,6 +3570,12 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "afab94fb28594581f62d981211a9a4d53cc8130bbcbbb89a0440d9b8e81a7746" +[[package]] +name = "rustc-demangle" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" + [[package]] name = "rustc_version" version = "0.4.0" @@ -3214,29 +3587,28 @@ dependencies = [ [[package]] name = "rustix" -version = "0.37.11" +version = "0.38.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85597d61f83914ddeba6a47b3b8ffe7365107221c2e557ed94426489fefb5f77" +checksum = "dc99bc2d4f1fed22595588a013687477aedf3cdcfb26558c559edb67b4d9b22e" dependencies = [ - "bitflags", + "bitflags 2.4.1", "errno", - "io-lifetimes", "libc", "linux-raw-sys", - "windows-sys 0.48.0", + "windows-sys", ] [[package]] name = "rustversion" -version = "1.0.12" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" +checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" [[package]] name = "ryu" -version = "1.0.13" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" [[package]] name = "safemem" @@ -3255,11 +3627,11 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.21" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "713cfb06c7059f3588fb8044c0fad1d09e3c01d225e25b9220dbfdcf16dbb1b3" +checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" dependencies = [ - "windows-sys 0.42.0", + "windows-sys", ] [[package]] @@ -3270,23 +3642,17 @@ checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" [[package]] name = "scopeguard" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" - -[[package]] -name = "scratch" -version = "1.0.5" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1792db035ce95be60c3f8853017b3999209281c24e2ba5bc8e59bf97a0c590c1" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "security-framework" -version = "2.8.2" +version = "2.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a332be01508d814fed64bf28f798a146d73792121129962fdf335bb3c49a4254" +checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" dependencies = [ - "bitflags", + "bitflags 1.3.2", "core-foundation", "core-foundation-sys", "libc", @@ -3295,9 +3661,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.8.0" +version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31c9bb296072e961fcbd8853511dd39c2d8be2deb1e17c6860b1d30732b323b4" +checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" dependencies = [ "core-foundation-sys", "libc", @@ -3309,14 +3675,14 @@ version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df320f1889ac4ba6bc0cdc9c9af7af4bd64bb927bccdf32d81140dc1f9be12fe" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cssparser", "derive_more", "fxhash", "log", "matches", "phf 0.8.0", - "phf_codegen", + "phf_codegen 0.8.0", "precomputed-hash", "servo_arc", "smallvec", @@ -3325,18 +3691,18 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.17" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" +checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" dependencies = [ "serde", ] [[package]] name = "serde" -version = "1.0.160" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb2f3770c8bce3bcda7e149193a069a0f4365bda1fa5cd88e03bca26afc1216c" +checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" dependencies = [ "serde_derive", ] @@ -3352,44 +3718,66 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "serde-wasm-bindgen" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3b143e2833c57ab9ad3ea280d21fd34e285a42837aeb0ee301f4f41890fa00e" +dependencies = [ + "js-sys", + "serde", + "wasm-bindgen", +] + +[[package]] +name = "serde-wasm-bindgen" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17ba92964781421b6cef36bf0d7da26d201e96d84e1b10e7ae6ed416e516906d" +dependencies = [ + "js-sys", + "serde", + "wasm-bindgen", +] + [[package]] name = "serde_derive" -version = "1.0.160" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291a097c63d8497e00160b166a967a4a79c64f3facdd01cbd7502231688d77df" +checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.39", ] [[package]] name = "serde_json" -version = "1.0.96" +version = "1.0.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" +checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" dependencies = [ - "itoa 1.0.6", + "itoa 1.0.9", "ryu", "serde", ] [[package]] name = "serde_repr" -version = "0.1.12" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcec881020c684085e55a25f7fd888954d56609ef363479dc5a1305eb0d40cab" +checksum = "3081f5ffbb02284dda55132aa26daecedd7372a42417bbbab6f14ab7d6bb9145" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.39", ] [[package]] name = "serde_spanned" -version = "0.6.1" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0efd8caf556a6cebd3b285caf480045fcc1ac04f6bd786b09a6f11af30c4fcf4" +checksum = "12022b835073e5b11e90a14f86838ceb1c8fb0325b72416845c487ac0fa95e80" dependencies = [ "serde", ] @@ -3401,37 +3789,38 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ "form_urlencoded", - "itoa 1.0.6", + "itoa 1.0.9", "ryu", "serde", ] [[package]] name = "serde_with" -version = "2.3.3" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07ff71d2c147a7b57362cead5e22f772cd52f6ab31cfcd9edcd7f6aeb2a0afbe" +checksum = "64cd236ccc1b7a29e7e2739f27c0b2dd199804abc4290e32f59f3b68d6405c23" dependencies = [ - "base64 0.13.1", + "base64 0.21.5", "chrono", "hex", - "indexmap", + "indexmap 1.9.3", + "indexmap 2.1.0", "serde", "serde_json", "serde_with_macros", - "time 0.3.15", + "time", ] [[package]] name = "serde_with_macros" -version = "2.3.3" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "881b6f881b17d13214e5d494c939ebab463d01264ce1811e9d4ac3a882e7695f" +checksum = "93634eb5f75a2323b16de4748022ac4297f9e76b6dced2be287a099f41b5e788" dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.39", ] [[package]] @@ -3466,50 +3855,11 @@ dependencies = [ "stable_deref_trait", ] -[[package]] -name = "settings_manager" -version = "0.0.2" -dependencies = [ - "cluFlock", - "derivative", - "dev_utils", - "directories", - "fake", - "rand 0.8.5", - "serde", - "serde_json", - "settings_manager_derive", - "tempfile", -] - -[[package]] -name = "settings_manager_change_path" -version = "0.0.1" -dependencies = [ - "cluFlock", - "macrotest", - "proc-macro2", - "quote", - "serde", - "settings_manager", - "syn 1.0.109", - "tempfile", -] - -[[package]] -name = "settings_manager_derive" -version = "0.1.0" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.15", -] - [[package]] name = "sha2" -version = "0.10.6" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if", "cpufeatures", @@ -3518,9 +3868,9 @@ dependencies = [ [[package]] name = "sharded-slab" -version = "0.1.4" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" dependencies = [ "lazy_static", ] @@ -3537,30 +3887,50 @@ dependencies = [ [[package]] name = "simd-adler32" -version = "0.3.5" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "238abfbb77c1915110ad968465608b68e869e0772622c9656714e73e5a1a522f" +checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" [[package]] name = "siphasher" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" +checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" [[package]] name = "slab" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" dependencies = [ "autocfg", ] [[package]] name = "smallvec" -version = "1.10.0" +version = "1.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" + +[[package]] +name = "socket2" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "socket2" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" +checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" +dependencies = [ + "libc", + "windows-sys", +] [[package]] name = "soup2" @@ -3568,7 +3938,7 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2b4d76501d8ba387cf0fefbe055c3e0a59891d09f0f995ae4e4b16f6b60f3c0" dependencies = [ - "bitflags", + "bitflags 1.3.2", "gio", "glib", "libc", @@ -3582,7 +3952,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "009ef427103fcb17f802871647a7fa6c60cbb654b4c4e4c0ac60a31c5f6dc9cf" dependencies = [ - "bitflags", + "bitflags 1.3.2", "gio-sys", "glib-sys", "gobject-sys", @@ -3650,15 +4020,36 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.15" +version = "2.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a34fcf3e8b60f57e6a14301a2e916d323af98b0ea63c599441eec8558660c822" +checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] +[[package]] +name = "system-configuration" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "system-deps" version = "5.0.0" @@ -3674,24 +4065,24 @@ dependencies = [ [[package]] name = "system-deps" -version = "6.0.4" +version = "6.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "555fc8147af6256f3931a36bb83ad0023240ce9cf2b319dec8236fd1f220b05f" +checksum = "2a2d580ff6a20c55dfb86be5f9c238f67835d0e81cbdea8bf5680e0897320331" dependencies = [ - "cfg-expr 0.14.0", + "cfg-expr 0.15.5", "heck 0.4.1", "pkg-config", - "toml 0.7.3", + "toml 0.8.8", "version-compare 0.1.1", ] [[package]] name = "tao" -version = "0.16.2" +version = "0.16.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6d198e01085564cea63e976ad1566c1ba2c2e4cc79578e35d9f05521505e31" +checksum = "75f5aefd6be4cd3ad3f047442242fd9f57cbfb3e565379f66b5e14749364fa4f" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cairo-rs", "cc", "cocoa", @@ -3728,7 +4119,7 @@ dependencies = [ "serde", "tao-macros", "unicode-segmentation", - "uuid 1.3.1", + "uuid", "windows 0.39.0", "windows-implement", "x11-dl", @@ -3736,9 +4127,9 @@ dependencies = [ [[package]] name = "tao-macros" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b27a4bcc5eb524658234589bdffc7e7bfb996dbae6ce9393bfd39cb4159b445" +checksum = "ec114582505d158b669b136e6851f85840c109819d77c42bb7c0709f727d18c2" dependencies = [ "proc-macro2", "quote", @@ -3747,9 +4138,9 @@ dependencies = [ [[package]] name = "tar" -version = "0.4.38" +version = "0.4.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b55807c0344e1e6c04d7c965f5289c39a8d94ae23ed5c0b57aabac549f871c6" +checksum = "b16afcea1f22891c49a00c751c7b63b2233284064f11a200fc624137c51e2ddb" dependencies = [ "filetime", "libc", @@ -3758,19 +4149,19 @@ dependencies = [ [[package]] name = "target-lexicon" -version = "0.12.6" +version = "0.12.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ae9980cab1db3fceee2f6c6f643d5d8de2997c58ee8d25fb0cc8a9e9e7348e5" +checksum = "14c39fd04924ca3a864207c66fc2cd7d22d7c016007f9ce846cbb9326331930a" [[package]] name = "tauri" -version = "1.3.0" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d42ba3a2e8556722f31336a0750c10dbb6a81396a1c452977f515da83f69f842" +checksum = "9bfe673cf125ef364d6f56b15e8ce7537d9ca7e4dae1cf6fbbdeed2e024db3d9" dependencies = [ "anyhow", - "attohttpc", - "base64 0.21.0", + "base64 0.21.5", + "bytes", "cocoa", "dirs-next", "embed_plist", @@ -3791,6 +4182,7 @@ dependencies = [ "rand 0.8.5", "raw-window-handle", "regex", + "reqwest", "rfd", "semver", "serde", @@ -3806,10 +4198,10 @@ dependencies = [ "tauri-utils", "tempfile", "thiserror", - "time 0.3.15", + "time", "tokio", "url", - "uuid 1.3.1", + "uuid", "webkit2gtk", "webview2-com", "windows 0.39.0", @@ -3818,30 +4210,33 @@ dependencies = [ [[package]] name = "tauri-build" -version = "1.2.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8807c85d656b2b93927c19fe5a5f1f1f348f96c2de8b90763b3c2d561511f9b4" +checksum = "defbfc551bd38ab997e5f8e458f87396d2559d05ce32095076ad6c30f7fc5f9c" dependencies = [ "anyhow", "cargo_toml", + "dirs-next", "heck 0.4.1", - "json-patch 0.2.7", + "json-patch", "semver", + "serde", "serde_json", "tauri-utils", - "winres", + "tauri-winres", + "walkdir", ] [[package]] name = "tauri-codegen" -version = "1.3.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5a2105f807c6f50b2fa2ce5abd62ef207bc6f14c9fcc6b8caec437f6fb13bde" +checksum = "7b3475e55acec0b4a50fb96435f19631fb58cbcd31923e1a213de5c382536bbb" dependencies = [ - "base64 0.21.0", + "base64 0.21.5", "brotli", "ico", - "json-patch 1.0.0", + "json-patch", "plist", "png", "proc-macro2", @@ -3853,16 +4248,16 @@ dependencies = [ "sha2", "tauri-utils", "thiserror", - "time 0.3.15", - "uuid 1.3.1", + "time", + "uuid", "walkdir", ] [[package]] name = "tauri-macros" -version = "1.3.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8784cfe6f5444097e93c69107d1ac5e8f13d02850efa8d8f2a40fe79674cef46" +checksum = "613740228de92d9196b795ac455091d3a5fbdac2654abb8bb07d010b62ab43af" dependencies = [ "heck 0.4.1", "proc-macro2", @@ -3874,9 +4269,9 @@ dependencies = [ [[package]] name = "tauri-runtime" -version = "0.13.0" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3b80ea3fcd5fefb60739a3b577b277e8fc30434538a2f5bba82ad7d4368c422" +checksum = "07f8e9e53e00e9f41212c115749e87d5cd2a9eebccafca77a19722eeecd56d43" dependencies = [ "gtk", "http", @@ -3888,16 +4283,16 @@ dependencies = [ "tauri-utils", "thiserror", "url", - "uuid 1.3.1", + "uuid", "webview2-com", "windows 0.39.0", ] [[package]] name = "tauri-runtime-wry" -version = "0.13.0" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1c396950b1ba06aee1b4ffe6c7cd305ff433ca0e30acbc5fa1a2f92a4ce70f1" +checksum = "8141d72b6b65f2008911e9ef5b98a68d1e3413b7a1464e8f85eb3673bb19a895" dependencies = [ "cocoa", "gtk", @@ -3906,7 +4301,7 @@ dependencies = [ "raw-window-handle", "tauri-runtime", "tauri-utils", - "uuid 1.3.1", + "uuid", "webkit2gtk", "webview2-com", "windows 0.39.0", @@ -3916,13 +4311,14 @@ dependencies = [ [[package]] name = "tauri-sys" version = "0.1.0" -source = "git+https://github.com/JonasKruckenberg/tauri-sys#904450cffe9687fdd4c5163077550edffa650a68" +source = "git+https://github.com/JonasKruckenberg/tauri-sys#55fe1d144f30aa5aebeeb8ef937335f094720b4b" dependencies = [ "futures", "js-sys", "log", "serde", - "serde-wasm-bindgen", + "serde-wasm-bindgen 0.4.5", + "serde_repr", "thiserror", "wasm-bindgen", "wasm-bindgen-futures", @@ -3930,18 +4326,20 @@ dependencies = [ [[package]] name = "tauri-utils" -version = "1.3.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a6f9c2dafef5cbcf52926af57ce9561bd33bb41d7394f8bb849c0330260d864" +checksum = "34d55e185904a84a419308d523c2c6891d5e2dbcee740c4997eb42e75a7b0f46" dependencies = [ "brotli", "ctor", + "dunce", "glob", "heck 0.4.1", - "html5ever", + "html5ever 0.26.0", "infer", - "json-patch 1.0.0", - "kuchiki", + "json-patch", + "kuchikiki", + "log", "memchr", "phf 0.10.1", "proc-macro2", @@ -3956,17 +4354,27 @@ dependencies = [ "windows 0.39.0", ] +[[package]] +name = "tauri-winres" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5993dc129e544393574288923d1ec447c857f3f644187f4fbf7d9a875fbfc4fb" +dependencies = [ + "embed-resource", + "toml 0.7.8", +] + [[package]] name = "tempfile" -version = "3.5.0" +version = "3.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9fbec84f381d5795b08656e4912bec604d162bff9291d6189a78f4c8ab87998" +checksum = "7ef1adac450ad7f4b3c28589471ade84f25f731a7a0fe30d71dfa9f60fd808e5" dependencies = [ "cfg-if", "fastrand", - "redox_syscall 0.3.5", + "redox_syscall 0.4.1", "rustix", - "windows-sys 0.45.0", + "windows-sys", ] [[package]] @@ -3982,9 +4390,9 @@ dependencies = [ [[package]] name = "termcolor" -version = "1.2.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" +checksum = "ff1bc3d3f05aff0403e8ac0d92ced918ec05b666a43f83297ccef5bea8a3d449" dependencies = [ "winapi-util", ] @@ -3995,12 +4403,6 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" -[[package]] -name = "textwrap" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" - [[package]] name = "thin-slice" version = "0.1.1" @@ -4009,27 +4411,27 @@ checksum = "8eaa81235c7058867fa8c0e7314f33dcce9c215f535d1913822a2b3f5e289f3c" [[package]] name = "thiserror" -version = "1.0.40" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" +checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.40" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" +checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.39", ] [[package]] name = "thot-cli" -version = "0.10.0-intermediate" +version = "0.10.1" dependencies = [ "clap", "env_logger", @@ -4037,59 +4439,62 @@ dependencies = [ "log", "mockall", "rand 0.8.5", - "settings_manager", + "thiserror", "thot-core", "thot-local", - "uuid 0.8.2", ] [[package]] name = "thot-core" -version = "0.10.0-intermediate" +version = "0.10.1" dependencies = [ "aquamarine", "chrono", "clap", - "cluFlock", "derivative", "dev_utils", "directories", - "extendr-api", "fake", "has_id", - "indexmap", + "indexmap 2.1.0", "lazy_static", "mockall", "mockall_double", "ntest", - "pyo3", - "pythonize", "rand 0.8.5", "regex", "serde", "serde_json", + "thiserror", "tracing", - "uuid 1.3.1", + "uuid", "validator", "yew", ] -[[package]] -name = "thot-data" -version = "0.10.0-intermediate" - +[[package]] +name = "thot-data" +version = "0.10.0-intermediate" +dependencies = [ + "serde", + "serde_json", + "thot-core", + "thot-local", + "thot-local-database", +] + [[package]] name = "thot-desktop" -version = "0.10.0" +version = "0.10.1" dependencies = [ "aquamarine", "futures", - "gloo-storage", - "gloo-timers", - "indexmap", + "gloo-storage 0.3.0", + "gloo-timers 0.3.0", + "indexmap 2.1.0", "js-sys", "serde", - "serde-wasm-bindgen", + "serde-wasm-bindgen 0.6.1", "serde_json", "tauri-sys", "thot-core", @@ -4097,11 +4502,11 @@ dependencies = [ "thot-local", "thot-local-database", "thot-ui", - "time 0.3.15", + "time", "tracing", "tracing-subscriber", "tracing-web", - "uuid 1.3.1", + "uuid", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", @@ -4114,7 +4519,7 @@ dependencies = [ name = "thot-desktop-lib" version = "0.10.0" dependencies = [ - "indexmap", + "indexmap 2.1.0", "serde", "thot-core", "thot-local", @@ -4122,16 +4527,15 @@ dependencies = [ [[package]] name = "thot-desktop-tauri" -version = "0.10.0" +version = "0.10.1" dependencies = [ - "cluFlock", "directories", "open", "serde", "serde_json", - "settings_manager", "tauri", "tauri-build", + "thiserror", "thot-core", "thot-desktop-lib", "thot-local", @@ -4140,56 +4544,50 @@ dependencies = [ "tracing", "tracing-appender", "tracing-subscriber", - "uuid 1.3.1", + "trash", + "uuid", "zmq", ] -[[package]] -name = "thot-lang" -version = "0.10.0" -dependencies = [ - "serde", - "serde_json", - "thot-core", - "thot-local", - "thot-local-database", -] - [[package]] name = "thot-local" -version = "0.10.0-intermediate" +version = "0.10.1" dependencies = [ "aquamarine", - "cluFlock", "derivative", "dev_utils", "directories", "fake", + "glob", "has_id", "lazy_static", "rand 0.8.5", + "regex", "serde", "serde_json", - "settings_manager", - "settings_manager_change_path", + "thiserror", "thot-core", "tracing", - "uuid 1.3.1", + "uuid", "validator", ] [[package]] name = "thot-local-database" -version = "0.0.1" +version = "0.0.2" dependencies = [ "dev_utils", "fake", + "futures", "has_id", + "indexmap 2.1.0", "lazy_static", + "notify", + "notify-debouncer-full", "rand 0.8.5", "serde", "serde_json", - "settings_manager", + "thiserror", "thot-core", "thot-local", "tracing", @@ -4199,12 +4597,29 @@ dependencies = [ "zmq", ] +[[package]] +name = "thot-local-database-cli" +version = "0.0.1" +dependencies = [ + "clap", + "notify", + "notify-debouncer-full", + "serde", + "serde_json", + "thot-core", + "thot-local", + "thot-local-database", + "tracing", + "tracing-appender", + "tracing-subscriber", + "zmq", +] + [[package]] name = "thot-local-runner" version = "0.0.1" dependencies = [ "serde_json", - "settings_manager", "thot-core", "thot-local", "thot-local-database", @@ -4213,16 +4628,16 @@ dependencies = [ [[package]] name = "thot-ui" -version = "0.10.0" +version = "0.10.1" dependencies = [ "fake", - "indexmap", + "indexmap 2.1.0", "js-sys", "serde_json", "tauri-sys", "thot-core", "tracing", - "uuid 1.3.1", + "uuid", "wasm-bindgen", "wasm-bindgen-futures", "wasm-bindgen-test", @@ -4244,26 +4659,32 @@ dependencies = [ [[package]] name = "time" -version = "0.1.45" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" +checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5" dependencies = [ - "libc", - "wasi 0.10.0+wasi-snapshot-preview1", - "winapi", + "deranged", + "itoa 1.0.9", + "js-sys", + "powerfmt", + "serde", + "time-core", + "time-macros", ] [[package]] -name = "time" -version = "0.3.15" +name = "time-core" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" + +[[package]] +name = "time-macros" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d634a985c4d4238ec39cacaed2e7ae552fbd3c476b552c1deac3021b7d7eaf0c" +checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20" dependencies = [ - "itoa 1.0.6", - "js-sys", - "libc", - "num_threads", - "serde", + "time-core", ] [[package]] @@ -4283,26 +4704,53 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.27.0" +version = "1.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0de47a4eecbe11f498978a9b29d792f0d2692d1dd003650c24c76510e3bc001" +checksum = "d0c014766411e834f7af5b8f4cf46257aab4036ca95e9d2c144a10f59ad6f5b9" dependencies = [ - "autocfg", + "backtrace", "bytes", + "libc", + "mio", "num_cpus", "pin-project-lite", - "windows-sys 0.45.0", + "socket2 0.5.5", + "windows-sys", +] + +[[package]] +name = "tokio-native-tls" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" +dependencies = [ + "native-tls", + "tokio", ] [[package]] name = "tokio-stream" -version = "0.1.12" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fb52b74f05dbf495a8fba459fdc331812b96aa086d9eb78101fa0d4569c3313" +checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" dependencies = [ + "bytes", "futures-core", + "futures-sink", "pin-project-lite", "tokio", + "tracing", ] [[package]] @@ -4316,45 +4764,75 @@ dependencies = [ [[package]] name = "toml" -version = "0.7.3" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit 0.19.15", +] + +[[package]] +name = "toml" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b403acf6f2bb0859c93c7f0d967cb4a75a7ac552100f9322faf64dc047669b21" +checksum = "a1a195ec8c9da26928f773888e0742ca3ca1040c6cd859c919c9f59c1954ab35" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit", + "toml_edit 0.21.0", ] [[package]] name = "toml_datetime" -version = "0.6.1" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ab8ed2edee10b50132aed5f331333428b011c99402b5a534154ed15746f9622" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.19.8" +version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "239410c8609e8125456927e6707163a3b1fdb40561e4b803bc041f466ccfdc13" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap", + "indexmap 2.1.0", "serde", "serde_spanned", "toml_datetime", "winnow", ] +[[package]] +name = "toml_edit" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03" +dependencies = [ + "indexmap 2.1.0", + "serde", + "serde_spanned", + "toml_datetime", + "winnow", +] + +[[package]] +name = "tower-service" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" + [[package]] name = "tracing" -version = "0.1.37" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ - "cfg-if", "pin-project-lite", "tracing-attributes", "tracing-core", @@ -4362,31 +4840,32 @@ dependencies = [ [[package]] name = "tracing-appender" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09d48f71a791638519505cefafe162606f706c25592e4bde4d97600c0195312e" +checksum = "3566e8ce28cc0a3fe42519fc80e6b4c943cc4c8cef275620eb8dac2d3d4e06cf" dependencies = [ "crossbeam-channel", - "time 0.3.15", + "thiserror", + "time", "tracing-subscriber", ] [[package]] name = "tracing-attributes" -version = "0.1.23" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.39", ] [[package]] name = "tracing-core" -version = "0.1.30" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", "valuable", @@ -4394,12 +4873,12 @@ dependencies = [ [[package]] name = "tracing-log" -version = "0.1.3" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" dependencies = [ - "lazy_static", "log", + "once_cell", "tracing-core", ] @@ -4415,9 +4894,9 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.16" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6176eae26dd70d0c919749377897b54a9276bd7061339665dd68777926b5a70" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" dependencies = [ "matchers", "nu-ansi-term", @@ -4428,7 +4907,7 @@ dependencies = [ "sharded-slab", "smallvec", "thread_local", - "time 0.3.15", + "time", "tracing", "tracing-core", "tracing-log", @@ -4450,9 +4929,9 @@ dependencies = [ [[package]] name = "trash" -version = "3.0.2" +version = "3.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b782240476bca40f750a7f205510ac1449ab707d3ac3f451c4b356f557c0ecd" +checksum = "8c646008e5144d988005bec12b1e56f5e0a951e957176686815eba8b025e0418" dependencies = [ "chrono", "libc", @@ -4466,27 +4945,24 @@ dependencies = [ [[package]] name = "treediff" -version = "3.0.2" +version = "4.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "761e8d5ad7ce14bb82b7e61ccc0ca961005a275a060b9644a2431aa11553c2ff" +checksum = "52984d277bdf2a751072b5df30ec0377febdb02f7696d64c2d7d54630bac4303" dependencies = [ "serde_json", ] [[package]] -name = "treediff" -version = "4.0.2" +name = "try-lock" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52984d277bdf2a751072b5df30ec0377febdb02f7696d64c2d7d54630bac4303" -dependencies = [ - "serde_json", -] +checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" [[package]] name = "typenum" -version = "1.16.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "unicode-bidi" @@ -4496,9 +4972,9 @@ checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.8" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" @@ -4515,30 +4991,24 @@ version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" -[[package]] -name = "unicode-width" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" - -[[package]] -name = "unindent" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1766d682d402817b5ac4490b3c3002d91dfa0d22812f341609f97b08757359c" - [[package]] name = "url" -version = "2.3.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" dependencies = [ "form_urlencoded", - "idna 0.3.0", + "idna 0.5.0", "percent-encoding", "serde", ] +[[package]] +name = "urlencoding" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" + [[package]] name = "utf-8" version = "0.7.6" @@ -4546,50 +5016,35 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" [[package]] -name = "uuid" -version = "0.8.2" +name = "utf8parse" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" -dependencies = [ - "getrandom 0.2.9", - "serde", -] +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" [[package]] name = "uuid" -version = "1.3.1" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b55a3fef2a1e3b3a00ce878640918820d3c51081576ac657d23af9fc7928fdb" +checksum = "5e395fcf16a7a3d8127ec99782007af141946b4795001f876d54fb0d55978560" dependencies = [ - "getrandom 0.2.9", + "getrandom 0.2.11", "serde", "wasm-bindgen", ] [[package]] name = "validator" -version = "0.14.0" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d0f08911ab0fee2c5009580f04615fa868898ee57de10692a45da0c3bcc3e5e" +checksum = "b92f40481c04ff1f4f61f304d61793c7b56ff76ac1469f1beb199b1445b253bd" dependencies = [ - "idna 0.2.3", + "idna 0.4.0", "lazy_static", "regex", "serde", "serde_derive", "serde_json", "url", - "validator_types", -] - -[[package]] -name = "validator_types" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ded9d97e1d42327632f5f3bae6403c04886e2de3036261ef42deebd931a6a291" -dependencies = [ - "proc-macro2", - "syn 1.0.109", ] [[package]] @@ -4622,27 +5077,50 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +[[package]] +name = "vswhom" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be979b7f07507105799e854203b470ff7c78a1639e330a58f183b5fea574608b" +dependencies = [ + "libc", + "vswhom-sys", +] + +[[package]] +name = "vswhom-sys" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3b17ae1f6c8a2b28506cd96d412eebf83b4a0ff2cbefeeb952f2f9dfa44ba18" +dependencies = [ + "cc", + "libc", +] + [[package]] name = "walkdir" -version = "2.3.3" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" +checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" dependencies = [ "same-file", "winapi-util", ] [[package]] -name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" +name = "want" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] [[package]] name = "wasi" -version = "0.10.0+wasi-snapshot-preview1" +version = "0.9.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" [[package]] name = "wasi" @@ -4652,9 +5130,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.84" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31f8dcbc21f30d9b8f2ea926ecb58f6b91192c17e9d33594b3df58b2007ca53b" +checksum = "7daec296f25a1bae309c0cd5c29c4b260e510e6d813c286b19eaadf409d40fce" dependencies = [ "cfg-if", "serde", @@ -4664,24 +5142,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.84" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9" +checksum = "e397f4664c0e4e428e8313a469aaa58310d302159845980fd23b0f22a847f217" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.39", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.34" +version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f219e0d211ba40266969f6dbdd90636da12f75bee4fc9d6c23d1260dadb51454" +checksum = "9afec9963e3d0994cac82455b2b3502b81a7f40f9a0d32181f7528d9f4b43e02" dependencies = [ "cfg-if", "js-sys", @@ -4691,9 +5169,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.84" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c21f77c0bedc37fd5dc21f897894a5ca01e7bb159884559461862ae90c0b4c5" +checksum = "5961017b3b08ad5f3fe39f1e79877f8ee7c23c5e5fd5eb80de95abc41f1f16b2" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -4701,28 +5179,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.84" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6" +checksum = "c5353b8dab669f5e10f5bd76df26a9360c748f054f862ff5f3f8aae0c7fb3907" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.39", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.84" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d" +checksum = "0d046c5d029ba91a1ed14da14dca44b68bf2f124cfbaf741c54151fdb3e0750b" [[package]] name = "wasm-bindgen-test" -version = "0.3.34" +version = "0.3.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db36fc0f9fb209e88fb3642590ae0205bb5a56216dabd963ba15879fe53a30b" +checksum = "c6433b7c56db97397842c46b67e11873eda263170afeb3a2dc74a7cb370fee0d" dependencies = [ "console_error_panic_hook", "js-sys", @@ -4734,19 +5212,33 @@ dependencies = [ [[package]] name = "wasm-bindgen-test-macro" -version = "0.3.34" +version = "0.3.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0734759ae6b3b1717d661fe4f016efcfb9828f5edb4520c18eaee05af3b43be9" +checksum = "493fcbab756bb764fa37e6bee8cec2dd709eb4273d06d0c282a5e74275ded735" dependencies = [ "proc-macro2", "quote", + "syn 2.0.39", +] + +[[package]] +name = "wasm-streams" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4609d447824375f43e1ffbc051b50ad8f4b3ae8219680c94452ea05eb240ac7" +dependencies = [ + "futures-util", + "js-sys", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", ] [[package]] name = "web-sys" -version = "0.3.61" +version = "0.3.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e33b99f4b23ba3eec1a53ac264e35a755f00e966e0065077d6027c0f575b0b97" +checksum = "5db499c5f66323272151db0e666cd34f78617522fb0c1604d31a27c50c206a85" dependencies = [ "js-sys", "wasm-bindgen", @@ -4758,7 +5250,7 @@ version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8f859735e4a452aeb28c6c56a852967a8a76c8eb1cc32dbf931ad28a13d6370" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cairo-rs", "gdk", "gdk-sys", @@ -4783,7 +5275,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d76ca6ecc47aeba01ec61e480139dda143796abcae6f83bcddf50d6b5b1dcf3" dependencies = [ "atk-sys", - "bitflags", + "bitflags 1.3.2", "cairo-sys-rs", "gdk-pixbuf-sys", "gdk-sys", @@ -4796,7 +5288,7 @@ dependencies = [ "pango-sys", "pkg-config", "soup2-sys", - "system-deps 6.0.4", + "system-deps 6.2.0", ] [[package]] @@ -4855,9 +5347,9 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" dependencies = [ "winapi", ] @@ -4910,7 +5402,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" dependencies = [ - "windows-targets 0.48.0", + "windows-targets 0.48.5", ] [[package]] @@ -4923,6 +5415,15 @@ dependencies = [ "windows-tokens", ] +[[package]] +name = "windows-core" +version = "0.51.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" +dependencies = [ + "windows-targets 0.48.5", +] + [[package]] name = "windows-implement" version = "0.39.0" @@ -4939,37 +5440,13 @@ version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ee5e275231f07c6e240d14f34e1b635bf1faa1c76c57cfd59a5cdb9848e4278" -[[package]] -name = "windows-sys" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" -dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", -] - -[[package]] -name = "windows-sys" -version = "0.45.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" -dependencies = [ - "windows-targets 0.42.2", -] - [[package]] name = "windows-sys" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets 0.48.0", + "windows-targets 0.48.5", ] [[package]] @@ -4989,17 +5466,17 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ - "windows_aarch64_gnullvm 0.48.0", - "windows_aarch64_msvc 0.48.0", - "windows_i686_gnu 0.48.0", - "windows_i686_msvc 0.48.0", - "windows_x86_64_gnu 0.48.0", - "windows_x86_64_gnullvm 0.48.0", - "windows_x86_64_msvc 0.48.0", + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", ] [[package]] @@ -5016,9 +5493,9 @@ checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_msvc" @@ -5040,9 +5517,9 @@ checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" [[package]] name = "windows_aarch64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_i686_gnu" @@ -5064,9 +5541,9 @@ checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" [[package]] name = "windows_i686_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_msvc" @@ -5088,9 +5565,9 @@ checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" [[package]] name = "windows_i686_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_x86_64_gnu" @@ -5112,9 +5589,9 @@ checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" [[package]] name = "windows_x86_64_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnullvm" @@ -5124,9 +5601,9 @@ checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" [[package]] name = "windows_x86_64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_msvc" @@ -5148,33 +5625,44 @@ checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" [[package]] name = "windows_x86_64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "winnow" -version = "0.4.1" +version = "0.5.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae8970b36c66498d8ff1d66685dc86b91b29db0c7739899012f63a63814b4b28" +checksum = "829846f3e3db426d4cee4510841b71a8e58aa2a76b1132579487ae430ccd9c7b" dependencies = [ "memchr", ] [[package]] -name = "winres" -version = "0.1.12" +name = "winreg" +version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b68db261ef59e9e52806f688020631e987592bd83619edccda9c47d42cde4f6c" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" dependencies = [ - "toml 0.5.11", + "cfg-if", + "windows-sys", +] + +[[package]] +name = "winreg" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "937f3df7948156640f46aacef17a70db0de5917bda9c92b0f751f3a955b588fc" +dependencies = [ + "cfg-if", + "windows-sys", ] [[package]] name = "wry" -version = "0.24.3" +version = "0.24.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33748f35413c8a98d45f7a08832d848c0c5915501803d1faade5a4ebcd258cea" +checksum = "64a70547e8f9d85da0f5af609143f7bde3ac7457a6e1073104d9b73d6c5ac744" dependencies = [ "base64 0.13.1", "block", @@ -5186,7 +5674,7 @@ dependencies = [ "gio", "glib", "gtk", - "html5ever", + "html5ever 0.25.2", "http", "kuchiki", "libc", @@ -5231,24 +5719,24 @@ dependencies = [ [[package]] name = "xattr" -version = "0.2.3" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d1526bbe5aaeb5eb06885f4d987bcdfa5e23187055de9b83fe00156a821fabc" +checksum = "f4686009f71ff3e5c4dbcf1a282d0a44db3f021ba69350cd42086b3e5f1c6985" dependencies = [ "libc", ] [[package]] name = "yew" -version = "0.20.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dbecfe44343b70cc2932c3eb445425969ae21754a8ab3a0966981c1cf7af1cc" +checksum = "5f1a03f255c70c7aa3e9c62e15292f142ede0564123543c1cc0c7a4f31660cac" dependencies = [ "console_error_panic_hook", "futures", - "gloo", + "gloo 0.10.0", "implicit-clone", - "indexmap", + "indexmap 2.1.0", "js-sys", "prokio", "rustversion", @@ -5265,9 +5753,9 @@ dependencies = [ [[package]] name = "yew-macro" -version = "0.20.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b64c253c1d401f1ea868ca9988db63958cfa15a69f739101f338d6f05eea8301" +checksum = "02fd8ca5166d69e59f796500a2ce432ff751edecbbb308ca59fd3fe4d0343de2" dependencies = [ "boolinator", "once_cell", @@ -5275,21 +5763,22 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.39", ] [[package]] name = "yew-router" -version = "0.17.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "426ee0486d2572a6c5e39fbdbc48b58d59bb555f3326f54631025266cf04146e" +checksum = "4ca1d5052c96e6762b4d6209a8aded597758d442e6c479995faf0c7b5538e0c6" dependencies = [ - "gloo", + "gloo 0.10.0", "js-sys", "route-recognizer", "serde", "serde_urlencoded", "tracing", + "urlencoding", "wasm-bindgen", "web-sys", "yew", @@ -5298,29 +5787,29 @@ dependencies = [ [[package]] name = "yew-router-macro" -version = "0.17.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b249cdb39e0cddaf0644dedc781854524374664793479fdc01e6a65d6e6ae3" +checksum = "42bfd190a07ca8cfde7cd4c52b3ac463803dc07323db8c34daa697e86365978c" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.39", ] [[package]] name = "yew_icons" -version = "0.7.1" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b99d89a308cef6c47add715c5c20e381b1001ab74990ba9b66990b33a92f77d" +checksum = "f97c8e4ff3b77038b96e7a456e9fcbe45ee11387654ff4c4a24461c38b214d1f" dependencies = [ "yew", ] [[package]] name = "zeromq-src" -version = "0.2.5+4.3.4" +version = "0.2.6+4.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53aaa8119f753d047dc5a9dbcc720bf720b466fdf859aaaae8638f3afc1a3564" +checksum = "fc120b771270365d5ed0dfb4baf1005f2243ae1ae83703265cb3504070f4160b" dependencies = [ "cc", "dircpy", @@ -5328,9 +5817,9 @@ dependencies = [ [[package]] name = "zip" -version = "0.6.4" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0445d0fbc924bb93539b4316c11afb121ea39296f99a3c4c9edad09e3658cdef" +checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" dependencies = [ "byteorder", "crc32fast", @@ -5343,7 +5832,7 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd3091dd571fb84a9b3e5e5c6a807d186c411c812c8618786c3c30e5349234e7" dependencies = [ - "bitflags", + "bitflags 1.3.2", "libc", "zmq-sys", ] @@ -5355,6 +5844,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e8351dc72494b4d7f5652a681c33634063bbad58046c1689e75270908fdc864" dependencies = [ "libc", - "system-deps 6.0.4", + "system-deps 6.2.0", "zeromq-src", ] diff --git a/Cargo.toml b/Cargo.toml index afd33b6f..e9b203ab 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [workspace] - +resolver = "2" members = [ "cli", "core", @@ -9,17 +9,35 @@ members = [ "dev_utils", "has_id", "has_id/has_id_derive", - "lang", "lang/rust", "local", "local/database", + "local/database/cli", "local/runner", - "settings_manager", - "settings_manager/settings_manager_derive", - "settings_manager/settings_manager_change_path", "ui", ] +[workspace.dependencies] +aquamarine = "0.3" +clap = "4.4" +directories = "5.0" +indexmap = "2.1" +js-sys = "0.3" +serde = "1.0" +serde_json = "1.0" +serde-wasm-bindgen = "0.6" +tauri-sys = { git = "https://github.com/JonasKruckenberg/tauri-sys" } +thiserror = "1.0.44" +tracing = "0.1" +uuid = { version = "1.3", features = ["v4"] } +wasm-bindgen = "0.2" +wasm-bindgen-futures = "0.4" +web-sys = "0.3" +yew = "0.21" +yew-router = "0.18" +yew_icons = "0.8" +zmq = "0.10.0" + [profile.dev] opt-level = 0 debug = true diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 4b49b4ba..f7f7f77c 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "thot-cli" -version = "0.10.0-intermediate" +version = "0.10.1" edition = "2021" authors = [ "Brian Carlsen " ] @@ -16,11 +16,10 @@ categories = [ "science" ] [dependencies] log = { version = "0.4" } -env_logger = "0.9" -clap = { version = "3.2", features = ["derive"] } -uuid = { version = "0.8", features = ["serde", "v4"] } +env_logger = "0.10" +clap = { workspace = true, features = ["derive"] } +thiserror = { workspace = true } -settings_manager = { path = "../settings_manager" } thot-core = { path = "../core", features=["clap"] } thot-local = { path = "../local" } diff --git a/cli/src/commands/check.rs b/cli/src/commands/check.rs new file mode 100644 index 00000000..25e7d125 --- /dev/null +++ b/cli/src/commands/check.rs @@ -0,0 +1,63 @@ +//! Check a project's health. +use crate::Result; +use clap::Args; +use std::path::{Path, PathBuf}; +use std::{env, fs, io}; +use thot_local::project::{container, project, resources::Container}; + +#[derive(Debug, Args)] +pub struct CheckArgs { + #[clap(long)] + path: Option, + + #[clap(long, default_value_t = true)] + recurse: bool, +} + +/// Check a path to ensure no files are corrupted. +pub fn main(args: CheckArgs, verbose: bool) -> Result { + let path = match args.path { + Some(path) => path.clone(), + None => match env::current_dir() { + Ok(dir) => dir, + Err(err) => return Err(err.into()), + }, + }; + + if check_path(path, args.recurse)? { + println!("All ok"); + } + + Ok(()) +} + +/// Check the health of the path. +/// +/// # Returns +/// + `true` if healthy, `false` otherwise. +fn check_path(path: impl AsRef, recurse: bool) -> Result { + let path = path.as_ref(); + let mut is_healthy = true; + if container::path_is_container(path) { + match Container::load_from(path) { + Ok(_) => {} + Err(err) => { + is_healthy = false; + println!("Could not load {path:?}: {err:?}"); + } + } + } + + if recurse { + for entry in fs::read_dir(path)? { + let entry = entry?; + if entry.path().is_dir() { + if check_path(entry.path(), recurse)? { + is_healthy = false; + } + } + } + } + + Ok(is_healthy) +} diff --git a/cli/src/commands/config/commands.rs b/cli/src/commands/config/commands.rs index 3a0cc25f..fa560d4c 100644 --- a/cli/src/commands/config/commands.rs +++ b/cli/src/commands/config/commands.rs @@ -1,4 +1,4 @@ -use crate::result::Result; +use crate::Result; use thot_core::types::UserId; use thot_local::system::users; diff --git a/cli/src/commands/config/commands_test.rs b/cli/src/commands/config/commands_test.rs index e47ed9cb..f7df4ad9 100644 --- a/cli/src/commands/config/commands_test.rs +++ b/cli/src/commands/config/commands_test.rs @@ -1,26 +1,24 @@ use super::*; -use uuid::Uuid; -use thot_core::system::users; use fake::faker::internet::raw::FreeEmail; use fake::locales::EN; use fake::Fake; -use settings_manager::prelude::SystemSettings; -use thot_core::system::settings::user_settings::UserSettings; -use thot_core::system::resources::{user::User, user_id::UserId}; +use thot_core::system::User; +use thot_local::system::settings::UserSettings; #[test] fn set_user_should_work_with_email() { let email: String = FreeEmail(EN).fake(); let e_id = UserId::Email(email.clone()); let user = User::new(email.clone(), None); - let uid = Into::::into(user.rid.clone()); - users::add_user(user); - set_active_user(&e_id); + let uid = user.rid.clone(); + users::add_user(user).unwrap(); + set_active_user(&e_id).unwrap(); let settings = UserSettings::load().expect("user settings should load"); - + assert_eq!( - Some(uid), settings.active_user, + Some(uid), + settings.active_user, "user should be set as active" ); } @@ -28,18 +26,18 @@ fn set_user_should_work_with_email() { #[test] fn set_user_should_work_with_id() { let email: String = FreeEmail(EN).fake(); - let e_id = UserId::Email(email.clone()); let user = User::new(email.clone(), None); let uid = UserId::Id(user.rid.clone()); - let uuid = Into::::into(user.rid.clone()); + let uuid = user.rid.clone(); - users::add_user(user); - set_active_user(&uid); + users::add_user(user).unwrap(); + set_active_user(&uid).unwrap(); let settings = UserSettings::load().expect("user settings should load"); - + assert_eq!( - Some(uuid), settings.active_user, + Some(uuid), + settings.active_user, "user should be set as active" ); } @@ -56,13 +54,11 @@ fn set_user_with_id_should_error_if_the_user_does_not_exist() { }; } - #[test] #[should_panic(expected = "DoesNotExist")] fn set_user_with_email_should_error_if_the_user_does_not_exist() { let email: String = FreeEmail(EN).fake(); let e_id = UserId::Email(email.clone()); - let user = User::new(email.clone(), None); match set_active_user(&e_id) { Err(err) => panic!("{:?}", err), _ => (), diff --git a/cli/src/commands/config/mod.rs b/cli/src/commands/config/mod.rs index a534c537..f957af7a 100644 --- a/cli/src/commands/config/mod.rs +++ b/cli/src/commands/config/mod.rs @@ -1,4 +1,4 @@ -use crate::result::Result; +use crate::Result; use clap::{Args, Subcommand}; use std::path::PathBuf; use thot_core::types::UserId; @@ -22,4 +22,4 @@ pub struct ConfigArgs { #[derive(Debug, Subcommand)] enum Command { SetUser(UserId), -} +} \ No newline at end of file diff --git a/cli/src/commands/container/commands.rs b/cli/src/commands/container/commands.rs index 5d2bc969..0b5ce9a9 100644 --- a/cli/src/commands/container/commands.rs +++ b/cli/src/commands/container/commands.rs @@ -1,12 +1,12 @@ -use super::{AddAssetArgs, AddChildArgs, AddScriptArgs, InitArgs, NewArgs, NewChildArgs}; +use super::{AssociateScriptArgs, InitArgs, NewArgs}; use crate::common::abs_path; -use crate::result::Result; -use settings_manager::local_settings::LocalSettings; +use crate::Result; use std::env; -use thot_core::result::{Error as CoreError, ProjectError as CoreProjectError}; -use thot_local::project::resources::{Container, ScriptAssociation}; +use thot_core::error::{Error as CoreError, ProjectError as CoreProjectError, ResourceError}; +use thot_core::project::ScriptAssociation; +use thot_local::error::{ContainerError as LocalContainerError, Error as LocalError}; +use thot_local::project::resources::{Container, Scripts}; use thot_local::project::{container, project, script}; -use thot_local::result::{ContainerError as LocalContainerError, Error as LocalError}; pub fn init(args: InitArgs, verbose: bool) -> Result { let path = match args.path { @@ -14,78 +14,35 @@ pub fn init(args: InitArgs, verbose: bool) -> Result { Some(path) => path, }; - let rid = container::init(path.as_path())?; - if verbose { - println!("Initialized {:?} as a Container with {:?}", &path, &rid); - } - - Ok(()) -} - -pub fn new(args: NewArgs, verbose: bool) -> Result { - let rid = container::new(args.name.as_path())?; - if verbose { - println!("Created new Container at {:?} with {:?}", &args.name, &rid); - } - - Ok(()) -} - -pub fn add_child(args: AddChildArgs, verbose: bool) -> Result { - let child = abs_path(args.path)?; - let parent = match args.parent { - None => env::current_dir()?, - Some(p) => abs_path(p)?, - }; - - let _rid = container::init_child(&child, Some(&parent))?; - if verbose { - println!("Added {:?} as a child to {:?}", &child, &parent); - } - - Ok(()) -} - -pub fn new_child(args: NewChildArgs, verbose: bool) -> Result { - let parent = match args.parent { - None => env::current_dir()?, - Some(p) => abs_path(p)?, - }; - - let mut child = args.path; - if child.is_relative() { - let cwd = env::current_dir()?; - child = cwd.join(child); + let mut builder = container::InitOptions::init(); + builder.recurse(!args.no_recurse); + if args.no_assets { + builder.without_assets(); + } else { + builder.with_assets(); } - let _rid = container::new_child(&child, Some(&parent))?; + let rid = builder.build(&path)?; if verbose { - println!("Created {:?} as a child of {:?}", &child, &parent); + println!("Initialized {path:?} as a Container with {rid:?}"); } Ok(()) } -pub fn add_asset(args: AddAssetArgs, verbose: bool) -> Result { - let asset = abs_path(args.path)?; - let parent = match args.parent { - None => env::current_dir()?, - Some(p) => abs_path(p)?, - }; - - let mut container = Container::load(&parent)?; - container.add_asset(&asset)?; - container.save()?; - +pub fn new(args: NewArgs, verbose: bool) -> Result { + let path = abs_path(args.path)?; + let builder = container::InitOptions::new(); + builder.build(&path)?; if verbose { - println!("Added {:?} as an Asset to {:?}", &asset, &parent); + println!("Initialized `{path:?}` as a Container"); } Ok(()) } /// Add a script association to the container. -pub fn add_script(args: AddScriptArgs, verbose: bool) -> Result { +pub fn associate_script(args: AssociateScriptArgs, verbose: bool) -> Result { // validate container and script, if required let cont = match args.container { None => env::current_dir()?, @@ -99,28 +56,52 @@ pub fn add_script(args: AddScriptArgs, verbose: bool) -> Result { } let prj_path = project::project_root_path(&cont)?; - let script_id; - if !script::path_is_registered(&args.path, Some(&prj_path))? { - if !args.register { - return Err(CoreError::ProjectError(CoreProjectError::NotRegistered( - None, - Some(args.path), + let project = match thot_local::project::project::project_id(&prj_path)? { + Some(project) => project, + None => { + return Err(CoreError::ResourceError(ResourceError::does_not_exist( + "path is not a project", )) - .into()); - } else { - script_id = script::init(&args.path, Some(&prj_path))?; - if verbose { - println!( - "Path initialized as a Script with {:?} for Project {:?}", - &script_id, &prj_path - ); + .into()) + } + }; + + let scripts = Scripts::load_from(&prj_path)?; + let script = scripts + .values() + .filter_map(|script| { + if script.path.as_path() == args.path.as_path() { + Some(script.rid.clone()) + } else { + None + } + }) + .collect::>(); + + let script_id = match script.as_slice() { + [] => { + if !args.register { + return Err(CoreError::ProjectError(CoreProjectError::NotRegistered( + None, + Some(args.path), + )) + .into()); + } else { + let script_id = script::init(project, args.path.clone())?; + if verbose { + println!( + "Path initialized as a Script with {script_id:?} for Project {prj_path:?}" + ); + } + + script_id } } - } else { - script_id = script::id_by_path(&args.path, Some(&prj_path))?; - } + [script_id] => script_id.clone(), + _ => panic!("path registered as script multiple times"), + }; - let mut container = Container::load(&cont)?; + let mut container = Container::load_from(&cont)?; let mut assoc = ScriptAssociation::new(script_id); if args.priority.is_some() { assoc.priority = args.priority.unwrap(); @@ -134,7 +115,3 @@ pub fn add_script(args: AddScriptArgs, verbose: bool) -> Result { container.save()?; Ok(()) } - -#[cfg(test)] -#[path = "./commands_test.rs"] -mod commands_test; diff --git a/cli/src/commands/container/commands_test.rs b/cli/src/commands/container/commands_test.rs deleted file mode 100644 index 88bd7dec..00000000 --- a/cli/src/commands/container/commands_test.rs +++ /dev/null @@ -1,12 +0,0 @@ -use super::super::{InitAgs, NewArgs}; -use super::*; - -#[test] -fn init_should_work() { - todo!(); -} - -#[test] -fn new_should_work() { - todo!(); -} diff --git a/cli/src/commands/container/mod.rs b/cli/src/commands/container/mod.rs index a8ff1674..4484f452 100644 --- a/cli/src/commands/container/mod.rs +++ b/cli/src/commands/container/mod.rs @@ -1,5 +1,5 @@ -use crate::result::Result; use crate::types::ResourcePathType; +use crate::Result; use clap::{Args, Subcommand}; use std::path::PathBuf; mod commands; @@ -8,10 +8,7 @@ pub fn main(args: ContainerArgs, verbose: bool) -> Result { match args.command { Command::Init(init_args) => commands::init(init_args, verbose), Command::New(new_args) => commands::new(new_args, verbose), - Command::AddChild(add_args) => commands::add_child(add_args, verbose), - Command::NewChild(new_args) => commands::new_child(new_args, verbose), - Command::AddAsset(add_args) => commands::add_asset(add_args, verbose), - Command::AddScript(add_args) => commands::add_script(add_args, verbose), + Command::AssociateScript(add_args) => commands::associate_script(add_args, verbose), } } @@ -25,57 +22,33 @@ pub struct ContainerArgs { enum Command { Init(InitArgs), New(NewArgs), - AddChild(AddChildArgs), - NewChild(NewChildArgs), - AddAsset(AddAssetArgs), - AddScript(AddScriptArgs), + AssociateScript(AssociateScriptArgs), } #[derive(Debug, Args)] pub struct InitArgs { - #[clap(short, long, parse(from_os_str))] + #[clap(short, long)] path: Option, -} - -#[derive(Debug, Args)] -pub struct NewArgs { - #[clap(parse(from_os_str))] - name: PathBuf, -} -#[derive(Debug, Args)] -pub struct AddChildArgs { - #[clap(parse(from_os_str))] - path: PathBuf, - - #[clap(short, long, parse(from_os_str))] - parent: Option, -} - -#[derive(Debug, Args)] -pub struct NewChildArgs { - #[clap(parse(from_os_str))] - path: PathBuf, + /// Do not add files as Assets. + #[clap(long)] + no_assets: bool, - #[clap(short, long, parse(from_os_str))] - parent: Option, + /// Do not recurse. + #[clap(long)] + no_recurse: bool, } #[derive(Debug, Args)] -pub struct AddAssetArgs { - #[clap(parse(from_os_str))] +pub struct NewArgs { path: PathBuf, - - #[clap(short, long, parse(from_os_str))] - parent: Option, } #[derive(Debug, Args)] -pub struct AddScriptArgs { - #[clap(parse(from_os_str))] +pub struct AssociateScriptArgs { path: PathBuf, - #[clap(short, long, parse(from_os_str))] + #[clap(short, long)] container: Option, #[clap(short, long)] @@ -87,8 +60,8 @@ pub struct AddScriptArgs { // force register parameters #[clap(long)] register: bool, - - // @todo: Only valid if register is true + + // TODO Only valid if register is true #[clap(long, value_enum)] path_type: Option, } diff --git a/cli/src/commands/mod.rs b/cli/src/commands/mod.rs index aa71af5d..1716895a 100644 --- a/cli/src/commands/mod.rs +++ b/cli/src/commands/mod.rs @@ -1,7 +1,6 @@ -pub mod run; - +pub mod check; pub mod config; pub mod container; pub mod project; -pub mod remote; +pub mod run; pub mod user; diff --git a/cli/src/commands/project/commands.rs b/cli/src/commands/project/commands.rs index 21cc7607..1d5eb5ea 100644 --- a/cli/src/commands/project/commands.rs +++ b/cli/src/commands/project/commands.rs @@ -1,17 +1,29 @@ use super::AddScriptArgs; -use crate::result::Result; +use crate::Result; +use std::env; +use thot_core::error::{Error as CoreError, ResourceError}; use thot_local::project::script; pub fn add_script(args: AddScriptArgs, verbose: bool) -> Result { // format project - let project = match &args.project { - None => None, - Some(p) => Some(p.as_path()), + let project = match args.project.as_ref() { + None => env::current_dir().unwrap(), + Some(p) => p.clone(), }; - script::init(&args.path, project)?; + let project = match thot_local::project::project::project_id(&project)? { + Some(project) => project, + None => { + return Err(CoreError::ResourceError(ResourceError::does_not_exist( + "path is not a project", + )) + .into()) + } + }; + + script::init(project, args.path.clone())?; if verbose { - match &args.project { + match args.project.as_ref() { None => println!("Added script at {:?} to the current project.", &args.path), Some(p) => println!( "Added script at {:?} to the project at project {:?}.", diff --git a/cli/src/commands/project/init.rs b/cli/src/commands/project/init.rs index 8fad73c1..6de9c2e6 100644 --- a/cli/src/commands/project/init.rs +++ b/cli/src/commands/project/init.rs @@ -1,32 +1,58 @@ -use crate::result::Result; +use crate::Result; use clap::Args; use std::env; use std::path::PathBuf; -use thot_local::project::project; +use thot_local::project; #[derive(Debug, Args)] pub struct InitArgs { - #[clap(short, long, parse(from_os_str))] + #[clap(short, long)] root: Option, + + /// Relative path to the data root. + #[clap(long, default_value = "data")] + data_root: PathBuf, + + /// Relative path to the analysis root. + #[clap(long, default_value = "analysis")] + analysis_root: PathBuf, } /// Initializes a new Thot project. +/// Initilizes and registers the project. +/// Initializes any existing folders as the `Container` graph moving them into the data root folder. +/// If analysis root exists, registers all valid files as scripts. +/// +/// Searches for `data` folder to be used as the `Project`'s data root, +/// and `analysis` folder for the analysis root, creating them if they don't exist. +/// If the data root folder does not exist, move the contents of the folder into it. +/// e.g. +/// **Original** +/// my_project/ +/// |- root_data.csv +/// |- group_1/ +/// | |- group_1_data.csv +/// +/// **Initialized** +/// my_project/ +/// |- analysis/ +/// |- data/ +/// | |- root_data.csv +/// | |- group_1 +/// | | |- group_1_data.csv +/// pub fn main(args: InitArgs, verbose: bool) -> Result { - // get root passed in or default to current folder let root = match args.root { - Some(root) => root, + Some(root) => root.clone(), None => match env::current_dir() { Ok(dir) => dir, Err(err) => return Err(err.into()), }, }; + project::init(&root, &args.data_root, &args.analysis_root)?; if verbose { - println!("Initializing Thot project in {}", root.display()); - } - - if let Err(err) = project::init(root.as_path()) { - return Err(err.into()); + println!("Initialized {root:?} as a Thot project."); } Ok(()) diff --git a/cli/src/commands/project/mod.rs b/cli/src/commands/project/mod.rs index edcdf8a4..7a3cfa43 100644 --- a/cli/src/commands/project/mod.rs +++ b/cli/src/commands/project/mod.rs @@ -1,5 +1,4 @@ -use crate::result::Result; -use crate::types::ResourcePathType; +use crate::Result; use clap::{Args, Subcommand}; use std::path::PathBuf; mod commands; @@ -34,13 +33,11 @@ enum Command { #[derive(Debug, Args)] pub struct AddScriptArgs { - #[clap(parse(from_os_str))] path: PathBuf, - #[clap(short, long, parse(from_os_str))] + #[clap(short, long)] project: Option, - - // @todo: Allow path type to be specified + // TODO Allow path type to be specified // #[clap(long, value_enum)] // path_type: Option, } diff --git a/cli/src/commands/project/move.rs b/cli/src/commands/project/move.rs index 8a824a6a..de78ac2a 100644 --- a/cli/src/commands/project/move.rs +++ b/cli/src/commands/project/move.rs @@ -1,18 +1,16 @@ -use crate::result::Result; +use crate::Result; use clap::Args; -use std::env; use std::path::PathBuf; -use thot_core::result::{Error as CoreError, ProjectError as CoreProjectError}; -use thot_local::common::canonicalize_path; +use std::{env, fs}; +use thot_core::error::{Error as CoreError, ProjectError as CoreProjectError}; use thot_local::project::project; use thot_local::system::projects; #[derive(Debug, Args)] pub struct MoveArgs { - #[clap(parse(from_os_str))] to: PathBuf, - #[clap(long, parse(from_os_str))] + #[clap(long)] from: Option, } @@ -20,10 +18,7 @@ pub struct MoveArgs { pub fn main(args: MoveArgs, verbose: bool) -> Result { // parse to and from args let from = match args.from { - Some(path) => match canonicalize_path(path) { - Ok(path) => path, - Err(err) => return Err(err.into()), - }, + Some(path) => fs::canonicalize(path)?, None => match env::current_dir() { Ok(dir) => match project::project_root_path(dir.as_path()) { Ok(path) => path, @@ -33,30 +28,19 @@ pub fn main(args: MoveArgs, verbose: bool) -> Result { }, }; - let prj = projects::project_by_path(from.as_path())?; - let rid = match prj { + let pid = match projects::get_id(&from)? { + Some(pid) => pid, None => { return Err( CoreError::ProjectError(CoreProjectError::NotRegistered(None, Some(from))).into(), ) } - Some(p) => p.rid, }; - let to = args.to; - + project::mv(&pid, args.to.as_path())?; if verbose { - println!("Moving project located at {:?} to {:?}", from, to); - } - - // move project - if let Err(err) = project::mv(&rid, to.as_path()) { - return Err(err.into()); + println!("Project moved from `{from:?}` to `{:?}`", args.to); } Ok(()) } - -#[cfg(test)] -#[path = "./move_test.rs"] -mod move_test; diff --git a/cli/src/commands/project/new.rs b/cli/src/commands/project/new.rs index b2d55ebf..acc7bf47 100644 --- a/cli/src/commands/project/new.rs +++ b/cli/src/commands/project/new.rs @@ -1,4 +1,4 @@ -use crate::result::Result; +use crate::Result; use clap::Args; use std::env; use std::path::{Path, PathBuf}; @@ -8,7 +8,7 @@ use thot_local::project::project; pub struct NewArgs { name: String, - #[clap(short, long, parse(from_os_str))] + #[clap(short, long)] root: Option, } @@ -36,7 +36,3 @@ pub fn main(args: NewArgs, verbose: bool) -> Result { Ok(()) } - -#[cfg(test)] -#[path = "./new_test.rs"] -mod new_test; diff --git a/cli/src/commands/project/new_test.rs b/cli/src/commands/project/new_test.rs deleted file mode 100644 index e69de29b..00000000 diff --git a/cli/src/commands/remote/mod.rs b/cli/src/commands/remote/mod.rs deleted file mode 100644 index a273c8cd..00000000 --- a/cli/src/commands/remote/mod.rs +++ /dev/null @@ -1,10 +0,0 @@ -use crate::result::Result; -use clap::Args; - -pub fn main(args: RemoteArgs, verbose: bool) -> Result<()> { - todo!(); - Ok(()) -} - -#[derive(Debug, Args)] -pub struct RemoteArgs {} diff --git a/cli/src/commands/run.rs b/cli/src/commands/run.rs index 1ee1f03d..f00509bf 100644 --- a/cli/src/commands/run.rs +++ b/cli/src/commands/run.rs @@ -1,4 +1,4 @@ -use crate::result::Result; +use crate::Result; use clap::Args; #[derive(Debug, Args)] diff --git a/cli/src/commands/user/commands.rs b/cli/src/commands/user/commands.rs index 8978e805..899abe57 100644 --- a/cli/src/commands/user/commands.rs +++ b/cli/src/commands/user/commands.rs @@ -1,7 +1,6 @@ use super::{AddArgs, EditUserFields}; -use crate::result::Result; -use thot_core::result::{Error as CoreError, ResourceError}; -use settings_manager::{ListSetting, SystemSettings}; +use crate::Result; +use thot_core::error::{Error as CoreError, ResourceError}; use thot_core::system::User; use thot_core::types::UserId; use thot_local::system::collections::Users; @@ -12,7 +11,7 @@ use thot_local::system::users; /// If verbose, output is of the form `name (id)` with each user on a new line. /// If not verbose, output is of the form `name ` with each user on a new line. pub fn list(verbose: bool) -> Result { - let mut users = match Users::load() { + let users = match Users::load() { Ok(sets) => sets, Err(err) => panic!("Something went wrong: {:?}", err), }; @@ -28,21 +27,13 @@ pub fn list(verbose: bool) -> Result { }, }; - let users: Vec = users.items().iter().map(user_str).collect(); - - let mut out = String::new(); + let users = users.values().map(user_str).collect::>(); if users.len() == 0 { - out.push_str("No users"); - } else { - for user in users { - out.push_str(user.as_str()); - out.push('\n'); - } - - out.pop(); // remove last new line + println!("No users"); + return Ok(()); } - println!("{}", out); + println!("{}", users.join("\n")); Ok(()) } @@ -79,14 +70,23 @@ pub fn delete(id: UserId) -> Result { pub fn edit(id: UserId, edits: EditUserFields) -> Result { let mut user: User = match id { UserId::Id(uid) => match users::user_by_id(&uid) { - Ok(u) => u, + Ok(Some(user)) => user, + Ok(None) => { + return Err(CoreError::ResourceError(ResourceError::does_not_exist( + "user does not exist", + )) + .into()); + } Err(err) => return Err(err.into()), }, UserId::Email(email) => match users::user_by_email(&email) { - Ok(u) => match u { - None => return Err(CoreError::ResourceError(ResourceError::DoesNotExist("user with email `{email}` is not registered".to_string())).into()), - Some(u) => u, - }, + Ok(Some(user)) => user, + Ok(None) => { + return Err(CoreError::ResourceError(ResourceError::DoesNotExist( + "user with email `{email}` is not registered".to_string(), + )) + .into()); + } Err(err) => return Err(err.into()), }, }; diff --git a/cli/src/commands/user/mod.rs b/cli/src/commands/user/mod.rs index 812878f9..c4631199 100644 --- a/cli/src/commands/user/mod.rs +++ b/cli/src/commands/user/mod.rs @@ -1,4 +1,4 @@ -use crate::result::Result; +use crate::Result; use clap::{ArgGroup, Args, Subcommand}; use thot_core::types::UserId; mod commands; diff --git a/cli/src/common.rs b/cli/src/common.rs index 7a932468..475b1fe8 100644 --- a/cli/src/common.rs +++ b/cli/src/common.rs @@ -1,16 +1,14 @@ -use crate::result::Result; -use std::env; +use crate::Result; use std::path::PathBuf; -use thot_local::common::canonicalize_path; +use std::{env, fs}; /// Returns the absolute version of the path, relative to the current directory, if path is relative. -pub fn abs_path(path: PathBuf) -> Result { - let mut path = path; +pub fn abs_path(mut path: PathBuf) -> Result { if path.is_relative() { let cwd = env::current_dir()?; path = cwd.join(path); }; - path = canonicalize_path(path)?; + path = fs::canonicalize(path)?; Ok(path) } diff --git a/cli/src/common_test.rs b/cli/src/common_test.rs deleted file mode 100644 index e69de29b..00000000 diff --git a/cli/src/error.rs b/cli/src/error.rs new file mode 100644 index 00000000..25e93704 --- /dev/null +++ b/cli/src/error.rs @@ -0,0 +1,43 @@ +use clap::error::Error as ClapError; +use std::io; +use std::result::Result as StdResult; +use thot_core::Error as CoreError; +use thot_local::Error as LocalError; + +// ************* +// *** Error *** +// ************* + +#[derive(Debug)] +pub enum Error { + Clap(ClapError), + Core(CoreError), + Io(io::Error), + Local(LocalError), +} + +impl From for Error { + fn from(err: ClapError) -> Self { + Error::Clap(err) + } +} + +impl From for Error { + fn from(err: CoreError) -> Self { + Error::Core(err) + } +} + +impl From for Error { + fn from(err: io::Error) -> Self { + Error::Io(err) + } +} + +impl From for Error { + fn from(err: LocalError) -> Self { + Error::Local(err) + } +} + +pub type Result = StdResult; diff --git a/cli/src/lib.rs b/cli/src/lib.rs index f7755be4..4a0cbf18 100644 --- a/cli/src/lib.rs +++ b/cli/src/lib.rs @@ -1,4 +1,8 @@ +#![feature(io_error_more)] + pub mod commands; pub mod common; -pub mod result; +pub mod error; pub mod types; + +pub use error::Result; diff --git a/cli/src/main.rs b/cli/src/main.rs index a6ff7a6e..dacf9704 100644 --- a/cli/src/main.rs +++ b/cli/src/main.rs @@ -1,5 +1,5 @@ use clap::{Parser, Subcommand}; -use thot_cli::commands::{config, container, project, remote, run, user}; +use thot_cli::commands::{check, config, container, project, run, user}; fn main() { let cli = Cli::parse(); @@ -10,12 +10,12 @@ fn main() { Command::Init(args) => project::init::main(args, cli.verbose), Command::Move(args) => project::r#move::main(args, cli.verbose), Command::Run(args) => run::main(args, cli.verbose), + Command::Check(args) => check::main(args, cli.verbose), // subcommands Command::Config(args) => config::main(args, cli.verbose), Command::User(args) => user::main(args, cli.verbose), Command::Container(args) => container::main(args, cli.verbose), - Command::Remote(args) => remote::main(args, cli.verbose), Command::Project(args) => project::main(args, cli.verbose), }; @@ -27,8 +27,7 @@ fn main() { #[derive(Debug, Parser)] #[clap(name = "Thot CLI")] -#[clap(version)] -#[clap(about, long_about = None)] +#[clap(version, about, long_about = None)] struct Cli { #[clap(subcommand)] command: Command, @@ -44,11 +43,11 @@ enum Command { Init(project::init::InitArgs), Run(run::RunArgs), Move(project::r#move::MoveArgs), + Check(check::CheckArgs), // subcommands Config(config::ConfigArgs), User(user::UserArgs), - Remote(remote::RemoteArgs), Container(container::ContainerArgs), Project(project::ProjectArgs), } diff --git a/cli/src/result.rs b/cli/src/result.rs deleted file mode 100644 index 7478fa6f..00000000 --- a/cli/src/result.rs +++ /dev/null @@ -1,55 +0,0 @@ -use clap::error::Error as ClapError; -use settings_manager::result::Error as SettingsError; -use std::io; -use std::result::Result as StdResult; -use thot_core::result::Error as CoreError; -use thot_local::result::Error as LocalError; - -// ************* -// *** Error *** -// ************* - -#[derive(Debug)] -pub enum Error { - ClapError(ClapError), - CoreError(CoreError), - IoError(io::Error), - LocalError(LocalError), - SettingsError(SettingsError), -} - -impl From for Error { - fn from(err: ClapError) -> Self { - Error::ClapError(err) - } -} - -impl From for Error { - fn from(err: CoreError) -> Self { - Error::CoreError(err) - } -} - -impl From for Error { - fn from(err: io::Error) -> Self { - Error::IoError(err) - } -} - -impl From for Error { - fn from(err: LocalError) -> Self { - Error::LocalError(err) - } -} - -impl From for Error { - fn from(err: SettingsError) -> Self { - Error::SettingsError(err) - } -} - -pub type Result = StdResult; - -#[cfg(test)] -#[path = "./result_test.rs"] -mod result_test; diff --git a/cli/src/result_test.rs b/cli/src/result_test.rs deleted file mode 100644 index c5b1ea0a..00000000 --- a/cli/src/result_test.rs +++ /dev/null @@ -1,50 +0,0 @@ -use super::*; -use std::io; -use settings_manager::result::Error as SettingsError; -use thot_core::result::Error as ThotError; -use clap::Command; -use clap::error::ErrorKind as ClapErrorKind; - -#[test] -fn error_from_clap_error_should_work() { - let cmd = Command::new("test"); - let o_err = cmd.error(ClapErrorKind::InvalidValue, "test"); - - let c_err: Error = o_err.into(); - assert!(matches!(c_err, Error::ClapError(_))); -} - -#[test] -fn error_from_io_error_should_work() { - let o_err = io::Error::new( - io::ErrorKind::Other, - "test" - ); - - let c_err: Error = o_err.into(); - assert!(matches!(c_err, Error::IoError(_))); -} - -#[test] -fn error_from_settings_manager_error_should_work() { - let io_err = io::Error::new( - io::ErrorKind::Other, - "test" - ); - - let o_err = SettingsError::IoError(io_err); - let c_err: Error = o_err.into(); - assert!(matches!(c_err, Error::SettingsError(_))); -} - -#[test] -fn error_from_thot_core_error_should_work() { - let io_err = io::Error::new( - io::ErrorKind::Other, - "test" - ); - - let o_err = ThotError::IoError(io_err); - let c_err: Error = o_err.into(); - assert!(matches!(c_err, Error::ThotError(_))); -} diff --git a/core/Cargo.toml b/core/Cargo.toml index d5334cc9..a0176a4c 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "thot-core" -version = "0.10.0-intermediate" +version = "0.10.1" edition = "2021" authors = [ "Brian Carlsen " ] @@ -15,32 +15,29 @@ categories = [ "science", "data-structures" ] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -aquamarine = "0.1" +aquamarine = { workspace = true } chrono = { version = "0.4", features = ["serde"] } -clap = { version = "3.1", optional = true } -cluFlock = "1.2" +clap = { workspace = true, optional = true } derivative = "2.2" -directories = "4.0" -extendr-api = { version = "*", optional = true } -indexmap = { version = "1.9.2", features = ["serde"] } -pyo3 = { version = "0.17", features = ["extension-module", "macros", "serde"], optional = true } -pythonize = { version = "0.17", optional = true} +directories = "5.0" +indexmap = { workspace = true, features = ["serde"] } regex = "1" -serde = { version = "1.0", features = ["derive"], optional = true } -serde_json = { version = "1.0" } -uuid = { version = "1.2", features = ["serde", "v4"] } -validator = "0.14" -yew = { version = "0.20", optional = true } +serde = { workspace = true, features = ["derive"], optional = true } +serde_json = { workspace = true } +thiserror = { workspace = true } +tracing = { workspace = true } +uuid = { workspace = true, features = ["serde", "v4"] } +validator = "0.16" +yew = { workspace = true, optional = true } has_id = { path = "../has_id", features = ["derive"] } -tracing = "0.1.37" [dev-dependencies] rand = "0.8" fake = "2.4" mockall = { version = "0.11", features = ["nightly"] } mockall_double = "0.3" -ntest = "0.7" +ntest = "0.9" dev_utils = { path = "../dev_utils" } lazy_static = "1.4" @@ -53,7 +50,5 @@ system = [] serde = ["dep:serde", "serde/rc", "has_id/serde"] clap = ["dep:clap"] -extendr = ["dep:extendr-api"] js = ["uuid/js"] -pyo3 = ["dep:pyo3", "dep:pythonize"] yew = ["dep:yew", "chrono/wasmbind", "chrono/clock"] diff --git a/core/src/api/database.rs b/core/src/api/database.rs deleted file mode 100644 index adaf646f..00000000 --- a/core/src/api/database.rs +++ /dev/null @@ -1,29 +0,0 @@ -//! API interface functionality. -use crate::db::StandardSearchFilter as StdFilter; -use crate::project::{Asset, Container}; -use crate::Result; -use std::path::PathBuf; - -pub trait Database { - /// Returns the root of the database. - fn root(&self) -> PathBuf; - - /// Finds a single Container matching the search fitler. - fn find_container(&self, search: StdFilter) -> Option; - - /// Finds all Containers matching the search filter. - fn find_containers(&self, search: StdFilter) -> Vec; - - /// Finds a single Asset matching the search filter. - fn find_asset(&self, search: StdFilter) -> Option; - - /// Finds all Assets matching the search filter. - fn find_assets(&self, search: StdFilter) -> Vec; - - /// Adds an Asset to the database. - fn add_asset(&mut self, asset: Asset) -> Result; -} - -#[cfg(test)] -#[path = "./database_test.rs"] -mod database_test; diff --git a/core/src/api/database_test.rs b/core/src/api/database_test.rs deleted file mode 100644 index e69de29b..00000000 diff --git a/core/src/api/mod.rs b/core/src/api/mod.rs deleted file mode 100644 index 179e0fd3..00000000 --- a/core/src/api/mod.rs +++ /dev/null @@ -1,9 +0,0 @@ -//! API definitions. -pub mod database; - -// Re-exports -pub use database::Database; - -#[cfg(test)] -#[path = "./mod_test.rs"] -mod mod_test; diff --git a/core/src/api/mod_test.rs b/core/src/api/mod_test.rs deleted file mode 100644 index e69de29b..00000000 diff --git a/core/src/db/dev_utils.rs b/core/src/db/dev_utils.rs index ddca1c22..3aaeb99b 100644 --- a/core/src/db/dev_utils.rs +++ b/core/src/db/dev_utils.rs @@ -1,26 +1,57 @@ //! Dev utils for database. -use crate::db::{Resource, StandardResource}; -use crate::project::StandardProperties; -use crate::types::ResourceId; +use crate::project::{Asset, Container}; +use crate::types::ResourcePath; +use fake::faker::filesystem::raw::FilePath; use fake::faker::lorem::raw::{Word, Words}; use fake::locales::EN; use fake::Fake; -use has_id::HasId; use serde_json::Value; use std::collections::HashMap; -use std::hash::{Hash, Hasher}; +use std::path::PathBuf; -#[cfg(feature = "serde")] -use serde::Deserialize; +/// Create a fake [`ContainerProperties`]. +/// +/// # Arguments +/// + `kind`: `None` if `kind` is allowed to be `None` or `Some`, chosen randomly. +/// `Some(false)` to force `kind` to be `None` or `Some(true)` to force `kind` to have a value. +pub fn mock_container(kind_none: Option) -> Container { + // tags + let tag_words: Vec = Words(EN, 1..20).fake(); -/// Create a fake StandardProperties. + // metadata + let mut md = HashMap::new(); + md.insert( + String::from("str_val"), + Value::String(Word(EN).fake::()), + ); + + md.insert( + String::from("int_val"), + Value::Number(rand::random::().into()), + ); + + md.insert( + String::from("bool_val"), + Value::Bool(rand::random::()), + ); + + // props + let mut container = Container::new(Word(EN).fake::()); + container.properties.kind = fake_opt_str(kind_none); + container.properties.tags = tag_words; + container.properties.metadata = md; + + container +} + +/// Create a fake [`AssetProperties`]. /// /// # Arguments /// + `name_none`: `None` if `name` is allowed to be `None` or `Some`, chosen randomly. /// `Some(false)` to force `name` to be `None` or `Some(true)` to force `name` to have a value. /// + `kind`: `None` if `kind` is allowed to be `None` or `Some`, chosen randomly. /// `Some(false)` to force `kind` to be `None` or `Some(true)` to force `kind` to have a value. -pub fn mock_props(name_none: Option, kind_none: Option) -> StandardProperties { +pub fn mock_asset(name_none: Option, kind_none: Option) -> Asset { // tags let tag_words: Vec = Words(EN, 1..20).fake(); @@ -41,16 +72,24 @@ pub fn mock_props(name_none: Option, kind_none: Option) -> StandardP Value::Bool(rand::random::()), ); + let mut path = PathBuf::from(FilePath(EN).fake::()); + path.set_extension("py"); + let path = ResourcePath::new(path).expect("creating ResourcePath should work"); + // props - let mut props = StandardProperties::default(); - props.name = fake_opt_str(name_none); - props.kind = fake_opt_str(kind_none); - props.tags = tag_words; - props.metadata = md; + let mut asset = Asset::new(path); + asset.properties.name = fake_opt_str(name_none); + asset.properties.kind = fake_opt_str(kind_none); + asset.properties.tags = tag_words; + asset.properties.metadata = md; - props + asset } +// *************** +// *** helpers *** +// *************** + /// Create a fake StandardProperties. /// /// # Arguments @@ -68,48 +107,3 @@ fn fake_opt_str(none: Option) -> Option { false => None, } } - -// ----------------------- -// --- Standard Object --- -// ----------------------- - -#[cfg_attr(feature = "serde", derive(Deserialize))] -#[derive(HasId, Clone, Debug, PartialEq, Eq)] -pub struct StdObj { - #[id] - pub rid: ResourceId, - pub props: StandardProperties, -} - -impl StdObj { - /// Create a new StdObj. - /// - /// # Arguments - /// + `name_none`: `None` if `name` is allowed to be `None` or `Some`, chosen randomly. - /// `Some(false)` to force `name` to be `None` or `Some(true)` to force `name` to have a value. - /// + `kind`: `None` if `kind` is allowed to be `None` or `Some`, chosen randomly. - /// `Some(false)` to force `kind` to be `None` or `Some(true)` to force `kind` to have a value. - pub fn new(name_none: Option, kind_none: Option) -> StdObj { - Self { - rid: ResourceId::new(), - props: mock_props(name_none, kind_none), - } - } -} - -impl Hash for StdObj { - fn hash(&self, state: &mut H) { - self.rid.hash(state); - } -} - -impl Resource for StdObj {} -impl StandardResource for StdObj { - fn properties(&self) -> &StandardProperties { - &self.props - } - - fn properties_mut(&mut self) -> &mut StandardProperties { - &mut self.props - } -} diff --git a/core/src/db/mod.rs b/core/src/db/mod.rs index 3895b424..923c5c62 100644 --- a/core/src/db/mod.rs +++ b/core/src/db/mod.rs @@ -3,12 +3,8 @@ pub mod resource; pub mod search_filter; // Re-exports -pub use resource::{Resource, StandardResource}; +pub use resource::Resource; pub use search_filter::{SearchFilter, StandardSearchFilter}; #[cfg(test)] mod dev_utils; - -#[cfg(test)] -#[path = "./mod_test.rs"] -mod mod_test; diff --git a/core/src/db/mod_test.rs b/core/src/db/mod_test.rs deleted file mode 100644 index e69de29b..00000000 diff --git a/core/src/db/resource.rs b/core/src/db/resource.rs index 87e55624..4356f959 100644 --- a/core/src/db/resource.rs +++ b/core/src/db/resource.rs @@ -1,21 +1,7 @@ //! Database object functionality. -use crate::project::standard_properties::StandardProperties; use crate::types::ResourceId; use has_id::HasId; use std::hash::Hash; /// Functionality for database objects. pub trait Resource: HasId + Hash + Clone + PartialEq + Eq {} - -/// Functionality for standard objects. -pub trait StandardResource: Resource { - /// Retrieve a reference to the [`StandardProperties`] of the object. - fn properties(&self) -> &StandardProperties; - - /// Retrieve a mutable reference to the [`StandardProperties`] of the object. - fn properties_mut(&mut self) -> &mut StandardProperties; -} - -#[cfg(test)] -#[path = "./resource_test.rs"] -mod resource_test; diff --git a/core/src/db/resource_test.rs b/core/src/db/resource_test.rs deleted file mode 100644 index e69de29b..00000000 diff --git a/core/src/db/search_filter.rs b/core/src/db/search_filter.rs index d3935390..b73fcd17 100644 --- a/core/src/db/search_filter.rs +++ b/core/src/db/search_filter.rs @@ -1,11 +1,10 @@ //! Search filter functionality. -use super::StandardResource; -use crate::project::Metadata; +use crate::project::{Asset, Container, Metadata}; use crate::types::ResourceId; use std::collections::HashSet; #[cfg(feature = "serde")] -use serde::{Deserialize, Serialize}; +use serde::{Deserialize, Deserializer, Serialize}; // ************* // *** Trait *** @@ -21,32 +20,116 @@ pub trait SearchFilter { // *** Standard Filter *** // *********************** +#[cfg(feature = "serde")] +fn deserialize_possible_empty_string<'de, D>( + deserializer: D, +) -> Result>, D::Error> +where + D: Deserializer<'de>, +{ + match Option::::deserialize(deserializer)? { + None => Ok(None), + Some(val) if val.is_empty() => Ok(Some(None)), + Some(val) => Ok(Some(Some(val))), + } +} + /// Search filter for all properties. #[cfg_attr(feature = "pyo3", pyo3::pyclass)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[derive(Default, Debug, Clone)] pub struct StandardSearchFilter { pub rid: Option, + + #[cfg_attr( + feature = "serde", + serde(default, deserialize_with = "deserialize_possible_empty_string") + )] pub name: Option>, + + #[cfg_attr( + feature = "serde", + serde(default, deserialize_with = "deserialize_possible_empty_string") + )] pub kind: Option>, pub tags: Option>, pub metadata: Option, } -impl SearchFilter for StandardSearchFilter -where - T: StandardResource, -{ - // @todo: Should just pass `StandardProperties`. - // Then can remove `StandardResource` trait. - fn matches(&self, resource: &T) -> bool { +// ************************ +// *** Container Filter *** +// ************************ + +impl SearchFilter for StandardSearchFilter { + fn matches(&self, container: &Container) -> bool { + if let Some(s_rid) = self.rid.as_ref() { + if s_rid != &container.rid { + return false; + } + } + + let props = &container.properties; + if let Some(s_name) = self.name.as_ref() { + if let Some(s_name) = s_name.as_ref() { + if s_name != &props.name { + return false; + } + } else { + return false; + } + } + + if let Some(s_kind) = self.kind.as_ref() { + if s_kind != &props.kind { + return false; + } + } + + if let Some(s_tags) = self.tags.as_ref() { + for s_tag in s_tags { + if !props.tags.contains(s_tag) { + return false; + } + } + } + + if let Some(s_md) = self.metadata.as_ref() { + for (s_key, s_val) in s_md { + let Some(f_val) = props.metadata.get(s_key) else { + return false; + }; + + // only compare number values, not types + if f_val.is_number() && s_val.is_number() { + if f_val.as_f64() != s_val.as_f64() { + return false; + } + } else { + if f_val != s_val { + return false; + } + } + } + } + + // all search criteria matched + true + } +} + +// ******************** +// *** Asset Filter *** +// ******************** + +impl SearchFilter for StandardSearchFilter { + fn matches(&self, asset: &Asset) -> bool { if let Some(s_rid) = self.rid.as_ref() { - if s_rid != resource.id() { + if s_rid != &asset.rid { return false; } } - let props = resource.properties(); + let props = &asset.properties; if let Some(s_name) = self.name.as_ref() { if s_name != &props.name { return false; diff --git a/core/src/db/search_filter_test.rs b/core/src/db/search_filter_test.rs index c910ac91..f64e20e9 100644 --- a/core/src/db/search_filter_test.rs +++ b/core/src/db/search_filter_test.rs @@ -1,4 +1,4 @@ -use super::super::dev_utils::StdObj; +use super::super::dev_utils; use super::*; use rand::Rng; use std::collections::HashMap; @@ -14,29 +14,142 @@ fn standard_search_filter_new_should_work() { assert_eq!(f.metadata, None, "metadata should be None"); } -// @todo: Known errors in test caused by randomized values can cause failure. +// TODO Known errors in test caused by randomized values can cause failure. #[test] -fn standard_search_filter_matches_should_work() { +fn standard_search_filter_container_matches_should_work() { // setup - // props - let obj0 = StdObj::new(None, None); + // properties + + let obj0 = dev_utils::mock_container(None); + + let p1_kind = match &obj0.properties.kind { + None => Some(true), + Some(_) => None, + }; + + let mut obj1 = dev_utils::mock_container(p1_kind); + + // prepend to tags to prevent clash + obj1.properties.tags = obj1 + .properties + .tags + .into_iter() + .map(|t| format!("pre_{t}")) + .collect(); + + // filters + let mut rid_filter = StandardSearchFilter::default(); + rid_filter.rid = Some(obj0.rid.clone()); + + let mut name_filter = StandardSearchFilter::default(); + name_filter.name = Some(Some(obj0.properties.name.clone())); + + let mut kind_filter = StandardSearchFilter::default(); + kind_filter.kind = Some(obj0.properties.kind.clone()); + + let mut tags_filter = StandardSearchFilter::default(); + let mut tf = HashSet::new(); + for t in &obj0.properties.tags { + if rand::random() { + tf.insert(t.clone()); + } + } + tags_filter.tags = Some(tf); + + let mut md_filter = StandardSearchFilter::default(); + let mut md = HashMap::new(); + + // create random metadata filter from data + // ensure at least one value is included + let f_len = obj0.properties.metadata.len(); + let mut include: Vec = Vec::with_capacity(f_len); + for _ in 0..f_len { + include.push(rand::random()); + } + if include.iter().all(|&x| !x) { + // no true values for include + // force one to be true + let mut rng = rand::thread_rng(); + include[rng.gen_range(0..f_len)] = true; + } + + let mut i = 0; + for (k, v) in &obj0.properties.metadata { + if include[i] { + md.insert(k.clone(), v.clone()); + } + i += 1; + } + if md.len() == 1 { + for (k, v) in &md { + if let serde_json::Value::Bool(_) = v { + // ensure if matching on boolean value only + // obj1 has opposite value of obj0 + let p0_val = obj0 + .properties + .metadata + .get(k) + .expect("metadata should exist"); + let p0_val = p0_val.as_bool().expect("metadata value should be a bool"); + obj1.properties + .metadata + .insert(k.clone(), serde_json::Value::Bool(!p0_val)); + } + } + } + md_filter.metadata = Some(md); + + // test + // rid + assert!(rid_filter.matches(&obj0), "rid filter should match"); + assert!(!rid_filter.matches(&obj1), "rid filter should not match"); + + // name + assert!(name_filter.matches(&obj0), "name filter should match"); + assert!(!name_filter.matches(&obj1), "name filter should not match"); + + // kind + assert!(kind_filter.matches(&obj0), "kind filter should match"); + assert!(!kind_filter.matches(&obj1), "kind filter should not match"); + + // tags + assert!(tags_filter.matches(&obj0), "tags filter should match"); + assert!(!tags_filter.matches(&obj1), "tags filter should not match"); + + // metadata + assert!(md_filter.matches(&obj0), "metadata filter should match"); + assert!( + !md_filter.matches(&obj1), + "metadata filter should not match" + ); + + // TODO Check empty filters. Specifically for `tags` and `metadata`. +} + +// TODO Known errors in test caused by randomized values can cause failure. +#[test] +fn standard_search_filter_asset_matches_should_work() { + // setup + // properties + + let obj0 = dev_utils::mock_asset(None, None); // force p1 to have different name and kind if either is None - let p1_name = match &obj0.props.name { + let p1_name = match &obj0.properties.name { None => Some(true), Some(_) => None, }; - let p1_kind = match &obj0.props.kind { + let p1_kind = match &obj0.properties.kind { None => Some(true), Some(_) => None, }; - let mut obj1 = StdObj::new(p1_name, p1_kind); + let mut obj1 = dev_utils::mock_asset(p1_name, p1_kind); // prepend to tags to prevent clash - obj1.props.tags = obj1 - .props + obj1.properties.tags = obj1 + .properties .tags .into_iter() .map(|t| format!("pre_{t}")) @@ -47,14 +160,14 @@ fn standard_search_filter_matches_should_work() { rid_filter.rid = Some(obj0.rid.clone()); let mut name_filter = StandardSearchFilter::default(); - name_filter.name = Some(obj0.props.name.clone()); + name_filter.name = Some(obj0.properties.name.clone()); let mut kind_filter = StandardSearchFilter::default(); - kind_filter.kind = Some(obj0.props.kind.clone()); + kind_filter.kind = Some(obj0.properties.kind.clone()); let mut tags_filter = StandardSearchFilter::default(); let mut tf = HashSet::new(); - for t in &obj0.props.tags { + for t in &obj0.properties.tags { if rand::random() { tf.insert(t.clone()); } @@ -66,7 +179,7 @@ fn standard_search_filter_matches_should_work() { // create random metadata filter from data // ensure at least one value is included - let f_len = obj0.props.metadata.len(); + let f_len = obj0.properties.metadata.len(); let mut include: Vec = Vec::with_capacity(f_len); for _ in 0..f_len { include.push(rand::random()); @@ -79,7 +192,7 @@ fn standard_search_filter_matches_should_work() { } let mut i = 0; - for (k, v) in &obj0.props.metadata { + for (k, v) in &obj0.properties.metadata { if include[i] { md.insert(k.clone(), v.clone()); } @@ -90,9 +203,13 @@ fn standard_search_filter_matches_should_work() { if let serde_json::Value::Bool(_) = v { // ensure if matching on boolean value only // obj1 has opposite value of obj0 - let p0_val = obj0.props.metadata.get(k).expect("metadata should exist"); + let p0_val = obj0 + .properties + .metadata + .get(k) + .expect("metadata should exist"); let p0_val = p0_val.as_bool().expect("metadata value should be a bool"); - obj1.props + obj1.properties .metadata .insert(k.clone(), serde_json::Value::Bool(!p0_val)); } @@ -124,5 +241,5 @@ fn standard_search_filter_matches_should_work() { "metadata filter should not match" ); - // @todo: Check empty filters. Specifically for `tags` and `metadata`. + // TODO Check empty filters. Specifically for `tags` and `metadata`. } diff --git a/core/src/error.rs b/core/src/error.rs index 1523c589..0a453916 100644 --- a/core/src/error.rs +++ b/core/src/error.rs @@ -1,11 +1,10 @@ //! Common error types. -// use crate::db::error::Error as DbError; use crate::types::{ResourceId, ResourcePath}; use std::convert::From; -use std::ffi::OsString; use std::io; use std::path::PathBuf; use std::result::Result as StdResult; +use thiserror::Error; #[cfg(feature = "serde")] use serde::{self, Deserialize, Serialize}; @@ -15,11 +14,26 @@ use serde::{self, Deserialize, Serialize}; // ********************** #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Error, Debug)] pub enum ResourceError { - DoesNotExist(&'static str), + #[error("resource `{0}` does not exist")] + DoesNotExist(String), + + #[error("id `{0}` already exists")] DuplicateId(ResourceId), - AlreadyExists(&'static str), + + #[error("resource `{0}` already exists")] + AlreadyExists(String), +} + +impl ResourceError { + pub fn does_not_exist(msg: impl Into) -> Self { + Self::DoesNotExist(msg.into()) + } + + pub fn already_exists(msg: impl Into) -> Self { + Self::AlreadyExists(msg.into()) + } } // ********************** @@ -27,10 +41,19 @@ pub enum ResourceError { // ********************** #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Error, Debug)] pub enum ProjectError { + #[error("Project is not registered")] NotRegistered(Option, Option), - Misconfigured(&'static str), + + #[error("Project is misconfigured: {0}")] + Misconfigured(String), +} + +impl ProjectError { + pub fn misconfigured(msg: impl Into) -> Self { + Self::Misconfigured(msg.into()) + } } // ****************** @@ -38,19 +61,16 @@ pub enum ProjectError { // ****************** #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Error, Debug)] pub enum GraphError { - InvalidGraph(&'static str), + #[error("invalid graph: {0}")] + InvalidGraph(String), } -// *********************** -// *** Container Error *** -// *********************** - -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] -#[derive(Debug)] -pub enum ContainerError { - MissingChild(ResourceId), +impl GraphError { + pub fn invalid_graph(msg: impl Into) -> Self { + Self::InvalidGraph(msg.into()) + } } // ******************* @@ -58,9 +78,12 @@ pub enum ContainerError { // ******************* #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Error, Debug)] pub enum AssetError { + #[error("Asset not registered")] NotRegistered(Option, Option), + + #[error("Asset path is not set")] PathNotSet, } @@ -68,10 +91,11 @@ pub enum AssetError { // *** Script Error *** // ******************** -// @todo: serde features. -#[derive(Debug)] +#[derive(Error, Debug)] +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] pub enum ScriptError { - UnknownLanguage(Option), + #[error("unknown language `{0:?}`")] + UnknownLanguage(Option), } // *************************** @@ -79,9 +103,16 @@ pub enum ScriptError { // *************************** #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Error, Debug)] pub enum ResourcePathError { - CouldNotParseMetalevel(&'static str), + #[error("{0}")] + CouldNotParseMetalevel(String), +} + +impl ResourcePathError { + pub fn could_not_parse_meta_level(msg: impl Into) -> Self { + Self::CouldNotParseMetalevel(msg.into()) + } } // ******************** @@ -89,7 +120,7 @@ pub enum ResourcePathError { // ******************** #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Error, Debug)] pub enum RunnerError { /// An error occured when running the script /// on the specified `Container`. @@ -98,30 +129,63 @@ pub enum RunnerError { /// 1. [`ResourceId`] of the `Script`. /// 2. [`ResourceId`] of the `Container`. /// 3. Error message from the script. + #[error("Script `{0}` running over Container `{1}` errored: {2}")] ScriptError(ResourceId, ResourceId, String), + + #[error("Error running `{cmd}` from script `{script}` on container `{container}`")] + CommandError{ + script: ResourceId, + container: ResourceId, + cmd: String, + } } // ****************** // *** Thot Error *** // ****************** -// @todo[3]: Put behind correct features. -#[derive(Debug)] +// TODO Put behind correct features. +#[derive(Error, Debug)] +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] pub enum Error { + #[error("{0}")] AssetError(AssetError), - ContainerError(ContainerError), - // DbError(DbError), + + #[error("{0}")] + #[cfg_attr(feature = "serde", serde(skip))] IoError(io::Error), + + #[error("{0}")] ProjectError(ProjectError), + + #[error("{0}")] ResourceError(ResourceError), + + #[error("{0}")] GraphError(GraphError), + + #[error("{0}")] ResourcePathError(ResourcePathError), + + #[error("{0}")] RunnerError(RunnerError), + + #[error("{0}")] ScriptError(ScriptError), + + #[error("{0}")] + #[cfg_attr(feature = "serde", serde(skip))] SerdeError(serde_json::Error), /// Invalid value encountered. - ValueError(&'static str), + #[error("{0}")] + Value(String), +} + +impl Error { + pub fn value(msg: impl Into) -> Self { + Self::Value(msg.into()) + } } impl From for Error { @@ -154,15 +218,9 @@ impl From for Error { } } -// @todo: Make better. -#[cfg(feature = "serde")] -impl Serialize for Error { - fn serialize(&self, serializer: S) -> StdResult - where - S: serde::ser::Serializer, - { - let msg = format!("{:?}", self); - serializer.serialize_str(msg.as_ref()) +impl From for Error { + fn from(err: ScriptError) -> Self { + Self::ScriptError(err) } } diff --git a/core/src/graph/edge.rs b/core/src/graph/edge.rs index fe5740c7..9a312f35 100644 --- a/core/src/graph/edge.rs +++ b/core/src/graph/edge.rs @@ -94,7 +94,3 @@ impl DirectedEdge { &self.to } } - -#[cfg(test)] -#[path = "./edge_test.rs"] -mod edge_test; diff --git a/core/src/graph/edge_test.rs b/core/src/graph/edge_test.rs deleted file mode 100644 index e69de29b..00000000 diff --git a/core/src/graph/mod.rs b/core/src/graph/mod.rs index 413fb3c3..5319493c 100644 --- a/core/src/graph/mod.rs +++ b/core/src/graph/mod.rs @@ -7,7 +7,3 @@ pub mod tree; // pub use edge::{DirectedEdge, DirectedEdgeBuilder}; pub use node::ResourceNode; pub use tree::ResourceTree; - -#[cfg(test)] -#[path = "./mod_test.rs"] -mod mod_test; diff --git a/core/src/graph/mod_test.rs b/core/src/graph/mod_test.rs deleted file mode 100644 index e69de29b..00000000 diff --git a/core/src/graph/node.rs b/core/src/graph/node.rs index 27be8a16..d3e99b03 100644 --- a/core/src/graph/node.rs +++ b/core/src/graph/node.rs @@ -1,12 +1,13 @@ //! Graph node. use crate::types::ResourceId; use has_id::HasId; +use std::fmt; use std::ops::{Deref, DerefMut}; #[cfg(feature = "serde")] use serde::{Deserialize, Serialize}; -// @todo[2]: Clean up serde. +// TODO Clean up serde. /// A graph node for a resource. /// The id of the node matches the id of the resource. /// Contains data. @@ -61,6 +62,11 @@ where } } -#[cfg(test)] -#[path = "./node_test.rs"] -mod node_test; +impl fmt::Debug for ResourceNode +where + D: fmt::Debug + HasId, +{ + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + write!(f, "{:?}", self.data()) + } +} diff --git a/core/src/graph/node_test.rs b/core/src/graph/node_test.rs deleted file mode 100644 index e69de29b..00000000 diff --git a/core/src/graph/tree.rs b/core/src/graph/tree.rs index 6ea7e42a..ed8ea91f 100644 --- a/core/src/graph/tree.rs +++ b/core/src/graph/tree.rs @@ -7,6 +7,7 @@ use has_id::HasId; use indexmap::IndexSet; use std::collections::hash_map::{Iter, IterMut}; use std::collections::HashSet; +use std::fmt; #[cfg(feature = "serde")] use serde::{Deserialize, Serialize}; @@ -74,7 +75,7 @@ where // compute parents, find root. for (id, node) in nodes.iter() { let Some(children) = edges.get(&id) else { - return Err(GraphError::InvalidGraph("node does not have edge map").into()); + return Err(GraphError::invalid_graph("node does not have edge map").into()); }; for child in children { @@ -83,12 +84,16 @@ where } } - if root.len() != 1 { - return Err(GraphError::InvalidGraph("root `Node` not found").into()); - } + let root = match root.len() { + 0 => return Err(GraphError::invalid_graph("root `Node` not found").into()), + 1 => { + let Some(root) = root.into_iter().next() else { + return Err(GraphError::invalid_graph("could not get root").into()); + }; - let Some(root) = root.into_iter().next() else { - return Err(GraphError::InvalidGraph("could not get root").into()); + root + } + _ => return Err(GraphError::invalid_graph("multiple root `Node`s found").into()), }; parents.insert(root.clone(), None); @@ -145,11 +150,11 @@ where pub fn insert(&mut self, parent: ResourceId, data: D) -> Result { // check parent exists if !self.nodes.contains_key(&parent) { - return Err(ResourceError::DoesNotExist("parent `Node` not found").into()); + return Err(ResourceError::does_not_exist("parent `Node` not found").into()); } let Some(children) = self.edges.get_mut(&parent) else { - return Err(ResourceError::DoesNotExist("parent `Node` not found").into()); + return Err(ResourceError::does_not_exist("parent `Node` not found").into()); }; let node = ResourceNode::new(data); @@ -164,27 +169,74 @@ where } /// Returns the children `Containers` of the parent, if found. + /// + /// # Returns + /// `None` if the parent `Node` is not found. pub fn children(&self, parent: &ResourceId) -> Option<&IndexSet> { - self.edges.get(&parent).to_owned() + self.edges.get(parent) } /// Returns the parent of a `Node`. /// + /// # Returns + /// `None` if the `Node` is the graph root. + /// /// # Errors /// + If the child does not exist. pub fn parent(&self, child: &ResourceId) -> Result> { let Some(parent) = self.parents.get(&child) else { - return Err(ResourceError::DoesNotExist("`Node` not found").into()); + return Err(ResourceError::does_not_exist("`Node` not found").into()); }; Ok(parent.as_ref()) } + /// Returns the siblings of a `Node`. + /// + /// # Returns + /// `None` if the `Node` is not found. + pub fn siblings(&self, node: &ResourceId) -> Option> { + let Ok(parent) = self.parent(node) else { + // node not found + return None; + }; + + let Some(parent) = parent else { + // node is root + return Some(Vec::new()); + }; + + Some( + self.children(parent) + .unwrap() + .iter() + .map(|rid| rid.clone()) + .collect(), + ) + } + + /// Returns the path of ancesetors to the tree root. + /// Begins with self. + /// + /// # Returns + /// + Empty `Vec` if the `root` `Node` is not found. + /// + `Vec` of the ancestor path to the tree root, beginning with self. + pub fn ancestors(&self, root: &ResourceId) -> Vec { + let mut ancestors = Vec::new(); + let mut current = self.get(root).map(|node| node.id()); + while let Some(id) = current { + ancestors.push(id.clone()); + current = self.parent(id).expect("parent not found"); + } + + return ancestors; + } + /// Returns all the descendants of the root. /// /// # Returns /// + `None` if the root `Node` does not exist. - /// + Descendant Ids, otherwise. + /// + Descendant ids, including `root`, otherwise. pub fn descendants(&self, root: &ResourceId) -> Option> { let mut descendants = HashSet::new(); if !self.get(&root).is_some() { @@ -212,7 +264,7 @@ where pub fn insert_tree(&mut self, parent: &ResourceId, tree: Self) -> Result { // insert root let Some(p_edges) = self.edges.get_mut(&parent) else { - return Err(ResourceError::DoesNotExist("parent edges not found").into()); + return Err(ResourceError::does_not_exist("parent edges not found").into()); }; let root = tree.root().clone(); @@ -280,18 +332,18 @@ where pub fn mv(&mut self, root: &ResourceId, parent: &ResourceId) -> Result { // remove from original parent let Some(Some(o_parent)) = self.parents.get(&root) else { - return Err(ResourceError::DoesNotExist("parent `Node` does not exist").into()); + return Err(ResourceError::does_not_exist("parent `Node` does not exist").into()); }; let Some(op_edges) = self.edges.get_mut(o_parent) else { - return Err(ResourceError::DoesNotExist("`Node` edges do not exist").into()); + return Err(ResourceError::does_not_exist("`Node` edges do not exist").into()); }; op_edges.remove(root); // add to new parent let Some(np_edges) = self.edges.get_mut(parent) else { - return Err(ResourceError::DoesNotExist("`Node` edges do not exist").into()); + return Err(ResourceError::does_not_exist("`Node` edges do not exist").into()); }; np_edges.insert(root.clone()); @@ -306,15 +358,15 @@ where /// + Follows the rules of [`indexset::IndexSet::move_index`]. pub fn move_index(&mut self, node: &ResourceId, index: usize) -> Result { let Some(Some(parent)) = self.parents.get(&node) else { - return Err(ResourceError::DoesNotExist("`Node` parent does not exist").into()); + return Err(ResourceError::does_not_exist("`Node` parent does not exist").into()); }; let Some(edges) = self.edges.get_mut(parent) else { - return Err(ResourceError::DoesNotExist("`Node` edges do not exist").into()); + return Err(ResourceError::does_not_exist("`Node` edges do not exist").into()); }; let Some(curr_index) = edges.get_index_of(node) else { - return Err(ResourceError::DoesNotExist("`Node` edges do not exist").into()); + return Err(ResourceError::does_not_exist("`Node` edges do not exist").into()); }; edges.move_index(curr_index, index); @@ -333,7 +385,7 @@ where // remove root node let Some(node) = self.nodes.remove(root) else { - return Err(ResourceError::DoesNotExist("`Node` does not exist").into()); + return Err(ResourceError::does_not_exist("`Node` does not exist").into()); }; self.parents.remove(node.id()); @@ -341,7 +393,7 @@ where // remove children let Some(children) = self.edges.remove(&root) else { - return Err(ResourceError::DoesNotExist("`Node` edges do not exist").into()); + return Err(ResourceError::does_not_exist("`Node` edges do not exist").into()); }; for child in children.iter() { @@ -369,7 +421,7 @@ where /// Clones a subtree. pub fn clone_tree(&self, root: &ResourceId) -> Result { let Some(root_node) = self.nodes.get(&root) else { - return Err(ResourceError::DoesNotExist("root `Node` not found").into()); + return Err(ResourceError::does_not_exist("root `Node` not found").into()); }; let mut tree = Self::new(root_node.clone().into_data()); @@ -381,6 +433,15 @@ where } } +impl fmt::Debug for ResourceTree +where + D: fmt::Debug + HasId, +{ + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + write!(f, "{:?}\n{:?}", self.nodes(), self.edges()) + } +} + #[cfg(test)] #[path = "./tree_test.rs"] mod tree_test; diff --git a/core/src/graph/tree_test.rs b/core/src/graph/tree_test.rs index 4d7422e1..cf1bf7ad 100644 --- a/core/src/graph/tree_test.rs +++ b/core/src/graph/tree_test.rs @@ -166,6 +166,57 @@ fn root_should_work() { assert_eq!(&data_0, f_root.inner(), "root data incorrect"); } +#[test] +fn ancestors_should_work() { + // setup + let root = Data::new(); + let mut tree = ResourceTree::new(root); + + let c1 = Data::new(); + let c2 = Data::new(); + let c11 = Data::new(); + + let c1_id = c1.id().clone(); + let c2_id = c2.id().clone(); + let c11_id = c11.id().clone(); + + tree.insert(tree.root().clone(), c1) + .expect("could not insert root child `Node`"); + + tree.insert(tree.root().clone(), c2) + .expect("could not insert root child `Node`"); + + tree.insert(c1_id.clone(), c11) + .expect("could not insert `Node`"); + + // test + let blank_ans = tree.ancestors(&ResourceId::new()); + assert_eq!(0, blank_ans.len(), "unfound node should have no ancestors"); + + let root_ans = tree.ancestors(tree.root()); + assert_eq!( + vec![tree.root().clone()], + root_ans, + "root ancestors should only be self" + ); + + let c1_ans = tree.ancestors(&c1_id); + assert_eq!(2, c1_ans.len(), "incorrect ancestor path length"); + assert_eq!(c1_id, c1_ans[0], "ancestors should start with self"); + assert_eq!(tree.root(), &c1_ans[1], "ancestors should end with root"); + + let c2_ans = tree.ancestors(&c2_id); + assert_eq!(2, c2_ans.len(), "incorrect ancestor path length"); + assert_eq!(c2_id, c2_ans[0], "ancestors should start with self"); + assert_eq!(tree.root(), &c2_ans[1], "ancestors should end with root"); + + let c11_ans = tree.ancestors(&c11_id); + assert_eq!(3, c11_ans.len(), "incorrect ancestor path length"); + assert_eq!(c11_id, c11_ans[0], "ancestors should start with self"); + assert_eq!(c1_id, c11_ans[1], "ancestors should contain parent"); + assert_eq!(tree.root(), &c11_ans[2], "ancestors should end with root"); +} + #[test] fn descendants_should_work() { // setup @@ -448,8 +499,6 @@ fn move_index_should_work() { .expect("could not get child `Node` by index") .clone(); - drop(children); - // test tree.move_index(&c1, 1) .expect("could not move child `Node` index"); diff --git a/core/src/identifier.rs b/core/src/identifier.rs index 46ce28e4..732e9f9a 100644 --- a/core/src/identifier.rs +++ b/core/src/identifier.rs @@ -11,7 +11,7 @@ impl Identifier { } pub fn application() -> String { - String::from("core") + String::from("thot-core") } } diff --git a/core/src/lib.rs b/core/src/lib.rs index 2dead386..42ea144f 100644 --- a/core/src/lib.rs +++ b/core/src/lib.rs @@ -6,7 +6,6 @@ //! # Thot Core //! //! This package represents core functionality of the Thot software suite. -// pub mod api; // REMOVE pub mod common; pub mod constants; pub mod error; @@ -34,7 +33,3 @@ pub mod dev_utils; // Re-exports pub use error::{Error, Result}; - -#[cfg(test)] -#[path = "./lib_test.rs"] -mod lib_test; diff --git a/core/src/lib_impl/clap/mod.rs b/core/src/lib_impl/clap/mod.rs index 3b328dfb..3c4224da 100644 --- a/core/src/lib_impl/clap/mod.rs +++ b/core/src/lib_impl/clap/mod.rs @@ -1,6 +1,2 @@ //! Implementations for `clap`. pub mod user_id; - -#[cfg(test)] -#[path = "./mod_test.rs"] -mod mod_test; diff --git a/core/src/lib_impl/clap/mod_test.rs b/core/src/lib_impl/clap/mod_test.rs deleted file mode 100644 index e69de29b..00000000 diff --git a/core/src/lib_impl/clap/user_id.rs b/core/src/lib_impl/clap/user_id.rs index 964a6b22..3221455b 100644 --- a/core/src/lib_impl/clap/user_id.rs +++ b/core/src/lib_impl/clap/user_id.rs @@ -52,17 +52,15 @@ impl clap::FromArgMatches for UserId { // @todo [1]: Write tests and implement properly impl clap::Args for UserId { - fn augment_args(cmd: clap::Command<'_>) -> clap::Command<'_> { + fn augment_args(cmd: clap::Command) -> clap::Command { cmd.arg(clap::Arg::new("user")) } - fn augment_args_for_update(cmd: clap::Command<'_>) -> clap::Command<'_> { + fn augment_args_for_update(cmd: clap::Command) -> clap::Command { cmd.arg(clap::Arg::new("user")) } } -// helper functions - /// Extracts the `arg_name` arg from a clap::ArgMatches. fn arg_from_arg_matches( matches: &clap::ArgMatches, @@ -70,8 +68,8 @@ fn arg_from_arg_matches( cmd: &mut clap::Command, ) -> Result { let mut arg: Option = None; - if matches.is_present(arg_name) { - match matches.value_of(arg_name) { + if matches.contains_id(arg_name) { + match matches.get_one::(arg_name) { Some(id_res) => { arg = Some(id_res.to_string()); } @@ -86,7 +84,7 @@ fn arg_from_arg_matches( if arg.is_none() { return Err(cmd.error( - clap::error::ErrorKind::ArgumentNotFound, + clap::error::ErrorKind::MissingRequiredArgument, "No valid user id found.", )); } diff --git a/core/src/lib_impl/clap/user_id_test.rs b/core/src/lib_impl/clap/user_id_test.rs index 82b8e6e4..fef13ab3 100644 --- a/core/src/lib_impl/clap/user_id_test.rs +++ b/core/src/lib_impl/clap/user_id_test.rs @@ -11,7 +11,7 @@ fn user_id_should_implement_clap_from_arg_matches_for_email() { let e_val: String = FreeEmail(EN).fake(); let matches = clap::Command::new("test from_arg_matches") .arg(clap::Arg::new("prog")) - .arg(clap::Arg::new("user").long("user").default_value(&e_val)) + .arg(clap::Arg::new("user").long("user")) .get_matches(); let email = match UserId::from_arg_matches(&matches) { @@ -25,7 +25,7 @@ fn user_id_should_implement_clap_from_arg_matches_for_email() { #[test] fn user_id_should_implement_clap_from_arg_matches_for_id() { let id_val = ResourceId::new(); - let matches = create_user_id_arg_matches(&id_val.to_string()); + let matches = create_user_id_arg_matches(); let id = match UserId::from_arg_matches(&matches) { Ok(uid) => uid, @@ -38,7 +38,7 @@ fn user_id_should_implement_clap_from_arg_matches_for_id() { #[test] fn user_id_clap_from_arg_matches_should_error_if_invalid_id() { - let matches = create_user_id_arg_matches("invalid id"); + let matches = create_user_id_arg_matches(); match UserId::from_arg_matches(&matches) { Err(err) if err.kind() == clap::error::ErrorKind::InvalidValue => { @@ -59,7 +59,7 @@ fn user_id_clap_from_arg_matches_should_error_if_invalid_id() { #[test] fn user_id_should_implement_clap_update_from_arg_matches_email() { let ref_email: String = FreeEmail(EN).fake(); - let matches = create_user_id_arg_matches(&ref_email); + let matches = create_user_id_arg_matches(); // email let email: String = FreeEmail(EN).fake(); @@ -73,7 +73,7 @@ fn user_id_should_implement_clap_update_from_arg_matches_email() { #[test] fn user_id_should_implement_clap_update_from_arg_matches_id() { let ref_id = ResourceId::new(); - let matches = create_user_id_arg_matches(&ref_id.to_string()); + let matches = create_user_id_arg_matches(); // id let id = ResourceId::new(); @@ -86,11 +86,10 @@ fn user_id_should_implement_clap_update_from_arg_matches_id() { #[test] fn user_id_clap_update_from_arg_matches_should_error_if_variant_changes() { - let ref_id = Uuid::new_v4(); let ref_email: String = FreeEmail(EN).fake(); - let id_matches = create_user_id_arg_matches(&ref_id.to_string()); - let e_matches = create_user_id_arg_matches(&ref_email); + let id_matches = create_user_id_arg_matches(); + let e_matches = create_user_id_arg_matches(); // email -> id let mut eid = UserId::Email(ref_email.clone()); @@ -123,9 +122,9 @@ fn user_id_clap_update_from_arg_matches_should_error_if_variant_changes() { // --------------- /// Creates a clap::ArgMatches with the `user` arg set to `id`. -fn create_user_id_arg_matches(id: &str) -> clap::ArgMatches { +fn create_user_id_arg_matches() -> clap::ArgMatches { clap::Command::new("test UserId::FromArgMatches") .arg(clap::Arg::new("prog")) // required to absorb program positional argument - .arg(clap::Arg::new("user").default_value(id)) + .arg(clap::Arg::new("user")) .get_matches() } diff --git a/core/src/lib_impl/extendr/asset.rs b/core/src/lib_impl/extendr/asset.rs deleted file mode 100644 index 7a7dbba7..00000000 --- a/core/src/lib_impl/extendr/asset.rs +++ /dev/null @@ -1,34 +0,0 @@ -//! `rextendr` `impl` for [`Container`]. -use crate::project::{Asset, Metadata}; -use extendr_api::prelude::*; - -#[extendr] -impl Asset { - pub fn name(&self) -> Option<&str> { - self.properties.name.as_ref().map(|name| name.as_str()) - } - - // TODO[h]: Change to `r#type`. - // See https://github.com/extendr/extendr/issues/528 for more info. - pub fn kind(&self) -> Option<&str> { - self.properties.kind.as_ref().map(|name| name.as_str()) - } - - pub fn tags(&self) -> &Vec { - &self.properties.tags - } - - // TODO[h] - // pub fn metadata(&self) -> &Metadata { - // &self.properties.metadata - // } -} - -extendr_module! { - mod asset; - impl Asset; -} - -#[cfg(test)] -#[path = "./asset_test.rs"] -mod asset_test; diff --git a/core/src/lib_impl/extendr/asset_test.rs b/core/src/lib_impl/extendr/asset_test.rs deleted file mode 100644 index e69de29b..00000000 diff --git a/core/src/lib_impl/extendr/container.rs b/core/src/lib_impl/extendr/container.rs deleted file mode 100644 index cb563e70..00000000 --- a/core/src/lib_impl/extendr/container.rs +++ /dev/null @@ -1,34 +0,0 @@ -//! `rextendr` `impl` for [`Container`]. -use crate::project::{Container, Metadata}; -use extendr_api::prelude::*; - -#[extendr] -impl Container { - pub fn name(&self) -> Option<&str> { - self.properties.name.as_ref().map(|name| name.as_str()) - } - - // TODO[h]: Change to `r#type`. - // See https://github.com/extendr/extendr/issues/528 for more info. - pub fn kind(&self) -> Option<&str> { - self.properties.kind.as_ref().map(|name| name.as_str()) - } - - pub fn tags(&self) -> &Vec { - &self.properties.tags - } - - // TODO[h] - // pub fn metadata(&self) -> &Metadata { - // &self.properties.metadata - // } -} - -extendr_module! { - mod container; - impl Container; -} - -#[cfg(test)] -#[path = "./container_test.rs"] -mod container_test; diff --git a/core/src/lib_impl/extendr/container_test.rs b/core/src/lib_impl/extendr/container_test.rs deleted file mode 100644 index e69de29b..00000000 diff --git a/core/src/lib_impl/extendr/functions.rs b/core/src/lib_impl/extendr/functions.rs deleted file mode 100644 index de255702..00000000 --- a/core/src/lib_impl/extendr/functions.rs +++ /dev/null @@ -1,44 +0,0 @@ -//! Common functions. -use extendr_api::prelude::*; -use serde_json::value::{Number as JsNumber, Value as JsValue}; - -/// Convert an [`Robj`] to a [`Value`](JsValue). -/// Returns `None` if the conversion fails. -pub fn robj_to_value(obj: Robj) -> Option { - if let Some(val) = obj.as_bool() { - return Some(JsValue::Bool(val)); - } else if let Some(val) = obj.as_integer() { - return Some(JsValue::Number(val.into())); - } else if let Some(val) = obj.as_integer_vector() { - let vals = val.into_iter().map(|n| JsValue::Number(n.into())).collect(); - return Some(JsValue::Array(vals)); - } else if let Some(val) = obj.as_real() { - let val = JsNumber::from_f64(val) - .expect("could not convert value to a serde_json::value::Number"); - - return Some(JsValue::Number(val)); - } else if let Some(val) = obj.as_real_vector() { - let vals = val - .into_iter() - .map(|n| { - let n = JsNumber::from_f64(n) - .expect("could not convert value to a serde_json::value::Number"); - - JsValue::Number(n) - }) - .collect(); - - return Some(JsValue::Array(vals)); - } else if let Some(val) = obj.as_str() { - return Some(JsValue::String(val.into())); - } else if let Some(val) = obj.as_string_vector() { - let val = val.into_iter().map(|s| JsValue::String(s.into())).collect(); - return Some(JsValue::Array(val)); - } - - return None; -} - -#[cfg(test)] -#[path = "./functions_test.rs"] -mod functions_test; diff --git a/core/src/lib_impl/extendr/functions_test.rs b/core/src/lib_impl/extendr/functions_test.rs deleted file mode 100644 index e69de29b..00000000 diff --git a/core/src/lib_impl/extendr/mod.rs b/core/src/lib_impl/extendr/mod.rs deleted file mode 100644 index c939d280..00000000 --- a/core/src/lib_impl/extendr/mod.rs +++ /dev/null @@ -1,8 +0,0 @@ -//! `extendr` `impl`s. -pub mod container; -pub mod functions; -pub mod asset; - -#[cfg(test)] -#[path = "./mod_test.rs"] -mod mod_test; diff --git a/core/src/lib_impl/extendr/mod_test.rs b/core/src/lib_impl/extendr/mod_test.rs deleted file mode 100644 index e69de29b..00000000 diff --git a/core/src/lib_impl/mod.rs b/core/src/lib_impl/mod.rs index 22d127ad..6469f3be 100644 --- a/core/src/lib_impl/mod.rs +++ b/core/src/lib_impl/mod.rs @@ -2,15 +2,5 @@ #[cfg(feature = "clap")] pub mod clap; -#[cfg(feature = "extendr")] -pub mod extendr; - -#[cfg(feature = "pyo3")] -pub mod pyo3; - #[cfg(feature = "yew")] pub mod yew; - -#[cfg(test)] -#[path = "./mod_test.rs"] -mod mod_test; diff --git a/core/src/lib_impl/mod_test.rs b/core/src/lib_impl/mod_test.rs deleted file mode 100644 index e69de29b..00000000 diff --git a/core/src/lib_impl/pyo3/asset.rs b/core/src/lib_impl/pyo3/asset.rs deleted file mode 100644 index c00f0e4b..00000000 --- a/core/src/lib_impl/pyo3/asset.rs +++ /dev/null @@ -1,69 +0,0 @@ -//! PyO3 implementation for [`Asset`]. -use crate::project::{Asset, StandardProperties}; -use pyo3::exceptions::PyRuntimeError; -use pyo3::prelude::*; -use pythonize::pythonize; -use std::collections::{HashMap, HashSet}; -use std::path::PathBuf; - -// @todo: Unify implementations of property getters with Container. -#[pymethods] -impl Asset { - // properties - #[getter(_id)] - fn py_id(&self) -> String { - self.rid.to_string() - } - - #[getter(_properties)] - fn py_properties(&self) -> StandardProperties { - self.properties.clone() - } - - #[getter(name)] - fn py_name(&self) -> Option { - self.properties.name.clone() - } - - #[getter(type)] - fn py_kind(&self) -> Option { - self.properties.kind.clone() - } - - #[getter(tags)] - fn py_tags(&self) -> HashSet { - self.properties.tags.clone().into_iter().collect() - } - - // @todo: Provide inherited and native metadata separated. - /// Returns all metadata. - #[getter(metadata)] - fn py_metadata(&self, py: Python<'_>) -> PyResult> { - let mut md = HashMap::with_capacity(self.properties.metadata.len()); - for (k, v) in self.properties.metadata.clone() { - let val = pythonize(py, &v); - if val.is_err() { - return Err(PyRuntimeError::new_err(format!( - "Could not convert metadata of key `{}`: {:?}", - k, val - ))); - } - - let val = val.unwrap(); - md.insert(k, val); - } - - Ok(md) - } - - // others - /// Path of the `Asset`'s file. - #[getter(file)] - fn py_path(&self) -> PathBuf { - PathBuf::from(self.path.as_path()) - } -} - -#[cfg(test)] -#[path = "./asset_test.rs"] -mod asset_test; diff --git a/core/src/lib_impl/pyo3/asset_test.rs b/core/src/lib_impl/pyo3/asset_test.rs deleted file mode 100644 index e69de29b..00000000 diff --git a/core/src/lib_impl/pyo3/container.rs b/core/src/lib_impl/pyo3/container.rs deleted file mode 100644 index 0183b86e..00000000 --- a/core/src/lib_impl/pyo3/container.rs +++ /dev/null @@ -1,68 +0,0 @@ -//! [`PyO3`](pyo3) implementation for [`Container`]. -use crate::project::{Container, StandardProperties}; -use crate::types::ResourceId; -use pyo3::exceptions::PyRuntimeError; -use pyo3::prelude::*; -use pythonize::pythonize; -use std::collections::{HashMap, HashSet}; - -// @todo: Unify implementations of property getters with Asset. -#[pymethods] -impl Container { - // properties - #[getter(_id)] - fn py_id(&self) -> String { - self.rid.to_string() - } - - #[getter(_properties)] - fn py_properties(&self) -> StandardProperties { - self.properties.clone() - } - - #[getter(name)] - fn py_name(&self) -> Option { - self.properties.name.clone() - } - - #[getter(type)] - fn py_kind(&self) -> Option { - self.properties.kind.clone() - } - - #[getter(tags)] - fn py_tags(&self) -> HashSet { - self.properties.tags.clone().into_iter().collect() - } - - // @todo: Provide inherited and native metadata separated. - /// Returns all metadata. - #[getter(metadata)] - fn py_metadata(&self, py: Python<'_>) -> PyResult> { - let mut md = HashMap::with_capacity(self.properties.metadata.len()); - for (k, v) in self.properties.metadata.clone() { - let val = pythonize(py, &v); - if val.is_err() { - return Err(PyRuntimeError::new_err(format!( - "Could not convert metadata of key `{}`: {:?}", - k, val - ))); - } - - let val = val.unwrap(); - md.insert(k, val); - } - - Ok(md) - } - - // others - #[getter(assets)] - fn py_assets(&self) -> HashSet { - self.assets.clone().into_keys().collect() - } -} - -#[cfg(test)] -#[path = "./container_test.rs"] -mod container_test; diff --git a/core/src/lib_impl/pyo3/container_test.rs b/core/src/lib_impl/pyo3/container_test.rs deleted file mode 100644 index e69de29b..00000000 diff --git a/core/src/lib_impl/pyo3/mod.rs b/core/src/lib_impl/pyo3/mod.rs deleted file mode 100644 index a0f5e6d2..00000000 --- a/core/src/lib_impl/pyo3/mod.rs +++ /dev/null @@ -1,9 +0,0 @@ -//! [`PyO3`](pyo3) implementations. -pub mod asset; -pub mod container; -pub mod standard_properties; -pub mod types; - -#[cfg(test)] -#[path = "./mod_test.rs"] -mod mod_test; diff --git a/core/src/lib_impl/pyo3/mod_test.rs b/core/src/lib_impl/pyo3/mod_test.rs deleted file mode 100644 index e69de29b..00000000 diff --git a/core/src/lib_impl/pyo3/standard_properties.rs b/core/src/lib_impl/pyo3/standard_properties.rs deleted file mode 100644 index c973cea3..00000000 --- a/core/src/lib_impl/pyo3/standard_properties.rs +++ /dev/null @@ -1,83 +0,0 @@ -//! [`PyO3`](pyo3) implementation for [`StandardProperties`]. -use crate::project::StandardProperties; -use pyo3::conversion::ToPyObject; -use pyo3::prelude::*; -use serde_json::Value as SerdeValue; -use std::collections::{HashMap, HashSet}; - -#[pymethods] -impl StandardProperties { - #[getter(name)] - fn py_name(&self) -> Option { - self.name.clone() - } - - #[getter(kind)] - fn py_kind(&self) -> Option { - self.kind.clone() - } - - #[getter(tags)] - fn py_tags(&self) -> HashSet { - self.tags.clone().into_iter().collect() - } - - #[getter(metadata)] - fn py_metadata(&self) -> HashMap { - let mut md = HashMap::new(); - for (k, v) in &self.metadata { - let val = SerdePyValue(v.clone()); - md.insert(k.clone(), val); - } - md - } -} - -/// Intermediate struct for converting between serde_json::Value's and pyo3::PyObject's. -#[repr(transparent)] -#[derive(Clone, Debug)] -struct SerdePyValue(serde_json::Value); - -/// Convert from serde_json::Value to pyo3::PyObject. -impl ToPyObject for SerdePyValue { - fn to_object(&self, py: Python<'_>) -> PyObject { - serde_value_to_py_object(&self.0, py) - } -} - -impl IntoPy for SerdePyValue { - fn into_py(self, py: Python<'_>) -> PyObject { - self.to_object(py) - } -} - -// from https://stackoverflow.com/questions/70193869/exporting-hashmap-of-hashmap-to-python -/// Convert a serde_json::Value to a [`pyo3::PyObject`]. -fn serde_value_to_py_object(val: &SerdeValue, py: Python<'_>) -> PyObject { - match val { - SerdeValue::Null => py.None(), - SerdeValue::Bool(b) => b.to_object(py), - SerdeValue::Number(n) => { - let oi64 = n.as_i64().map(|i| i.to_object(py)); - let ou64 = n.as_u64().map(|i| i.to_object(py)); - let of64 = n.as_f64().map(|i| i.to_object(py)); - oi64.or(ou64).or(of64).expect("number too large") - } - SerdeValue::String(s) => s.to_object(py), - SerdeValue::Array(v) => { - let inner: Vec<_> = v.iter().map(|x| serde_value_to_py_object(x, py)).collect(); - inner.to_object(py) - } - SerdeValue::Object(m) => { - let inner: HashMap<_, _> = m - .iter() - .map(|(k, v)| (k, serde_value_to_py_object(v, py))) - .collect(); - inner.to_object(py) - } - } -} - -#[cfg(test)] -#[path = "./standard_properties_test.rs"] -mod standard_properties_test; diff --git a/core/src/lib_impl/pyo3/standard_properties_test.rs b/core/src/lib_impl/pyo3/standard_properties_test.rs deleted file mode 100644 index e69de29b..00000000 diff --git a/core/src/lib_impl/pyo3/types.rs b/core/src/lib_impl/pyo3/types.rs deleted file mode 100644 index a6432ffb..00000000 --- a/core/src/lib_impl/pyo3/types.rs +++ /dev/null @@ -1,23 +0,0 @@ -//! [`PyO3`](pyo3) implementation for types: -//! + [`ResourceId`] -use crate::types::ResourceId; -use pyo3::conversion::ToPyObject; -use pyo3::prelude::*; -use pyo3::types::PyString; - -impl ToPyObject for ResourceId { - fn to_object(&self, py: Python<'_>) -> PyObject { - let py_str = PyString::new(py, &self.to_string()); - PyObject::from(py_str) - } -} - -// impl IntoPy for ResourceId { -// fn into_py(self, py: Python<'_>) -> PyObject { -// self.to_object(py) -// } -// } - -#[cfg(test)] -#[path = "./types_test.rs"] -mod types_test; diff --git a/core/src/lib_impl/pyo3/types_test.rs b/core/src/lib_impl/pyo3/types_test.rs deleted file mode 100644 index e69de29b..00000000 diff --git a/core/src/lib_impl/yew/mod.rs b/core/src/lib_impl/yew/mod.rs index 58d5e4f7..260042f5 100644 --- a/core/src/lib_impl/yew/mod.rs +++ b/core/src/lib_impl/yew/mod.rs @@ -1,7 +1,3 @@ //! ['yew'] implementations for 'thot_core' resources. pub mod project; pub mod types; - -#[cfg(test)] -#[path = "./mod_test.rs"] -mod mod_test; diff --git a/core/src/lib_impl/yew/mod_test.rs b/core/src/lib_impl/yew/mod_test.rs deleted file mode 100644 index e69de29b..00000000 diff --git a/core/src/lib_impl/yew/project.rs b/core/src/lib_impl/yew/project.rs index afd55d7c..6a05e973 100644 --- a/core/src/lib_impl/yew/project.rs +++ b/core/src/lib_impl/yew/project.rs @@ -13,7 +13,3 @@ impl Into for &Project { self.rid.clone().into() } } - -#[cfg(test)] -#[path = "./project_test.rs"] -mod project_test; diff --git a/core/src/lib_impl/yew/project_test.rs b/core/src/lib_impl/yew/project_test.rs deleted file mode 100644 index e69de29b..00000000 diff --git a/core/src/lib_impl/yew/types/mod.rs b/core/src/lib_impl/yew/types/mod.rs index 7f90419c..2def8c07 100644 --- a/core/src/lib_impl/yew/types/mod.rs +++ b/core/src/lib_impl/yew/types/mod.rs @@ -1,6 +1,2 @@ //! Yew implementations for [`types`](crate::types). pub mod resource_id; - -#[cfg(test)] -#[path = "./mod_test.rs"] -mod mod_test; diff --git a/core/src/lib_impl/yew/types/mod_test.rs b/core/src/lib_impl/yew/types/mod_test.rs deleted file mode 100644 index e69de29b..00000000 diff --git a/core/src/lib_impl/yew/types/resource_id.rs b/core/src/lib_impl/yew/types/resource_id.rs index 53a84cb5..1728f2a3 100644 --- a/core/src/lib_impl/yew/types/resource_id.rs +++ b/core/src/lib_impl/yew/types/resource_id.rs @@ -20,7 +20,3 @@ impl IntoPropValue> for ResourceId { Some(self.to_string().into()) } } - -#[cfg(test)] -#[path = "./resource_id_test.rs"] -mod resource_id_test; diff --git a/core/src/lib_impl/yew/types/resource_id_test.rs b/core/src/lib_impl/yew/types/resource_id_test.rs deleted file mode 100644 index e69de29b..00000000 diff --git a/core/src/lib_test.rs b/core/src/lib_test.rs deleted file mode 100644 index e69de29b..00000000 diff --git a/core/src/project/asset.rs b/core/src/project/asset.rs index 59b691c0..fc489177 100644 --- a/core/src/project/asset.rs +++ b/core/src/project/asset.rs @@ -1,6 +1,6 @@ /// Asset. -use super::{standard_properties::Builder as PropertiesBuilder, Metadata, StandardProperties}; -use crate::db::{Resource, StandardResource}; +use super::{asset_properties::Builder as PropertiesBuilder, AssetProperties, Metadata}; +use crate::db::Resource; use crate::types::{Creator, ResourceId, ResourcePath}; use chrono::prelude::*; use has_id::HasId; @@ -21,7 +21,7 @@ use has_id::HasIdSerde; pub struct Asset { #[id] pub rid: ResourceId, - pub properties: StandardProperties, + pub properties: AssetProperties, /// Path to the `Asset`'s resource file. pub path: ResourcePath, @@ -31,7 +31,7 @@ impl Asset { pub fn new(path: ResourcePath) -> Asset { Asset { rid: ResourceId::new(), - properties: StandardProperties::new(), + properties: AssetProperties::new(), path, } } @@ -62,16 +62,6 @@ impl Hash for Asset { impl Resource for Asset {} -impl StandardResource for Asset { - fn properties(&self) -> &StandardProperties { - &self.properties - } - - fn properties_mut(&mut self) -> &mut StandardProperties { - &mut self.properties - } -} - // *************** // *** Builder *** // *************** diff --git a/core/src/project/standard_properties.rs b/core/src/project/asset_properties.rs similarity index 83% rename from core/src/project/standard_properties.rs rename to core/src/project/asset_properties.rs index fbfe2d7d..884b2892 100644 --- a/core/src/project/standard_properties.rs +++ b/core/src/project/asset_properties.rs @@ -8,26 +8,26 @@ use std::collections::HashMap; #[cfg(feature = "serde")] use serde::{Deserialize, Serialize}; -// *************************** -// *** Standard Properties *** -// *************************** +// ************************ +// *** Asset Properties *** +// ************************ /// Standard resource properties. #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "pyo3", pyo3::pyclass)] -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct StandardProperties { +#[derive(Debug, Clone, PartialEq, Eq, Default)] +pub struct AssetProperties { created: DateTime, pub creator: Creator, pub name: Option, pub kind: Option, pub description: Option, - pub tags: Vec, // @todo: Should be a `HashSet`. + pub tags: Vec, pub metadata: Metadata, } -impl StandardProperties { +impl AssetProperties { pub fn new() -> Self { Self { created: Utc::now(), @@ -46,21 +46,6 @@ impl StandardProperties { } } -impl Default for StandardProperties { - fn default() -> Self { - StandardProperties { - created: Utc::now(), - creator: Creator::User(None), - - name: None, - kind: None, - description: None, - tags: Vec::new(), - metadata: HashMap::new(), - } - } -} - // *************** // *** Builder *** // *************** @@ -191,9 +176,9 @@ impl Default for Builder { } } -impl Into for Builder { - fn into(self) -> StandardProperties { - StandardProperties { +impl Into for Builder { + fn into(self) -> AssetProperties { + AssetProperties { created: self.created.unwrap_or_else(|| Utc::now()), creator: self.creator, name: self.name, @@ -204,7 +189,3 @@ impl Into for Builder { } } } - -#[cfg(test)] -#[path = "standard_properties_test.rs"] -mod standard_properties_test; diff --git a/core/src/project/container.rs b/core/src/project/container.rs index 64d67115..f8ae2078 100644 --- a/core/src/project/container.rs +++ b/core/src/project/container.rs @@ -1,9 +1,13 @@ //! Container. -use super::standard_properties::StandardProperties; -use super::{Asset, RunParameters}; -use crate::db::{Resource, StandardResource}; +use super::container_properties::{Builder as PropertiesBuilder, ContainerProperties}; +use super::Metadata; +use super::{Asset, RunParameters, ScriptAssociation}; +use crate::db::Resource; +use crate::types::Creator; use crate::types::{ResourceId, ResourceMap}; +use chrono::prelude::*; use has_id::HasId; +use serde_json::Value as JsValue; use std::hash::{Hash, Hasher}; #[cfg(feature = "serde")] @@ -26,27 +30,30 @@ pub type ScriptMap = ResourceMap; pub struct Container { #[id] pub rid: ResourceId, - pub properties: StandardProperties, + pub properties: ContainerProperties, pub assets: AssetMap, pub scripts: ScriptMap, } impl Container { - /// Inserts an [`Asset`] into the [`Container`]. - pub fn insert_asset(&mut self, asset: Asset) -> Option { - self.assets.insert(asset.rid.clone(), asset) - } -} - -impl Default for Container { - fn default() -> Container { + pub fn new(name: impl Into) -> Container { Container { rid: ResourceId::new(), - properties: StandardProperties::default(), + properties: ContainerProperties::new(name), assets: AssetMap::default(), scripts: ScriptMap::default(), } } + + /// Inserts an [`Asset`] into the [`Container`]. + pub fn insert_asset(&mut self, asset: Asset) -> Option { + self.assets.insert(asset.rid.clone(), asset) + } + + /// Inserts an [`Asset`] into the [`Container`]. + pub fn remove_asset(&mut self, rid: &ResourceId) -> Option { + self.assets.remove(rid) + } } impl Hash for Container { @@ -57,16 +64,130 @@ impl Hash for Container { impl Resource for Container {} -impl StandardResource for Container { - fn properties(&self) -> &StandardProperties { - &self.properties +// *************** +// *** Builder *** +// *************** + +#[derive(Default)] +pub struct Builder { + properties: PropertiesBuilder, + assets: AssetMap, + scripts: ScriptMap, +} + +impl Builder { + pub fn set_created(&mut self, value: DateTime) -> &mut Self { + self.properties.set_created(value); + self + } + + pub fn clear_created(&mut self) -> &mut Self { + self.properties.clear_created(); + self + } + + pub fn set_creator(&mut self, value: Creator) -> &mut Self { + self.properties.set_creator(value); + self + } + + pub fn set_name(&mut self, value: String) -> &mut Self { + self.properties.set_name(value); + self + } + + pub fn set_kind(&mut self, value: String) -> &mut Self { + self.properties.set_kind(value); + self + } + + pub fn clear_kind(&mut self) -> &mut Self { + self.properties.clear_kind(); + self + } + + pub fn set_description(&mut self, value: String) -> &mut Self { + self.properties.set_description(value); + self } - fn properties_mut(&mut self) -> &mut StandardProperties { - &mut self.properties + pub fn clear_description(&mut self) -> &mut Self { + self.properties.clear_description(); + self + } + + pub fn set_tags(&mut self, value: Vec) -> &mut Self { + self.properties.set_tags(value); + self + } + + pub fn clear_tags(&mut self) -> &mut Self { + self.properties.clear_tags(); + self + } + + pub fn add_tag(&mut self, value: impl Into) -> &mut Self { + self.properties.add_tag(value); + self + } + + pub fn remove_tag(&mut self, value: impl Into) -> &mut Self { + self.properties.remove_tag(value); + self + } + + pub fn set_metadata(&mut self, value: Metadata) -> &mut Self { + self.properties.set_metadata(value); + self + } + + pub fn clear_metadata(&mut self) -> &mut Self { + self.properties.clear_metadata(); + self + } + + pub fn set_metadatum( + &mut self, + key: impl Into, + value: impl Into, + ) -> &mut Self { + self.properties.set_metadatum(key.into(), value.into()); + self + } + + pub fn remove_metadatum(&mut self, key: impl Into) -> &mut Self { + self.properties.remove_metadatum(key); + self + } + + pub fn add_asset(&mut self, asset: Asset) -> &mut Self { + self.assets.insert(asset.rid.clone(), asset); + self + } + + pub fn remove_asset(&mut self, rid: &ResourceId) -> &mut Self { + self.assets.remove(rid); + self + } + + pub fn add_script(&mut self, script: ScriptAssociation) -> &mut Self { + self.scripts.insert(script.script.clone(), script.into()); + self + } + + pub fn remove_script(&mut self, rid: &ResourceId) -> &mut Self { + self.scripts.remove(rid); + self } } -#[cfg(test)] -#[path = "./container_test.rs"] -mod container_test; +impl Into for Builder { + fn into(self) -> Container { + Container { + rid: ResourceId::new(), + properties: self.properties.into(), + assets: self.assets, + scripts: self.scripts, + } + } +} diff --git a/core/src/project/container_properties.rs b/core/src/project/container_properties.rs new file mode 100644 index 00000000..9b1d555c --- /dev/null +++ b/core/src/project/container_properties.rs @@ -0,0 +1,176 @@ +//! Container properties. +use super::Metadata; +use crate::types::Creator; +use chrono::prelude::*; +use serde_json::Value as JsValue; +use std::collections::HashMap; + +#[cfg(feature = "serde")] +use serde::{Deserialize, Serialize}; + +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] +#[cfg_attr(feature = "pyo3", pyo3::pyclass)] +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct ContainerProperties { + created: DateTime, + pub creator: Creator, + + pub name: String, + pub kind: Option, + pub description: Option, + pub tags: Vec, + pub metadata: Metadata, +} + +impl ContainerProperties { + pub fn new(name: impl Into) -> Self { + Self { + created: Utc::now(), + creator: Creator::User(None), + + name: name.into(), + kind: None, + description: None, + tags: Vec::new(), + metadata: HashMap::new(), + } + } + + pub fn created(&self) -> &DateTime { + &self.created + } +} + +// *************** +// *** Builder *** +// *************** + +#[derive(Default)] +pub struct Builder { + created: Option>, + creator: Creator, + name: String, + kind: Option, + description: Option, + tags: Vec, + metadata: Metadata, +} + +impl Builder { + pub fn set_created(&mut self, value: DateTime) -> &mut Self { + self.created = Some(value); + self + } + + pub fn clear_created(&mut self) -> &mut Self { + self.created = None; + self + } + + pub fn set_creator(&mut self, value: Creator) -> &mut Self { + self.creator = value; + self + } + + pub fn set_name(&mut self, value: String) -> &mut Self { + self.name = value; + self + } + + pub fn set_kind(&mut self, value: String) -> &mut Self { + self.kind = Some(value); + self + } + + pub fn clear_kind(&mut self) -> &mut Self { + self.kind = None; + self + } + + pub fn set_description(&mut self, value: String) -> &mut Self { + self.description = Some(value); + self + } + + pub fn clear_description(&mut self) -> &mut Self { + self.description = None; + self + } + + pub fn set_tags(&mut self, value: Vec) -> &mut Self { + self.tags = value; + self + } + + pub fn clear_tags(&mut self) -> &mut Self { + self.tags.clear(); + self + } + + pub fn add_tag(&mut self, value: impl Into) -> &mut Self { + let value = value.into(); + if self.tags.iter().filter(|tag| tag == &&value).count() == 0 { + self.tags.push(value); + } + + self + } + + pub fn remove_tag(&mut self, value: impl Into) -> &mut Self { + let value = value.into(); + self.tags.retain(|tag| tag != &value); + self + } + + pub fn set_metadata(&mut self, value: Metadata) -> &mut Self { + self.metadata = value; + self + } + + pub fn clear_metadata(&mut self) -> &mut Self { + self.metadata.clear(); + self + } + + pub fn set_metadatum( + &mut self, + key: impl Into, + value: impl Into, + ) -> &mut Self { + self.metadata.insert(key.into(), value.into()); + self + } + + pub fn remove_metadatum(&mut self, key: impl Into) -> &mut Self { + self.metadata.remove(&key.into()); + self + } +} + +impl Builder { + pub fn new(name: impl Into) -> Self { + Self { + created: None, + creator: Creator::default(), + name: name.into(), + kind: None, + description: None, + tags: Vec::default(), + metadata: Metadata::default(), + } + } +} + +impl Into for Builder { + fn into(self) -> ContainerProperties { + ContainerProperties { + created: self.created.unwrap_or_else(|| Utc::now()), + creator: self.creator, + name: self.name, + kind: self.kind, + description: self.description, + tags: self.tags, + metadata: self.metadata, + } + } +} diff --git a/core/src/project/container_test.rs b/core/src/project/container_test.rs deleted file mode 100644 index e69de29b..00000000 diff --git a/core/src/project/metadata.rs b/core/src/project/metadata.rs index 9413cff9..b9942a5f 100644 --- a/core/src/project/metadata.rs +++ b/core/src/project/metadata.rs @@ -13,7 +13,3 @@ pub trait InheritMetadata { /// Returns inherited [`Metadata`]. fn metadata_inherited(&self) -> &Metadata; } - -#[cfg(test)] -#[path = "./metadata_test.rs"] -mod metadata_test; diff --git a/core/src/project/metadata_test.rs b/core/src/project/metadata_test.rs deleted file mode 100644 index e69de29b..00000000 diff --git a/core/src/project/mod.rs b/core/src/project/mod.rs index 20cefb4b..563c3a2a 100644 --- a/core/src/project/mod.rs +++ b/core/src/project/mod.rs @@ -1,17 +1,21 @@ /// Project resources. pub mod asset; +pub mod asset_properties; pub mod container; +pub mod container_properties; pub mod metadata; pub mod project; +pub mod resources; pub mod script; pub mod script_association; -pub mod standard_properties; // Reexports pub use asset::Asset; +pub use asset_properties::AssetProperties; pub use container::Container; +pub use container_properties::ContainerProperties; pub use metadata::Metadata; pub use project::Project; +pub use resources::ResourceProperties; pub use script::{Script, ScriptEnv, ScriptLang, Scripts}; pub use script_association::{RunParameters, ScriptAssociation}; -pub use standard_properties::StandardProperties; diff --git a/core/src/project/mod_test.rs b/core/src/project/mod_test.rs deleted file mode 100644 index e69de29b..00000000 diff --git a/core/src/project/notes.rs b/core/src/project/notes.rs deleted file mode 100644 index e69de29b..00000000 diff --git a/core/src/project/notes_test.rs b/core/src/project/notes_test.rs deleted file mode 100644 index e69de29b..00000000 diff --git a/core/src/project/project.rs b/core/src/project/project.rs index a0a66819..1dc30a64 100644 --- a/core/src/project/project.rs +++ b/core/src/project/project.rs @@ -28,26 +28,10 @@ pub struct Project { impl Project { /// Creates a new Project. - pub fn new(name: &str) -> Project { + pub fn new(name: impl Into) -> Project { Project { rid: ResourceId::new(), - name: String::from(name), - creator: Creator::User(None), - created: Utc::now(), - description: None, - data_root: None, - universal_root: None, - analysis_root: None, - meta_level: 0, - } - } -} - -impl Default for Project { - fn default() -> Project { - Project { - rid: ResourceId::new(), - name: String::from(""), + name: name.into(), creator: Creator::User(None), created: Utc::now(), description: None, diff --git a/core/src/project/project_test.rs b/core/src/project/project_test.rs index 8297f3a2..5178a17c 100644 --- a/core/src/project/project_test.rs +++ b/core/src/project/project_test.rs @@ -5,7 +5,7 @@ use super::*; // *************** #[test] -fn project_new_w_defaults() { +fn project_new_should_work() { let p_name = String::from("test"); let prj = Project::new(p_name.as_str()); diff --git a/core/src/project/resources.rs b/core/src/project/resources.rs index 40989f11..a6192951 100644 --- a/core/src/project/resources.rs +++ b/core/src/project/resources.rs @@ -1,23 +1,19 @@ -use super::RunParameters; -use super::StandardResource; -use crate::types::{ResourceMap, ResourceStore}; -use std::path::{Path, PathBuf}; -use std::sync::{Arc, Mutex}; +use super::{AssetProperties, ContainerProperties}; -pub trait Asset: StandardResource { - fn path(&self) -> &Path; - fn set_path(&mut self, path: PathBuf); +#[derive(PartialEq, Eq, Clone)] +pub enum ResourceProperties { + Container(ContainerProperties), + Asset(AssetProperties), } -pub trait Container: StandardResource { - type Asset: Asset; - - fn children(&self) -> &ResourceStore>>; - fn children_mut(&mut self) -> &mut ResourceStore>>; - - fn assets(&self) -> &ResourceMap; - fn assets_mut(&mut self) -> &mut ResourceMap; +impl From for ResourceProperties { + fn from(props: ContainerProperties) -> Self { + Self::Container(props) + } +} - fn scripts(&self) -> &ResourceMap; - fn scripts_mut(&mut self) -> &mut ResourceMap; +impl From for ResourceProperties { + fn from(props: AssetProperties) -> Self { + Self::Asset(props) + } } diff --git a/core/src/project/script.rs b/core/src/project/script.rs index 822ae198..6a5bf814 100644 --- a/core/src/project/script.rs +++ b/core/src/project/script.rs @@ -8,6 +8,7 @@ use std::collections::HashMap; use std::ffi::OsStr; use std::ops::{Deref, DerefMut}; use std::path::Path; +use std::result::Result as StdResult; #[cfg(feature = "serde")] use serde::{Deserialize, Serialize}; @@ -37,17 +38,12 @@ pub struct Script { } impl Script { - pub fn new(path: ResourcePath) -> Result