diff --git a/Cargo.lock b/Cargo.lock index 688278704..de37c0cbb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -10,9 +10,9 @@ checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" [[package]] name = "addr2line" -version = "0.19.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" +checksum = "f4fa78e18c64fce05e902adecd7a5eed15a5e0a3439f7b0e169f0252214865e3" dependencies = [ "gimli", ] @@ -77,9 +77,9 @@ dependencies = [ [[package]] name = "aes" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "433cfd6710c9986c576a25ca913c39d66a6474107b406f34f91d4a8923395241" +checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2" dependencies = [ "cfg-if", "cipher 0.4.4", @@ -107,7 +107,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "209b47e8954a928e1d72e86eca7000ebb6655fe1436d33eefc2201cad027e237" dependencies = [ "aead 0.5.2", - "aes 0.8.2", + "aes 0.8.3", "cipher 0.4.4", "ctr 0.9.2", "ghash 0.5.0", @@ -140,7 +140,7 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" dependencies = [ - "getrandom 0.2.9", + "getrandom 0.2.10", "once_cell", "version_check", ] @@ -210,15 +210,15 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41ed9a86bf92ae6580e0a31281f65a1b1d867c0cc68d5346e2ae128dddfa6a7d" +checksum = "3a30da5c5f2d5e72842e00bcb57657162cdabef0931f40e2deb9b4140440cecd" [[package]] name = "anstyle-parse" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e765fd216e48e067936442276d1d57399e37bce53c264d6fefbe298080cb57ee" +checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333" dependencies = [ "utf8parse", ] @@ -244,9 +244,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.71" +version = "1.0.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" +checksum = "3b13c32d80ecc7ab747b80c3784bce54ee8a7a0cc4fbda9bf4cda2cf6fe90854" [[package]] name = "aovec" @@ -266,12 +266,13 @@ checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6" [[package]] name = "argon2" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95c2fcf79ad1932ac6269a738109997a83c227c09b75842ae564dc8ede6a861c" +checksum = "b2e554a8638bdc1e4eae9984845306cc95f8a9208ba8d49c3859fd958b46774d" dependencies = [ "base64ct", "blake2", + "cpufeatures", "password-hash", ] @@ -283,9 +284,9 @@ checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" [[package]] name = "arrayvec" -version = "0.7.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" [[package]] name = "ascii" @@ -306,7 +307,7 @@ dependencies = [ "num-traits", "rusticata-macros", "thiserror", - "time 0.3.15", + "time 0.3.25", ] [[package]] @@ -322,7 +323,7 @@ dependencies = [ "num-traits", "rusticata-macros", "thiserror", - "time 0.3.15", + "time 0.3.25", ] [[package]] @@ -385,9 +386,9 @@ dependencies = [ "log", "parking", "polling", - "rustix", + "rustix 0.37.23", "slab", - "socket2", + "socket2 0.4.9", "waker-fn", ] @@ -419,18 +420,18 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.28", ] [[package]] name = "async-trait" -version = "0.1.68" +version = "0.1.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" +checksum = "cc6dde6e4ed435a4c1ee4e73592f5ba9da2151af10076cc04858746af9352d09" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.28", ] [[package]] @@ -449,9 +450,9 @@ dependencies = [ [[package]] name = "asynchronous-codec" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06a0daa378f5fd10634e44b0a29b2a87b890657658e072a30d6f26e57ddee182" +checksum = "4057f2c32adbb2fc158e22fb38433c8e9bbf76b75a4732c7c0cbaf695fb65568" dependencies = [ "bytes", "futures-sink", @@ -467,7 +468,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c3d816ce6f0e2909a96830d6911c2aff044370b1ef92d7f267b43bae5addedd" dependencies = [ "atk-sys", - "bitflags", + "bitflags 1.3.2", "glib", "libc", ] @@ -481,7 +482,7 @@ dependencies = [ "glib-sys", "gobject-sys", "libc", - "system-deps 6.1.0", + "system-deps 6.1.1", ] [[package]] @@ -499,33 +500,6 @@ version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1181e1e0d1fce796a03db1ae795d67167da795f9cf4a39c37589e85ef57f26d3" -[[package]] -name = "attohttpc" -version = "0.22.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", -] - -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi 0.1.19", - "libc", - "winapi", -] - [[package]] name = "autocfg" version = "1.1.0" @@ -534,20 +508,20 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "axum" -version = "0.6.18" +version = "0.6.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8175979259124331c1d7bf6586ee7e0da434155e4b2d48ec2c8386281d8df39" +checksum = "a6a1de45611fdb535bfde7b7de4fd54f4fd2b17b1737c0a59b69bf9b92074b8c" dependencies = [ "async-trait", "axum-core", - "bitflags", + "bitflags 1.3.2", "bytes", "futures-util", "headers", "http", "http-body", "hyper", - "itoa 1.0.6", + "itoa 1.0.9", "matchit", "memchr", "mime", @@ -584,15 +558,15 @@ dependencies = [ [[package]] name = "backtrace" -version = "0.3.67" +version = "0.3.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "233d376d6d185f2a3093e58f283f60f880315b6c60075b01f36b3b85154564ca" +checksum = "4319208da049c43661739c5fade2ba182f09d1dc2299b32298d3a31692b17e12" dependencies = [ "addr2line", "cc", "cfg-if", "libc", - "miniz_oxide 0.6.2", + "miniz_oxide", "object", "rustc-demangle", ] @@ -672,16 +646,6 @@ dependencies = [ "serde", ] -[[package]] -name = "bigint" -version = "4.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0e8c8a600052b52482eff2cf4d810e462fdff1f656ac1ecb6232132a1ed7def" -dependencies = [ - "byteorder", - "crunchy 0.1.6", -] - [[package]] name = "bincode" version = "1.3.3" @@ -697,7 +661,7 @@ version = "0.64.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4243e6031260db77ede97ad86c27e501d646a27ab57b59a574f725d98ab1fb4" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cexpr", "clang-sys", "lazy_static", @@ -711,21 +675,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "bit-set" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" -dependencies = [ - "bit-vec", -] - -[[package]] -name = "bit-vec" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" - [[package]] name = "bit_field" version = "0.10.2" @@ -738,6 +687,12 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "bitflags" +version = "2.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" + [[package]] name = "bitvec" version = "1.0.1" @@ -761,9 +716,9 @@ dependencies = [ [[package]] name = "blake3" -version = "1.3.3" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ae2468a89544a466886840aa467a25b766499f4f04bf7d9fcd10ecee9fccef" +checksum = "199c42ab6972d92c9f8995f086273d25c42fc0f7b2a1fcefba465c1352d25ba5" dependencies = [ "arrayref", "arrayvec", @@ -852,13 +807,12 @@ checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" [[package]] name = "bstr" -version = "1.5.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a246e68bb43f6cd9db24bea052a53e40405417c5fb372e3d1a8a7f770a564ef5" +checksum = "6798148dccfbff0fae41c7574d2fa8f1ef3492fba0face179de5d8d447d67b05" dependencies = [ "memchr", - "once_cell", - "regex-automata", + "regex-automata 0.3.4", "serde", ] @@ -870,7 +824,7 @@ dependencies = [ "connection-string", "either", "enumflags2 0.7.7", - "indoc 2.0.1", + "indoc 2.0.3", "lsp-types", "once_cell", "psl-core", @@ -916,7 +870,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", @@ -931,23 +885,23 @@ checksum = "3c55d429bef56ac9172d25fecb85dc8068307d17acd74b377866b7a1ef25d3c8" dependencies = [ "glib-sys", "libc", - "system-deps 6.1.0", + "system-deps 6.1.1", ] [[package]] name = "camino" -version = "1.1.4" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c530edf18f37068ac2d977409ed5cd50d53d73bc653c7647b48eb78976ac9ae2" +checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c" dependencies = [ "serde", ] [[package]] name = "cargo-platform" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbdb825da8a5df079a43676dbe042702f1707b1109f713a01420fbb4cc71fa27" +checksum = "2cfa25e60aea747ec7e1124f238816749faa93759c6ff5b31f1ccdda137f4479" dependencies = [ "serde", ] @@ -981,21 +935,22 @@ dependencies = [ [[package]] name = "cargo_toml" -version = "0.15.2" +version = "0.15.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f83bc2e401ed041b7057345ebc488c005efa0341d5541ce7004d30458d0090b" +checksum = "599aa35200ffff8f04c1925aa1acc92fa2e08874379ef42e210a80e527e60838" dependencies = [ "serde", - "toml 0.7.3", + "toml 0.7.6", ] [[package]] name = "cc" -version = "1.0.79" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +checksum = "6c6b2562119bf28c3439f7f02db99faf0aa1a8cdfe5772a2ee155d32227239f0" dependencies = [ "jobserver", + "libc", ] [[package]] @@ -1041,16 +996,16 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3431df59f28accaf4cb4eed4a9acc66bea3f3c3753aa6cdc2f024174ef232af7" dependencies = [ - "smallvec 1.10.0", + "smallvec 1.11.0", ] [[package]] name = "cfg-expr" -version = "0.15.1" +version = "0.15.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8790cf1286da485c72cf5fc7aeba308438800036ec67d89425924c4807268c9" +checksum = "b40ccee03b5175c18cde8f37e7d2a33bcef6f8ec8f7cc0d81090d1bb380949c9" dependencies = [ - "smallvec 1.10.0", + "smallvec 1.11.0", "target-lexicon", ] @@ -1111,16 +1066,16 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.25" +version = "0.4.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdbc37d37da9e5bce8173f3a41b71d9bf3c674deebbaceacd0ebdabde76efb03" +checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5" dependencies = [ "android-tzdata", "iana-time-zone", "js-sys", "num-traits", "serde", - "time 0.1.45", + "time 0.1.43", "wasm-bindgen", "winapi", ] @@ -1167,9 +1122,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.3.0" +version = "4.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93aae7a4192245f70fe75dd9157fc7b4a5bf53e88d30bd4396f7d8f9284d5acc" +checksum = "5fd304a20bff958a57f04c4e96a2e7594cc4490a0e809cbd48bb6437edaa452d" dependencies = [ "clap_builder", "clap_derive", @@ -1178,27 +1133,26 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.3.0" +version = "4.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f423e341edefb78c9caba2d9c7f7687d0e72e89df3ce3394554754393ac3990" +checksum = "01c6a3f08f1fe5662a35cfe393aec09c4df95f60ee93b7556505260f75eee9e1" dependencies = [ "anstream", "anstyle", - "bitflags", "clap_lex", "strsim", ] [[package]] name = "clap_derive" -version = "4.3.0" +version = "4.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "191d9573962933b4027f932c600cd252ce27a8ad5979418fe78e43c07996f27b" +checksum = "54a9bb5758fc5dfe728d1019941681eccaf0cf8a4189b692a0ee2f2ecf90a050" dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.28", ] [[package]] @@ -1207,25 +1161,13 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b" -[[package]] -name = "cli" -version = "0.1.0" -dependencies = [ - "anyhow", - "clap", - "hex", - "indoc 1.0.9", - "sd-crypto", - "tokio", -] - [[package]] name = "cocoa" 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", @@ -1241,7 +1183,7 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "931d3837c286f56e3c58423ce4eba12d08db2374461a785c86f672b08b5650d6" dependencies = [ - "bitflags", + "bitflags 1.3.2", "block", "core-foundation", "core-graphics-types", @@ -1264,13 +1206,13 @@ checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" [[package]] name = "colored" -version = "2.0.0" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3616f750b84d8f0de8a58bda93e08e2a81ad3f523089b05f1dffecab48c6cbd" +checksum = "2674ec482fbc38012cf31e6c42ba0177b431a0cb6f15fe40efa5aab1bda516f6" dependencies = [ - "atty", + "is-terminal", "lazy_static", - "winapi", + "windows-sys 0.48.0", ] [[package]] @@ -1313,15 +1255,15 @@ checksum = "510ca239cf13b7f8d16a2b48f263de7b4f8c566f0af58d901031473c76afb1e3" [[package]] name = "const-oid" -version = "0.9.2" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520fbf3c07483f94e3e3ca9d0cfd913d7718ef2483d2cfd91c0d9e91474ab913" +checksum = "795bc6e66a8e340f075fcf6227e417a2dc976b92b91f3cdc778bb858778b6747" [[package]] name = "constant_time_eq" -version = "0.2.5" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13418e745008f7349ec7e449155f419a61b92b58a99cc3616942b926825ec76b" +checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" [[package]] name = "convert_case" @@ -1351,7 +1293,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e859cd57d0710d9e06c381b550c06e76992472a8c6d527aecd2fc673dcc231fb" dependencies = [ "percent-encoding", - "time 0.3.15", + "time 0.3.25", "version_check", ] @@ -1377,7 +1319,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", @@ -1386,13 +1328,12 @@ 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", ] @@ -1407,9 +1348,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.7" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e4c1eaa2012c47becbbad2ab175484c2a84d1185b566fb2cc5b8707343dfe58" +checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" dependencies = [ "libc", ] @@ -1461,32 +1402,26 @@ 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 0.9.0", "scopeguard", ] [[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", ] -[[package]] -name = "crunchy" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2f4a431c5c9f662e1200b7c7f02c34e91361150e382089a8f2dec3ba680cbda" - [[package]] name = "crunchy" version = "0.2.2" @@ -1549,18 +1484,18 @@ dependencies = [ "phf 0.8.0", "proc-macro2", "quote", - "smallvec 1.10.0", + "smallvec 1.11.0", "syn 1.0.109", ] [[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.28", ] [[package]] @@ -1593,28 +1528,22 @@ dependencies = [ [[package]] name = "ctrlc" -version = "3.3.1" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7394a21d012ce5c850497fb774b167d81b99f060025fbf06ee92b9848bd97eb2" +checksum = "2a011bbe2c35ce9c1f143b7af6f94f29a167beb4cd1d29e6740ce836f723120e" dependencies = [ "nix 0.26.2", "windows-sys 0.48.0", ] -[[package]] -name = "cty" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35" - [[package]] name = "cuid" -version = "1.3.1" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe5d03ac594f5f9cc680b142fff46f3ad9f197e19272042ebf1a40b383fee6fb" +checksum = "51294db11d38eb763c92936c5c88425d0090e27dce21dd15748134af9e53e739" dependencies = [ "base36", - "bigint", + "cuid-util", "cuid2", "hostname", "num", @@ -1623,13 +1552,19 @@ dependencies = [ ] [[package]] -name = "cuid2" +name = "cuid-util" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1debbff0c0f0b54e681296c6f064a78f8ecec8e89e7fcc472443d9f85b98ca9a" +checksum = "5ea2bfe0336ff1b7ca74819b2df8dfae9afea358aff6b1688baa5c181d8c3713" + +[[package]] +name = "cuid2" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e460f3fc482e566e7197604dd96a39b5c4d4be72bd360aaab1beaa7166d866e" dependencies = [ + "cuid-util", "num", - "proptest", "rand 0.8.5", "sha3", ] @@ -1673,12 +1608,12 @@ dependencies = [ [[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 0.20.1", - "darling_macro 0.20.1", + "darling_core 0.20.3", + "darling_macro 0.20.3", ] [[package]] @@ -1697,16 +1632,16 @@ 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.18", + "syn 2.0.28", ] [[package]] @@ -1722,26 +1657,26 @@ dependencies = [ [[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 0.20.1", + "darling_core 0.20.3", "quote", - "syn 2.0.18", + "syn 2.0.28", ] [[package]] name = "dashmap" -version = "5.4.0" +version = "5.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "907076dfda823b0b36d2a1bb5f90c96660a5bbcd7729e10727f07858f22c4edc" +checksum = "6943ae99c34386c84a470c499d3414f66502a41340aa895406e0d2e4a207b91d" dependencies = [ "cfg-if", - "hashbrown 0.12.3", + "hashbrown 0.14.0", "lock_api", "once_cell", - "parking_lot_core 0.9.7", + "parking_lot_core 0.9.8", "serde", ] @@ -1844,6 +1779,15 @@ dependencies = [ "rusticata-macros", ] +[[package]] +name = "deranged" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7684a49fb1af197853ef7b2ee694bc1f5b4179556f1e5710e1760c5db6f5e929" +dependencies = [ + "serde", +] + [[package]] name = "derivative" version = "2.2.0" @@ -1905,7 +1849,7 @@ version = "0.1.0" source = "git+https://github.com/Brendonovich/prisma-engines?branch=new-4.14.0-pcr#45b026c8b64ed0b60cb03deed5f478c457de645b" dependencies = [ "colored", - "indoc 2.0.1", + "indoc 2.0.3", "pest", ] @@ -1984,7 +1928,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.28", ] [[package]] @@ -1993,7 +1937,7 @@ version = "0.1.0" source = "git+https://github.com/Brendonovich/prisma-engines?branch=new-4.14.0-pcr#45b026c8b64ed0b60cb03deed5f478c457de645b" dependencies = [ "bigdecimal", - "indexmap", + "indexmap 1.9.3", "prisma-models", "psl", "schema", @@ -2018,23 +1962,17 @@ checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f" [[package]] name = "dtoa" -version = "0.4.8" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56899898ce76aaf4a0f24d914c97ea6ed976d42fec6ad33fcbb0a1103e07b2b0" - -[[package]] -name = "dtoa" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65d09067bfacaa79114679b279d7f5885b53295b1e2cfb4e79c8e4bd3d633169" +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 0.4.8", + "dtoa", ] [[package]] @@ -2080,9 +2018,9 @@ dependencies = [ [[package]] name = "either" -version = "1.8.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" [[package]] name = "elliptic-curve" @@ -2108,13 +2046,13 @@ dependencies = [ [[package]] name = "embed-resource" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80663502655af01a2902dff3f06869330782267924bf1788410b74edcd93770a" +checksum = "f7f1e82a60222fc67bfd50d752a9c89da5cce4c39ed39decc84a443b07bbd69a" dependencies = [ "cc", "rustc_version", - "toml 0.7.3", + "toml 0.7.6", "vswhom", "winreg 0.11.0", ] @@ -2191,25 +2129,31 @@ checksum = "5e9a1f9f7d83e59740248a6e14ecf93929ade55027844dfcea78beafccc15745" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.28", ] [[package]] name = "enumn" -version = "0.1.8" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48016319042fb7c87b78d2993084a831793a897a5cd1a2a67cab9d1eeb4b7d76" +checksum = "b893c4eb2dc092c811165f84dc7447fae16fb66521717968c34c509b39b1a5c5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.28", ] [[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" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b30f669a7961ef1631673d2766cc92f52d64f7ef354d4fe0ddfd30ed52f0f4f" dependencies = [ "errno-dragonfly", "libc", @@ -2243,17 +2187,17 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] name = "exr" -version = "1.6.3" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdd2162b720141a91a054640662d3edce3d50a944a50ffca5313cd951abb35b4" +checksum = "d1e481eb11a482815d3e9d618db8c42a93207134662873809335a92327440c18" dependencies = [ "bit_field", "flume", "half", "lebe", - "miniz_oxide 0.6.2", + "miniz_oxide", "rayon-core", - "smallvec 1.10.0", + "smallvec 1.11.0", "zune-inflate", ] @@ -2300,6 +2244,12 @@ dependencies = [ "instant", ] +[[package]] +name = "fastrand" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" + [[package]] name = "fdeflate" version = "0.3.0" @@ -2341,11 +2291,11 @@ checksum = "e825f6987101665dea6ec934c09ec6d721de7bc1bf92248e1d5810c8cd636b77" [[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 0.9.0", "rustc_version", ] @@ -2374,7 +2324,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b9429470923de8e8cbd4d2dc513535400b4b3fef0319fb5c4e1f520a7bef743" dependencies = [ "crc32fast", - "miniz_oxide 0.7.1", + "miniz_oxide", ] [[package]] @@ -2413,9 +2363,9 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "form_urlencoded" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" +checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" dependencies = [ "percent-encoding", ] @@ -2523,7 +2473,7 @@ version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" dependencies = [ - "fastrand", + "fastrand 1.9.0", "futures-core", "futures-io", "memchr", @@ -2551,7 +2501,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.28", ] [[package]] @@ -2616,7 +2566,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", @@ -2632,7 +2582,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", @@ -2649,7 +2599,7 @@ dependencies = [ "glib-sys", "gobject-sys", "libc", - "system-deps 6.1.0", + "system-deps 6.1.1", ] [[package]] @@ -2666,7 +2616,7 @@ dependencies = [ "libc", "pango-sys", "pkg-config", - "system-deps 6.1.0", + "system-deps 6.1.1", ] [[package]] @@ -2680,7 +2630,7 @@ dependencies = [ "gobject-sys", "libc", "pkg-config", - "system-deps 6.1.0", + "system-deps 6.1.1", ] [[package]] @@ -2692,15 +2642,15 @@ dependencies = [ "gdk-sys", "glib-sys", "libc", - "system-deps 6.1.0", + "system-deps 6.1.1", "x11", ] [[package]] name = "generator" -version = "0.7.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3e123d9ae7c02966b4d892e550bdc32164f05853cd40ab570650ad600596a8a" +checksum = "5cc16584ff22b460a382b7feec54b23d2908d858152e5739a120b949293bd74e" dependencies = [ "cc", "libc", @@ -2732,9 +2682,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.9" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4" +checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" dependencies = [ "cfg-if", "js-sys", @@ -2760,7 +2710,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d930750de5717d2dd0b8c0d42c076c0e884c81a73e6cab859bbd2339c71e3e40" dependencies = [ "opaque-debug", - "polyval 0.6.0", + "polyval 0.6.1", ] [[package]] @@ -2775,9 +2725,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.27.2" +version = "0.27.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0a93d233ebf96623465aad4046a8d3aa4da22d4f4beba5388838c8a434bbb4" +checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" [[package]] name = "gio" @@ -2785,7 +2735,7 @@ 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", @@ -2805,7 +2755,7 @@ dependencies = [ "glib-sys", "gobject-sys", "libc", - "system-deps 6.1.0", + "system-deps 6.1.1", "winapi", ] @@ -2815,7 +2765,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", @@ -2825,7 +2775,7 @@ dependencies = [ "gobject-sys", "libc", "once_cell", - "smallvec 1.10.0", + "smallvec 1.11.0", "thiserror", ] @@ -2851,7 +2801,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef4b192f8e65e9cf76cbf4ea71fa8e3be4a0e18ffe3d68b8da6836974cc5bad4" dependencies = [ "libc", - "system-deps 6.1.0", + "system-deps 6.1.1", ] [[package]] @@ -2862,11 +2812,11 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "globset" -version = "0.4.10" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "029d74589adefde59de1a0c4f4732695c32805624aec7b68d91503d4dba79afc" +checksum = "aca8bbd8e0707c1887a8bbb7e6b40e228f251ff5d62c8220a4a7a53c73aff006" dependencies = [ - "aho-corasick 0.7.20", + "aho-corasick 1.0.2", "bstr", "fnv", "log", @@ -2882,7 +2832,7 @@ checksum = "0d57ce44246becd17153bd035ab4d32cfee096a657fc01f2231c9278378d1e0a" dependencies = [ "glib-sys", "libc", - "system-deps 6.1.0", + "system-deps 6.1.1", ] [[package]] @@ -2891,7 +2841,7 @@ version = "0.3.0" source = "git+https://github.com/prisma/graphql-parser#6a3f58bd879065588e710cb02b5bd30c1ce182c3" dependencies = [ "combine 3.8.1", - "indexmap", + "indexmap 1.9.3", "thiserror", ] @@ -2913,7 +2863,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", @@ -2944,7 +2894,7 @@ dependencies = [ "gobject-sys", "libc", "pango-sys", - "system-deps 6.1.0", + "system-deps 6.1.1", ] [[package]] @@ -2963,9 +2913,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.19" +version = "0.3.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d357c7ae988e7d2182f7d7871d0b963962420b0678b0997ce7de72001aeab782" +checksum = "97ec8491ebaf99c8eaa73058b045fe58073cd6be7f596ac993ced0b0a0c01049" dependencies = [ "bytes", "fnv", @@ -2973,7 +2923,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap", + "indexmap 1.9.3", "slab", "tokio", "tokio-util", @@ -2986,7 +2936,7 @@ version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "02b4af3693f1b705df946e9fe5631932443781d0aabb423b62fcd4d73f6d2fd0" dependencies = [ - "crunchy 0.2.2", + "crunchy", ] [[package]] @@ -3007,6 +2957,12 @@ dependencies = [ "ahash", ] +[[package]] +name = "hashbrown" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" + [[package]] name = "hashlink" version = "0.7.0" @@ -3023,7 +2979,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3e372db8e5c0d213e0cd0b9be18be2aca3d44cf2fe30a9d46a65581cd454584" dependencies = [ "base64 0.13.1", - "bitflags", + "bitflags 1.3.2", "bytes", "headers-core", "http", @@ -3058,27 +3014,9 @@ checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "hermit-abi" -version = "0.1.19" +version = "0.3.2" 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" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" +checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" [[package]] name = "hex" @@ -3163,7 +3101,7 @@ checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" dependencies = [ "bytes", "fnv", - "itoa 1.0.6", + "itoa 1.0.9", ] [[package]] @@ -3185,9 +3123,9 @@ checksum = "21dec9db110f5f872ed9699c3ecf50cf16f423502706ba5c72462e28d3157573" [[package]] name = "http-range-header" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bfe8eed0a9285ef776bb792479ea3834e8b94e13d615c2f66d03dd50a435a29" +checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f" [[package]] name = "httparse" @@ -3244,9 +3182,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.26" +version = "0.14.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab302d72a6f11a3b910431ff93aae7e773078c769f0a3ef15fb9ec692ed147d4" +checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" dependencies = [ "bytes", "futures-channel", @@ -3257,9 +3195,9 @@ dependencies = [ "http-body", "httparse", "httpdate", - "itoa 1.0.6", + "itoa 1.0.9", "pin-project-lite", - "socket2", + "socket2 0.4.9", "tokio", "tower-service", "tracing 0.1.37", @@ -3281,9 +3219,9 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.56" +version = "0.1.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0722cd7114b7de04316e7ea5456a0bbb20e4adb46fd27a3697adb812cff0f37c" +checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -3331,9 +3269,9 @@ dependencies = [ [[package]] name = "idna" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -3369,11 +3307,10 @@ dependencies = [ [[package]] name = "ignore" -version = "0.4.18" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "713f1b139373f96a2e0ce3ac931cd01ee973c3c5dd7c40c0c2efe96ad2b6751d" +checksum = "dbe7873dab538a9a44ad79ede1faf5f30d49f9a5c883ddbab48bce81b64b7492" dependencies = [ - "crossbeam-utils", "globset", "lazy_static", "log", @@ -3435,6 +3372,16 @@ dependencies = [ "serde", ] +[[package]] +name = "indexmap" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +dependencies = [ + "equivalent", + "hashbrown 0.14.0", +] + [[package]] name = "indoc" version = "1.0.9" @@ -3443,9 +3390,9 @@ checksum = "bfa799dd5ed20a7e349f3b4639aa80d74549c81716d9ec4f994c9b5815598306" [[package]] name = "indoc" -version = "2.0.1" +version = "2.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f2cb48b81b1dc9f39676bf99f5499babfec7cd8fe14307f7b3d747208fb5690" +checksum = "2c785eefb63ebd0e33416dfcb8d6da0bf27ce752843a45632a67bf10d4d4b5c4" [[package]] name = "infer" @@ -3462,7 +3409,7 @@ version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8069d3ec154eb856955c1c0fbffefbf5f3c40a104ec912d4797314c1801abff" dependencies = [ - "bitflags", + "bitflags 1.3.2", "inotify-sys", "libc", ] @@ -3540,38 +3487,37 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ - "hermit-abi 0.3.1", + "hermit-abi", "libc", "windows-sys 0.48.0", ] [[package]] name = "ipconfig" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd302af1b90f2463a98fa5ad469fc212c8e3175a41c3068601bfa2727591c5be" +checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f" dependencies = [ - "socket2", + "socket2 0.5.3", "widestring", - "winapi", - "winreg 0.10.1", + "windows-sys 0.48.0", + "winreg 0.50.0", ] [[package]] name = "ipnet" -version = "2.7.2" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12b6ee2129af8d4fb011108c73d99a1b83a85977f23b82460c0ae2e25bb4b57f" +checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" [[package]] name = "is-terminal" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adcf93614601c8129ddf72e2d5633df827ba6551541c6d8c59520a371475be1f" +checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ - "hermit-abi 0.3.1", - "io-lifetimes", - "rustix", + "hermit-abi", + "rustix 0.38.6", "windows-sys 0.48.0", ] @@ -3592,9 +3538,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" @@ -3602,7 +3548,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", ] @@ -3673,9 +3619,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.63" +version = "0.3.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f37a4a5928311ac501dee68b3c7613a1037d0edb30c8e5427bd832d55d1b790" +checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" dependencies = [ "wasm-bindgen", ] @@ -3743,7 +3689,7 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8367585489f01bc55dd27404dcf56b95e6da061a256a666ab23be9ba96a2e587" dependencies = [ - "bitflags", + "bitflags 1.3.2", "libc", ] @@ -3807,11 +3753,13 @@ dependencies = [ [[package]] name = "libheif-sys" -version = "1.14.2" +version = "1.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6af8b7a4151ae10f6d2e8684f7172c43f09c0258c84190fd9704422588ceec63" +checksum = "e8aa6b598db572d6d3e0a61b4009f03caf827010cd53248f6aeffb1180e9d53f" dependencies = [ "libc", + "pkg-config", + "vcpkg", ] [[package]] @@ -3830,12 +3778,6 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fc7aa29613bd6a620df431842069224d8bc9011086b1db4c0e0cd47fa03ec9a" -[[package]] -name = "libm" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4" - [[package]] name = "libp2p" version = "0.51.3" @@ -3845,7 +3787,7 @@ dependencies = [ "bytes", "futures", "futures-timer", - "getrandom 0.2.9", + "getrandom 0.2.10", "instant", "libp2p-allow-block-list", "libp2p-connection-limits", @@ -3910,7 +3852,7 @@ dependencies = [ "rand 0.8.5", "rw-stream-sink", "serde", - "smallvec 1.10.0", + "smallvec 1.11.0", "thiserror", "unsigned-varint", "void", @@ -3926,7 +3868,7 @@ dependencies = [ "libp2p-core", "log", "parking_lot 0.12.1", - "smallvec 1.10.0", + "smallvec 1.11.0", "trust-dns-resolver", ] @@ -3955,8 +3897,8 @@ dependencies = [ "rand 0.8.5", "regex", "serde", - "sha2 0.10.6", - "smallvec 1.10.0", + "sha2 0.10.7", + "smallvec 1.11.0", "thiserror", "unsigned-varint", "void", @@ -3977,7 +3919,7 @@ dependencies = [ "quick-protobuf", "rand 0.8.5", "serde", - "sha2 0.10.6", + "sha2 0.10.7", "thiserror", "zeroize", ] @@ -4003,8 +3945,8 @@ dependencies = [ "quick-protobuf", "rand 0.8.5", "serde", - "sha2 0.10.6", - "smallvec 1.10.0", + "sha2 0.10.7", + "smallvec 1.11.0", "thiserror", "uint", "unsigned-varint", @@ -4025,8 +3967,8 @@ dependencies = [ "libp2p-swarm", "log", "rand 0.8.5", - "smallvec 1.10.0", - "socket2", + "smallvec 1.11.0", + "socket2 0.4.9", "tokio", "trust-dns-proto", "void", @@ -4047,7 +3989,7 @@ dependencies = [ "once_cell", "quick-protobuf", "rand 0.8.5", - "sha2 0.10.6", + "sha2 0.10.7", "snow", "static_assertions", "thiserror", @@ -4092,7 +4034,7 @@ dependencies = [ "libp2p-identity", "log", "rand 0.8.5", - "smallvec 1.10.0", + "smallvec 1.11.0", "tokio", "void", ] @@ -4109,7 +4051,7 @@ dependencies = [ "libc", "libp2p-core", "log", - "socket2", + "socket2 0.4.9", "tokio", ] @@ -4176,11 +4118,12 @@ dependencies = [ [[package]] name = "libwebp-sys" -version = "0.4.2" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439fd1885aa28937e7edcd68d2e793cb4a22f8733460d2519fbafd2b215672bf" +checksum = "a5df1e76f0acef0058aa2164ccf74e610e716e7f9eeb3ee2283de7d43659d823" dependencies = [ "cc", + "glob", ] [[package]] @@ -4204,6 +4147,12 @@ version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" +[[package]] +name = "linux-raw-sys" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57bcfdad1b858c2db7c38303a6d2ad4dfaf5eb53dfeb0910128b2c26d6158503" + [[package]] name = "litrs" version = "0.2.3" @@ -4212,9 +4161,9 @@ checksum = "f9275e0933cf8bb20f008924c0cb07a0692fe54d8064996520bf998de9eb79aa" [[package]] name = "lock_api" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" +checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" dependencies = [ "autocfg", "scopeguard", @@ -4222,9 +4171,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.18" +version = "0.4.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "518ef76f2f87365916b142844c16d8fefd85039bc5699050210a7778ee1cd1de" +checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" [[package]] name = "loom" @@ -4265,7 +4214,7 @@ version = "0.91.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2368312c59425dd133cb9a327afee65be0a633a8ce471d248e2202a48f8f68ae" dependencies = [ - "bitflags", + "bitflags 1.3.2", "serde", "serde_json", "serde_repr", @@ -4338,7 +4287,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]] @@ -4349,9 +4298,9 @@ checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" [[package]] name = "matchit" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b87248edafb776e59e6ee64a79086f65890d3510f2c656c000bf2a7e8a0aea40" +checksum = "67827e6ea8ee8a7c4a72227ef4fc08957040acffdb5f122733b24fa12daff41b" [[package]] name = "maybe-uninit" @@ -4377,7 +4326,7 @@ dependencies = [ "if-addrs", "log", "polling", - "socket2", + "socket2 0.4.9", ] [[package]] @@ -4397,9 +4346,9 @@ dependencies = [ [[package]] name = "memoffset" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" dependencies = [ "autocfg", ] @@ -4431,7 +4380,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "953cbbb6f9ba4b9304f4df79b98cdc9d14071ed93065a9fca11c00c5d9181b66" dependencies = [ "hyper", - "indexmap", + "indexmap 1.9.3", "ipnet", "metrics 0.19.0", "metrics-util 0.13.0", @@ -4464,7 +4413,7 @@ dependencies = [ "crossbeam-epoch", "crossbeam-utils", "hashbrown 0.11.2", - "indexmap", + "indexmap 1.9.3", "metrics 0.18.1", "num_cpus", "ordered-float", @@ -4509,15 +4458,15 @@ dependencies = [ [[package]] name = "mini-moka" -version = "0.10.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cafc5ec7807288595f9c20c86e6ce6d262b722f61e0547fe7e6e6e6451b58d5" +checksum = "452ebc1428a585e31e637b928b76355ef2fd72d765b2530d72fe475e514cd1eb" dependencies = [ "crossbeam-channel", "crossbeam-utils", "dashmap", "skeptic", - "smallvec 1.10.0", + "smallvec 1.11.0", "tagptr", "triomphe", ] @@ -4534,15 +4483,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "933dca44d65cdd53b355d0b73d380a2ff5da71f87f036053188bf1eab6a19881" -[[package]] -name = "miniz_oxide" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" -dependencies = [ - "adler", -] - [[package]] name = "miniz_oxide" version = "0.7.1" @@ -4555,9 +4495,9 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.7" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eebffdb73fe72e917997fad08bdbf31ac50b0fa91cec93e69a0662e4264d454c" +checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" dependencies = [ "libc", "log", @@ -4625,7 +4565,7 @@ dependencies = [ "multihash-derive", "serde", "serde-big-array 0.3.3", - "sha2 0.10.6", + "sha2 0.10.7", "unsigned-varint", ] @@ -4653,7 +4593,7 @@ dependencies = [ "futures", "log", "pin-project", - "smallvec 1.10.0", + "smallvec 1.11.0", "unsigned-varint", ] @@ -4672,7 +4612,7 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a51313c5820b0b02bd422f4b44776fbf47961755c74ce64afc73bfad10226c3" dependencies = [ - "getrandom 0.2.9", + "getrandom 0.2.10", ] [[package]] @@ -4700,7 +4640,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b1bb540dc6ef51cfe1916ec038ce7a620daf3a111e2502d745197cd53d6bca15" dependencies = [ "libc", - "socket2", + "socket2 0.4.9", ] [[package]] @@ -4709,7 +4649,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", @@ -4750,7 +4690,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9ea4302b9759a7a88242299225ea3688e63c85ea136371bb6cf94fd674efaab" dependencies = [ "anyhow", - "bitflags", + "bitflags 1.3.2", "byteorder", "libc", "netlink-packet-core", @@ -4809,7 +4749,7 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77a5d83df9f36fe23f0c3648c6bbb8b0298bb5f1939c8f2704431371f4b84d43" dependencies = [ - "smallvec 1.10.0", + "smallvec 1.11.0", ] [[package]] @@ -4818,7 +4758,7 @@ version = "0.22.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4916f159ed8e5de0082076562152a76b7a1f64a01fd9d1e0fea002c37624faf" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cc", "cfg-if", "libc", @@ -4831,7 +4771,7 @@ version = "0.24.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa52e972a9a719cecb6864fb88568781eb706bac2cd1d4f04a648542dbf78069" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cfg-if", "libc", "memoffset 0.6.5", @@ -4843,7 +4783,7 @@ version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfdda3d196821d6af13126e40375cdf7da646a96114af134d5f417a9a1dc8e1a" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cfg-if", "libc", "static_assertions", @@ -4880,7 +4820,7 @@ version = "5.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "729f63e1ca555a43fe3efa4f3efdf4801c479da85b432242a7b726f353c88486" dependencies = [ - "bitflags", + "bitflags 1.3.2", "filetime", "fsevent-sys", "inotify", @@ -4933,9 +4873,9 @@ dependencies = [ [[package]] name = "num" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43db66d1170d347f9a065114077f7dccb00c1b9478c89384490a3425279a4606" +checksum = "b05180d69e3da0e530ba2a1dae5110317e49e3b7f3d41be227dc5f92e49ee7af" dependencies = [ "num-bigint", "num-complex", @@ -5000,21 +4940,20 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" dependencies = [ "autocfg", - "libm 0.2.7", ] [[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", ] @@ -5039,15 +4978,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" @@ -5089,9 +5019,9 @@ dependencies = [ [[package]] name = "object" -version = "0.30.3" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea86265d3d3dcb6a27fc51bd29a4bf387fae9d2986b823079d4986af253eb439" +checksum = "8bda667d9f2b5051b8833f59f3bf748b28ef54f850f4fcb389a252aa383866d1" dependencies = [ "memchr", ] @@ -5116,9 +5046,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.17.2" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9670a07f94779e00908f3e686eab508878ebb390ba6e604d3a284c00e8d0487b" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[package]] name = "opaque-debug" @@ -5151,11 +5081,11 @@ dependencies = [ [[package]] name = "openssl" -version = "0.10.53" +version = "0.10.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12df40a956736488b7b44fe79fe12d4f245bb5b3f5a1f6095e499760015be392" +checksum = "345df152bc43501c5eb9e4654ff05f794effb78d4efe3d53abc158baddc0703d" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cfg-if", "foreign-types", "libc", @@ -5172,7 +5102,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.28", ] [[package]] @@ -5183,18 +5113,18 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-src" -version = "111.25.3+1.1.1t" +version = "111.27.0+1.1.1v" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "924757a6a226bf60da5f7dd0311a34d2b52283dd82ddeb103208ddc66362f80c" +checksum = "06e8f197c82d7511c5b014030c9b1efeda40d7d5f99d23b4ceed3524a5e63f02" dependencies = [ "cc", ] [[package]] name = "openssl-sys" -version = "0.9.88" +version = "0.9.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2ce0f250f34a308dcfdbb351f511359857d4ed2134ba715a4eadd46e1ffd617" +checksum = "374533b0e45f3a7ced10fcaeccca020e66656bc03dac384f852e4e5a7a8104a6" dependencies = [ "cc", "libc", @@ -5284,7 +5214,7 @@ checksum = "51f44edd08f51e2ade572f141051021c5af22677e42b7dd28a88155151c33594" dependencies = [ "ecdsa", "elliptic-curve", - "sha2 0.10.6", + "sha2 0.10.7", ] [[package]] @@ -5295,7 +5225,7 @@ checksum = "dfc8c5bf642dde52bb9e87c0ecd8ca5a76faac2eeed98dedb7c717997e1080aa" dependencies = [ "ecdsa", "elliptic-curve", - "sha2 0.10.6", + "sha2 0.10.7", ] [[package]] @@ -5305,7 +5235,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1914cd452d8fccd6f9db48147b29fd4ae05bea9dc5d9ad578509f72415de282" dependencies = [ "cfg-if", - "libm 0.1.4", + "libm", ] [[package]] @@ -5314,7 +5244,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", @@ -5330,7 +5260,7 @@ dependencies = [ "glib-sys", "gobject-sys", "libc", - "system-deps 6.1.0", + "system-deps 6.1.1", ] [[package]] @@ -5367,7 +5297,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ "lock_api", - "parking_lot_core 0.9.7", + "parking_lot_core 0.9.8", ] [[package]] @@ -5392,21 +5322,21 @@ dependencies = [ "instant", "libc", "redox_syscall 0.2.16", - "smallvec 1.10.0", + "smallvec 1.11.0", "winapi", ] [[package]] name = "parking_lot_core" -version = "0.9.7" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" +checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.2.16", - "smallvec 1.10.0", - "windows-sys 0.45.0", + "redox_syscall 0.3.5", + "smallvec 1.11.0", + "windows-targets 0.48.1", ] [[package]] @@ -5417,7 +5347,7 @@ dependencies = [ "diagnostics", "either", "enumflags2 0.7.7", - "indexmap", + "indexmap 1.9.3", "schema-ast", ] @@ -5434,9 +5364,9 @@ dependencies = [ [[package]] name = "paste" -version = "1.0.12" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f746c4065a8fa3fe23974dd82f15431cc8d40779821001404d10d2e79ca7d79" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" [[package]] name = "pathdiff" @@ -5470,15 +5400,15 @@ dependencies = [ [[package]] name = "percent-encoding" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" +checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] name = "pest" -version = "2.6.0" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e68e84bfb01f0507134eac1e9b410a12ba379d064eab48c50ba4ce329a527b70" +checksum = "1acb4a4365a13f749a93f1a094a7805e5cfa0955373a9de860d962eaa3a5fe5a" dependencies = [ "thiserror", "ucd-trie", @@ -5486,9 +5416,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.6.0" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b79d4c71c865a25a4322296122e3924d30bc8ee0834c8bfc8b95f7f054afbfb" +checksum = "666d00490d4ac815001da55838c500eafb0320019bbaa44444137c48b443a853" dependencies = [ "pest", "pest_generator", @@ -5496,26 +5426,26 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.6.0" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c435bf1076437b851ebc8edc3a18442796b30f1728ffea6262d59bbe28b077e" +checksum = "68ca01446f50dbda87c1786af8770d535423fa8a53aec03b8f4e3d7eb10e0929" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.28", ] [[package]] name = "pest_meta" -version = "2.6.0" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "745a452f8eb71e39ffd8ee32b3c5f51d03845f99786fa9b68db6ff509c505411" +checksum = "56af0a30af74d0445c0bf6d9d051c979b516a1a5af790d251daee76005420a48" dependencies = [ "once_cell", "pest", - "sha2 0.10.6", + "sha2 0.10.7", ] [[package]] @@ -5628,29 +5558,29 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.1.0" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c95a7476719eab1e366eaf73d0260af3021184f18177925b07f54b30089ceead" +checksum = "030ad2bc4db10a8944cb0d837f158bdfec4d4a4873ab701a95046770d11f8842" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.0" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39407670928234ebc5e6e580247dd567ad73a3578460c5990f9503df207e8f07" +checksum = "ec2e072ecce94ec471b13398d5402c188e76ac03cf74dd1a975161b23a3f6d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.28", ] [[package]] name = "pin-project-lite" -version = "0.2.9" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +checksum = "4c40d25201921e5ff0c862a505c6557ea88568a4e3ace775ab55e93f2f4f9d57" [[package]] name = "pin-utils" @@ -5682,29 +5612,29 @@ checksum = "e3d7ddaed09e0eb771a79ab0fd64609ba0afb0a8366421957936ad14cbd13630" [[package]] name = "plist" -version = "1.4.3" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bd9647b268a3d3e14ff09c23201133a62589c658db02bb7388c7246aafe0590" +checksum = "bdc0001cfea3db57a2e24bc0d818e9e20e554b5f97fabb9bc231dc240269ae06" dependencies = [ "base64 0.21.2", - "indexmap", + "indexmap 1.9.3", "line-wrap", "quick-xml", "serde", - "time 0.3.15", + "time 0.3.25", ] [[package]] name = "png" -version = "0.17.8" +version = "0.17.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aaeebc51f9e7d2c150d3f3bfeb667f2aa985db5ef1e3d212847bdedb488beeaa" +checksum = "59871cc5b6cce7eaccca5a802b4173377a1c2ba90654246789a8fa2334426d11" dependencies = [ - "bitflags", + "bitflags 1.3.2", "crc32fast", "fdeflate", "flate2", - "miniz_oxide 0.7.1", + "miniz_oxide", ] [[package]] @@ -5714,7 +5644,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" dependencies = [ "autocfg", - "bitflags", + "bitflags 1.3.2", "cfg-if", "concurrent-queue", "libc", @@ -5759,9 +5689,9 @@ dependencies = [ [[package]] name = "polyval" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef234e08c11dfcb2e56f79fd70f6f2eb7f025c0ce2333e82f4f0518ecad30c6" +checksum = "d52cff9d1d4dee5fe6d03729099f4a310a41179e0a10dbf542039873f2e826fb" dependencies = [ "cfg-if", "cpufeatures", @@ -5792,7 +5722,7 @@ dependencies = [ [[package]] name = "prisma-client-rust" version = "0.6.8" -source = "git+https://github.com/Brendonovich/prisma-client-rust?rev=047c1102284a61ee400788baa7529d54ae745790#047c1102284a61ee400788baa7529d54ae745790" +source = "git+https://github.com/Brendonovich/prisma-client-rust?branch=spacedrive#f00f2689f26dcc818fb0d05b0c4d8826973a2989" dependencies = [ "base64 0.13.1", "bigdecimal", @@ -5801,7 +5731,7 @@ dependencies = [ "dotenv", "futures", "include_dir", - "indexmap", + "indexmap 1.9.3", "paste", "prisma-client-rust-macros", "prisma-models", @@ -5825,7 +5755,7 @@ dependencies = [ [[package]] name = "prisma-client-rust-cli" version = "0.6.8" -source = "git+https://github.com/Brendonovich/prisma-client-rust?rev=047c1102284a61ee400788baa7529d54ae745790#047c1102284a61ee400788baa7529d54ae745790" +source = "git+https://github.com/Brendonovich/prisma-client-rust?branch=spacedrive#f00f2689f26dcc818fb0d05b0c4d8826973a2989" dependencies = [ "directories", "flate2", @@ -5845,7 +5775,7 @@ dependencies = [ [[package]] name = "prisma-client-rust-generator" version = "0.6.8" -source = "git+https://github.com/Brendonovich/prisma-client-rust?rev=047c1102284a61ee400788baa7529d54ae745790#047c1102284a61ee400788baa7529d54ae745790" +source = "git+https://github.com/Brendonovich/prisma-client-rust?branch=spacedrive#f00f2689f26dcc818fb0d05b0c4d8826973a2989" dependencies = [ "directories", "flate2", @@ -5865,7 +5795,7 @@ dependencies = [ [[package]] name = "prisma-client-rust-macros" version = "0.6.8" -source = "git+https://github.com/Brendonovich/prisma-client-rust?rev=047c1102284a61ee400788baa7529d54ae745790#047c1102284a61ee400788baa7529d54ae745790" +source = "git+https://github.com/Brendonovich/prisma-client-rust?branch=spacedrive#f00f2689f26dcc818fb0d05b0c4d8826973a2989" dependencies = [ "convert_case 0.6.0", "proc-macro2", @@ -5877,7 +5807,7 @@ dependencies = [ [[package]] name = "prisma-client-rust-sdk" version = "0.6.8" -source = "git+https://github.com/Brendonovich/prisma-client-rust?rev=047c1102284a61ee400788baa7529d54ae745790#047c1102284a61ee400788baa7529d54ae745790" +source = "git+https://github.com/Brendonovich/prisma-client-rust?branch=spacedrive#f00f2689f26dcc818fb0d05b0c4d8826973a2989" dependencies = [ "convert_case 0.5.0", "dmmf", @@ -5989,8 +5919,8 @@ version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d6fa99d535dd930d1249e6c79cb3c2915f9172a540fe2b02a4c8f9ca954721e" dependencies = [ - "dtoa 1.0.6", - "itoa 1.0.6", + "dtoa", + "itoa 1.0.9", "parking_lot 0.12.1", "prometheus-client-derive-encode", ] @@ -6006,26 +5936,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "proptest" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e35c06b98bf36aba164cc17cb25f7e232f5c4aeea73baa14b8a9f0d92dbfa65" -dependencies = [ - "bit-set", - "bitflags", - "byteorder", - "lazy_static", - "num-traits", - "rand 0.8.5", - "rand_chacha 0.3.1", - "rand_xorshift", - "regex-syntax 0.6.29", - "rusty-fork", - "tempfile", - "unarray", -] - [[package]] name = "psl" version = "0.1.0" @@ -6044,7 +5954,7 @@ dependencies = [ "chrono", "diagnostics", "enumflags2 0.7.7", - "indoc 2.0.1", + "indoc 2.0.3", "itertools", "lsp-types", "once_cell", @@ -6063,7 +5973,7 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77a1a2f1f0a7ecff9c31abbe177637be0e97a0aef46cf8738ece09327985d998" dependencies = [ - "bitflags", + "bitflags 1.3.2", "memchr", "unicase", ] @@ -6116,7 +6026,7 @@ dependencies = [ "mach", "once_cell", "raw-cpuid", - "wasi 0.10.0+wasi-snapshot-preview1", + "wasi 0.10.2+wasi-snapshot-preview1", "web-sys", "winapi", ] @@ -6130,7 +6040,7 @@ dependencies = [ "async-trait", "chrono", "futures", - "indexmap", + "indexmap 1.9.3", "itertools", "prisma-models", "prisma-value", @@ -6154,7 +6064,7 @@ dependencies = [ "cuid", "enumflags2 0.7.7", "futures", - "indexmap", + "indexmap 1.9.3", "itertools", "lru", "once_cell", @@ -6224,18 +6134,18 @@ dependencies = [ [[package]] name = "quick-xml" -version = "0.28.2" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ce5e73202a820a31f8a0ee32ada5e21029c81fd9e3ebf668a40832e4219d9d1" +checksum = "81b9228215d82c7b61490fec1de287136b5de6f5700f6e58ea9ad61a7964ca51" dependencies = [ "memchr", ] [[package]] name = "quinn-proto" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c10f662eee9c94ddd7135043e544f3c82fa839a1e7b865911331961b53186c" +checksum = "f31999cfc7927c4e212e60fd50934ab40e8e8bfd2d493d6095d2d306bc0764d9" dependencies = [ "bytes", "rand 0.8.5", @@ -6251,9 +6161,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.28" +version = "1.0.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488" +checksum = "50f3b39ccfb720540debaa0164757101c08ecb8d326b15358ce76a62c7e85965" dependencies = [ "proc-macro2", ] @@ -6362,7 +6272,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.10", ] [[package]] @@ -6383,32 +6293,20 @@ dependencies = [ "rand_core 0.5.1", ] -[[package]] -name = "rand_xorshift" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" -dependencies = [ - "rand_core 0.6.4", -] - [[package]] name = "raw-cpuid" version = "10.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c297679cb867470fa8c9f67dbba74a78d78e3e98d7cf2b08d6d71540f797332" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[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" @@ -6440,7 +6338,7 @@ checksum = "6413f3de1edee53342e6138e75b56d32e7bc6e332b3bd62d497b1929d4cfbcdd" dependencies = [ "pem", "ring", - "time 0.3.15", + "time 0.3.25", "x509-parser 0.13.2", "yasna", ] @@ -6453,7 +6351,7 @@ checksum = "ffbe84efe2f38dea12e9bfc1f65377fdf03e53a18cb3b995faedf7934c7e785b" dependencies = [ "pem", "ring", - "time 0.3.15", + "time 0.3.25", "yasna", ] @@ -6472,7 +6370,7 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] @@ -6481,7 +6379,7 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] @@ -6490,20 +6388,21 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ - "getrandom 0.2.9", + "getrandom 0.2.10", "redox_syscall 0.2.16", "thiserror", ] [[package]] name = "regex" -version = "1.8.4" +version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0ab3ca65655bb1e41f2a8c8cd662eb4fb035e67c3f78da1d61dffe89d07300f" +checksum = "b2eae68fc220f7cf2532e4494aded17545fce192d59cd996e0fe7887f4ceb575" dependencies = [ "aho-corasick 1.0.2", "memchr", - "regex-syntax 0.7.2", + "regex-automata 0.3.4", + "regex-syntax 0.7.4", ] [[package]] @@ -6515,6 +6414,17 @@ dependencies = [ "regex-syntax 0.6.29", ] +[[package]] +name = "regex-automata" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7b6d6190b7594385f61bd3911cd1be99dfddcfc365a4160cc2ab5bff4aed294" +dependencies = [ + "aho-corasick 1.0.2", + "memchr", + "regex-syntax 0.7.4", +] + [[package]] name = "regex-syntax" version = "0.6.29" @@ -6523,9 +6433,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.7.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "436b050e76ed2903236f032a59761c1eb99e1b0aead2c257922771dab1fc8c78" +checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2" [[package]] name = "remove_dir_all" @@ -6546,7 +6456,7 @@ dependencies = [ "dmmf", "futures", "graphql-parser", - "indexmap", + "indexmap 1.9.3", "itertools", "prisma-models", "psl", @@ -6589,10 +6499,12 @@ dependencies = [ "serde_urlencoded", "tokio", "tokio-native-tls", + "tokio-util", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", + "wasm-streams", "web-sys", "winreg 0.10.1", ] @@ -6659,9 +6571,9 @@ dependencies = [ [[package]] name = "rmp" -version = "0.8.11" +version = "0.8.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44519172358fd6d58656c86ab8e7fbc9e1490c3e8f14d35ed78ca0dd07403c9f" +checksum = "7f9860a6cc38ed1da53456442089b4dfa35e7cedaa326df63017af88385e6b20" dependencies = [ "byteorder", "num-traits", @@ -6670,9 +6582,9 @@ dependencies = [ [[package]] name = "rmp-serde" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5b13be192e0220b8afb7222aa5813cb62cc269ebb5cac346ca6487681d2913e" +checksum = "bffea85eea980d8a74453e5d02a8d93028f3c34725de143085a844ebe953258a" dependencies = [ "byteorder", "rmp", @@ -6681,9 +6593,9 @@ dependencies = [ [[package]] name = "rmpv" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de8813b3a2f95c5138fe5925bfb8784175d88d6bff059ba8ce090aa891319754" +checksum = "2e0e0214a4a2b444ecce41a4025792fc31f77c7bb89c46d253953ea8c65701ec" dependencies = [ "num-traits", "rmp", @@ -6755,14 +6667,14 @@ version = "0.25.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c4b1eaf239b47034fb450ee9cdedd7d0226571689d8823030c4b6c2cb407152" dependencies = [ - "bitflags", + "bitflags 1.3.2", "chrono", "fallible-iterator", "fallible-streaming-iterator", "hashlink", "libsqlite3-sys", "memchr", - "smallvec 1.10.0", + "smallvec 1.11.0", ] [[package]] @@ -6797,15 +6709,28 @@ dependencies = [ [[package]] name = "rustix" -version = "0.37.19" +version = "0.37.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acf8729d8542766f1b2cf77eb034d52f40d375bb8b615d0b147089946e16613d" +checksum = "4d69718bf81c6127a49dc64e44a742e8bb9213c0ff8869a22c308f84c1d4ab06" dependencies = [ - "bitflags", + "bitflags 1.3.2", "errno", "io-lifetimes", "libc", - "linux-raw-sys", + "linux-raw-sys 0.3.8", + "windows-sys 0.48.0", +] + +[[package]] +name = "rustix" +version = "0.38.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ee020b1716f0a80e2ace9b03441a749e402e86712f15f16fe8a8f75afac732f" +dependencies = [ + "bitflags 2.3.3", + "errno", + "libc", + "linux-raw-sys 0.4.5", "windows-sys 0.48.0", ] @@ -6836,21 +6761,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.12" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" - -[[package]] -name = "rusty-fork" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" -dependencies = [ - "fnv", - "quick-error", - "tempfile", - "wait-timeout", -] +checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" [[package]] name = "rw-stream-sink" @@ -6865,9 +6778,9 @@ dependencies = [ [[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" @@ -6886,11 +6799,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 0.48.0", ] [[package]] @@ -6962,9 +6875,9 @@ checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" [[package]] name = "scopeguard" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "sct" @@ -6986,6 +6899,18 @@ dependencies = [ "untrusted", ] +[[package]] +name = "sd-cli" +version = "0.1.0" +dependencies = [ + "anyhow", + "clap", + "hex", + "indoc 1.0.9", + "sd-crypto", + "tokio", +] + [[package]] name = "sd-core" version = "0.1.0" @@ -7034,7 +6959,7 @@ dependencies = [ "serde", "serde-hashkey", "serde_json", - "serde_with", + "serde_with 2.3.3", "slotmap", "specta", "static_assertions", @@ -7066,6 +6991,7 @@ dependencies = [ "sd-utils", "serde", "serde_json", + "slotmap", "tokio", "uhlc", "uuid", @@ -7098,6 +7024,35 @@ dependencies = [ "zeroize", ] +[[package]] +name = "sd-desktop" +version = "0.1.0" +dependencies = [ + "axum", + "futures", + "http", + "httpz 0.0.3", + "opener", + "percent-encoding", + "prisma-client-rust", + "rand 0.8.5", + "rspc", + "sd-core", + "sd-desktop-linux", + "sd-desktop-macos", + "sd-desktop-windows", + "sd-prisma", + "serde", + "specta", + "tauri", + "tauri-build", + "tauri-specta", + "tokio", + "tracing 0.1.37", + "uuid", + "window-shadows", +] + [[package]] name = "sd-desktop-linux" version = "0.1.0" @@ -7235,6 +7190,23 @@ dependencies = [ "serde_json", ] +[[package]] +name = "sd-server" +version = "0.1.0" +dependencies = [ + "axum", + "ctrlc", + "http", + "httpz 0.0.3", + "include_dir", + "mime_guess", + "rspc", + "sd-core", + "tokio", + "tower-http", + "tracing 0.1.37", +] + [[package]] name = "sd-sync" version = "0.1.0" @@ -7317,11 +7289,11 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.9.1" +version = "2.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fc758eb7bffce5b308734e9b0c1468893cae9ff70ebf13e7090be8dcbcc83a8" +checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" dependencies = [ - "bitflags", + "bitflags 1.3.2", "core-foundation", "core-foundation-sys", "libc", @@ -7330,9 +7302,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.9.0" +version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f51d0c0d83bec45f16480d0ce0058397a69e48fcdc52d1dc8855fb68acbd31a7" +checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" dependencies = [ "core-foundation-sys", "libc", @@ -7344,7 +7316,7 @@ 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", @@ -7354,24 +7326,24 @@ dependencies = [ "phf_codegen", "precomputed-hash", "servo_arc", - "smallvec 1.10.0", + "smallvec 1.11.0", "thin-slice", ] [[package]] name = "semver" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" +checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" dependencies = [ "serde", ] [[package]] name = "serde" -version = "1.0.163" +version = "1.0.180" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2113ab51b87a539ae008b5c6c02dc020ffa39afd2d83cffcb3f4eb2722cebec2" +checksum = "0ea67f183f058fe88a4e3ec6e2788e003840893b91bac4559cabedd00863b3ed" dependencies = [ "serde_derive", ] @@ -7415,52 +7387,53 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.163" +version = "1.0.180" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c805777e3930c8883389c602315a24224bcc738b63905ef87cd1420353ea93e" +checksum = "24e744d7782b686ab3b73267ef05697159cc0e5abbed3f47f9933165e5219036" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.28", ] [[package]] name = "serde_json" -version = "1.0.96" +version = "1.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" +checksum = "076066c5f1078eac5b722a31827a8832fe108bed65dfa75e233c89f8206e976c" dependencies = [ - "indexmap", - "itoa 1.0.6", + "indexmap 2.0.0", + "itoa 1.0.9", "ryu", "serde", ] [[package]] name = "serde_path_to_error" -version = "0.1.11" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7f05c1d5476066defcdfacce1f52fc3cae3af1d3089727100c02ae92e5abbe0" +checksum = "4beec8bce849d58d06238cb50db2e1c417cfeafa4c63f692b15c82b7c80f8335" dependencies = [ + "itoa 1.0.9", "serde", ] [[package]] name = "serde_repr" -version = "0.1.12" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcec881020c684085e55a25f7fd888954d56609ef363479dc5a1305eb0d40cab" +checksum = "8725e1dfadb3a50f7e5ce0b1a540466f6ed3fe7a0fca2ac2b8b831d31316bd00" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.28", ] [[package]] name = "serde_spanned" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93107647184f6027e3b7dcb2e11034cf95ffa1e3a682c67951963ac69c1c007d" +checksum = "96426c9936fd7a0124915f9185ea1d20aa9445cc9821142f0a73bc9207a2e186" dependencies = [ "serde", ] @@ -7472,7 +7445,7 @@ 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", ] @@ -7486,11 +7459,27 @@ dependencies = [ "base64 0.13.1", "chrono", "hex", - "indexmap", + "indexmap 1.9.3", "serde", "serde_json", - "serde_with_macros", - "time 0.3.15", + "serde_with_macros 2.3.3", + "time 0.3.25", +] + +[[package]] +name = "serde_with" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21e47d95bc83ed33b2ecf84f4187ad1ab9685d18ff28db000c99deac8ce180e3" +dependencies = [ + "base64 0.21.2", + "chrono", + "hex", + "indexmap 1.9.3", + "serde", + "serde_json", + "serde_with_macros 3.1.0", + "time 0.3.25", ] [[package]] @@ -7499,10 +7488,22 @@ version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "881b6f881b17d13214e5d494c939ebab463d01264ce1811e9d4ac3a882e7695f" dependencies = [ - "darling 0.20.1", + "darling 0.20.3", "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.28", +] + +[[package]] +name = "serde_with_macros" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea3cee93715c2e266b9338b7544da68a9f24e227722ba482bd1c024367c77c65" +dependencies = [ + "darling 0.20.3", + "proc-macro2", + "quote", + "syn 2.0.28", ] [[package]] @@ -7527,23 +7528,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "server" -version = "0.1.0" -dependencies = [ - "axum", - "ctrlc", - "http", - "httpz 0.0.3", - "include_dir", - "mime_guess", - "rspc", - "sd-core", - "tokio", - "tower-http", - "tracing 0.1.37", -] - [[package]] name = "servo_arc" version = "0.1.1" @@ -7593,9 +7577,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.6" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" +checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" dependencies = [ "cfg-if", "cpufeatures", @@ -7658,9 +7642,9 @@ 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" @@ -7724,9 +7708,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" +checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" [[package]] name = "snow" @@ -7741,7 +7725,7 @@ dependencies = [ "rand_core 0.6.4", "ring", "rustc_version", - "sha2 0.10.6", + "sha2 0.10.7", "subtle", ] @@ -7755,13 +7739,23 @@ dependencies = [ "winapi", ] +[[package]] +name = "socket2" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2538b18701741680e0322a2302176d3253a35388e2e62f172f64f4f16605f877" +dependencies = [ + "libc", + "windows-sys 0.48.0", +] + [[package]] name = "soup2" 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", @@ -7775,7 +7769,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", @@ -7783,35 +7777,6 @@ dependencies = [ "system-deps 5.0.0", ] -[[package]] -name = "spacedrive" -version = "0.1.0" -dependencies = [ - "axum", - "futures", - "http", - "httpz 0.0.3", - "opener", - "percent-encoding", - "prisma-client-rust", - "rand 0.8.5", - "rspc", - "sd-core", - "sd-desktop-linux", - "sd-desktop-macos", - "sd-desktop-windows", - "sd-prisma", - "serde", - "specta", - "tauri", - "tauri-build", - "tauri-specta", - "tokio", - "tracing 0.1.37", - "uuid", - "window-shadows", -] - [[package]] name = "specta" version = "1.0.5" @@ -7820,7 +7785,7 @@ dependencies = [ "bigdecimal", "chrono", "document-features", - "indexmap", + "indexmap 1.9.3", "indoc 1.0.9", "once_cell", "paste", @@ -7918,7 +7883,7 @@ dependencies = [ "datamodel-renderer", "either", "enumflags2 0.7.7", - "indoc 2.0.1", + "indoc 2.0.3", "once_cell", "prisma-value", "psl", @@ -7948,8 +7913,8 @@ dependencies = [ "bigdecimal", "either", "enumflags2 0.7.7", - "indexmap", - "indoc 2.0.1", + "indexmap 1.9.3", + "indoc 2.0.3", "once_cell", "prisma-value", "psl", @@ -8113,9 +8078,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.18" +version = "2.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e" +checksum = "04361975b3f5e348b2189d8dc55bc942f278b2d482a6a0365de5bdd62d351567" dependencies = [ "proc-macro2", "quote", @@ -8140,6 +8105,19 @@ dependencies = [ "unicode-xid", ] +[[package]] +name = "sys-locale" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8a11bd9c338fdba09f7881ab41551932ad42e405f61d01e8406baea71c07aee" +dependencies = [ + "js-sys", + "libc", + "wasm-bindgen", + "web-sys", + "windows-sys 0.45.0", +] + [[package]] name = "sysinfo" version = "0.28.4" @@ -8161,7 +8139,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" dependencies = [ - "bitflags", + "bitflags 1.3.2", "core-foundation", "system-configuration-sys", ] @@ -8191,14 +8169,14 @@ dependencies = [ [[package]] name = "system-deps" -version = "6.1.0" +version = "6.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5fa6fb9ee296c0dc2df41a656ca7948546d061958115ddb0bcaae43ad0d17d2" +checksum = "30c2de8a4d8f4b823d634affc9cd2a74ec98c53a756f317e529a48046cbf71f3" dependencies = [ - "cfg-expr 0.15.1", + "cfg-expr 0.15.4", "heck 0.4.1", "pkg-config", - "toml 0.7.3", + "toml 0.7.6", "version-compare 0.1.1", ] @@ -8214,7 +8192,7 @@ version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a6d198e01085564cea63e976ad1566c1ba2c2e4cc79578e35d9f05521505e31" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cairo-rs", "cc", "cocoa", @@ -8274,9 +8252,9 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tar" -version = "0.4.38" +version = "0.4.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b55807c0344e1e6c04d7c965f5289c39a8d94ae23ed5c0b57aabac549f871c6" +checksum = "ec96d2ffad078296368d46ff1cb309be1c23c513b4ab0e22a45de0185275ac96" dependencies = [ "filetime", "libc", @@ -8285,19 +8263,19 @@ dependencies = [ [[package]] name = "target-lexicon" -version = "0.12.7" +version = "0.12.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd1ba337640d60c3e96bc6f0638a939b9c9a7f2c316a1598c279828b3d1dc8c5" +checksum = "9d0e916b1148c8e263850e1ebcbd046f333e0683c724876bb0da63ea4373dc8a" [[package]] name = "tauri" -version = "1.3.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d42ba3a2e8556722f31336a0750c10dbb6a81396a1c452977f515da83f69f842" +checksum = "7fbe522898e35407a8e60dc3870f7579fea2fc262a6a6072eccdd37ae1e1d91e" dependencies = [ "anyhow", - "attohttpc", "base64 0.21.2", + "bytes", "cocoa", "dirs-next", "embed_plist", @@ -8320,6 +8298,7 @@ dependencies = [ "rand 0.8.5", "raw-window-handle", "regex", + "reqwest", "rfd", "semver", "serde", @@ -8328,6 +8307,7 @@ dependencies = [ "serialize-to-javascript", "shared_child", "state", + "sys-locale", "tar", "tauri-macros", "tauri-runtime", @@ -8335,7 +8315,7 @@ dependencies = [ "tauri-utils", "tempfile", "thiserror", - "time 0.3.15", + "time 0.3.25", "tokio", "url", "uuid", @@ -8347,9 +8327,9 @@ dependencies = [ [[package]] name = "tauri-build" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "929b3bd1248afc07b63e33a6a53c3f82c32d0b0a5e216e4530e94c467e019389" +checksum = "7d2edd6a259b5591c8efdeb9d5702cb53515b82a6affebd55c7fd6d3a27b7d1b" dependencies = [ "anyhow", "cargo_toml", @@ -8360,14 +8340,13 @@ dependencies = [ "serde_json", "tauri-utils", "tauri-winres", - "winnow", ] [[package]] name = "tauri-codegen" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5a2105f807c6f50b2fa2ce5abd62ef207bc6f14c9fcc6b8caec437f6fb13bde" +checksum = "54ad2d49fdeab4a08717f5b49a163bdc72efc3b1950b6758245fcde79b645e1a" dependencies = [ "base64 0.21.2", "brotli", @@ -8381,19 +8360,19 @@ dependencies = [ "semver", "serde", "serde_json", - "sha2 0.10.6", + "sha2 0.10.7", "tauri-utils", "thiserror", - "time 0.3.15", + "time 0.3.25", "uuid", "walkdir", ] [[package]] name = "tauri-macros" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8784cfe6f5444097e93c69107d1ac5e8f13d02850efa8d8f2a40fe79674cef46" +checksum = "8eb12a2454e747896929338d93b0642144bb51e0dddbb36e579035731f0d76b7" dependencies = [ "heck 0.4.1", "proc-macro2", @@ -8405,9 +8384,9 @@ dependencies = [ [[package]] name = "tauri-runtime" -version = "0.13.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3b80ea3fcd5fefb60739a3b577b277e8fc30434538a2f5bba82ad7d4368c422" +checksum = "108683199cb18f96d2d4134187bb789964143c845d2d154848dda209191fd769" dependencies = [ "gtk", "http", @@ -8426,9 +8405,9 @@ dependencies = [ [[package]] name = "tauri-runtime-wry" -version = "0.13.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1c396950b1ba06aee1b4ffe6c7cd305ff433ca0e30acbc5fa1a2f92a4ce70f1" +checksum = "0b7aa256a1407a3a091b5d843eccc1a5042289baf0a43d1179d9f0fcfea37c1b" dependencies = [ "cocoa", "gtk", @@ -8450,7 +8429,7 @@ version = "1.0.2" source = "git+https://github.com/oscartbeaumont/tauri-specta?rev=c964bef228a90a66effc18cefcba6859c45a8e08#c964bef228a90a66effc18cefcba6859c45a8e08" dependencies = [ "heck 0.4.1", - "indoc 2.0.1", + "indoc 2.0.3", "serde", "serde_json", "specta", @@ -8460,12 +8439,13 @@ dependencies = [ [[package]] name = "tauri-utils" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a6f9c2dafef5cbcf52926af57ce9561bd33bb41d7394f8bb849c0330260d864" +checksum = "03fc02bb6072bb397e1d473c6f76c953cda48b4a2d0cce605df284aa74a12e84" dependencies = [ "brotli", "ctor", + "dunce", "glob", "heck 0.4.1", "html5ever", @@ -8479,7 +8459,7 @@ dependencies = [ "semver", "serde", "serde_json", - "serde_with", + "serde_with 3.1.0", "thiserror", "url", "walkdir", @@ -8493,7 +8473,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5993dc129e544393574288923d1ec447c857f3f644187f4fbf7d9a875fbfc4fb" dependencies = [ "embed-resource", - "toml 0.7.3", + "toml 0.7.6", ] [[package]] @@ -8508,15 +8488,15 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.5.0" +version = "3.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9fbec84f381d5795b08656e4912bec604d162bff9291d6189a78f4c8ab87998" +checksum = "5486094ee78b2e5038a6382ed7645bc084dc2ec433426ca4c3cb61e2007b8998" dependencies = [ "cfg-if", - "fastrand", + "fastrand 2.0.0", "redox_syscall 0.3.5", - "rustix", - "windows-sys 0.45.0", + "rustix 0.38.6", + "windows-sys 0.48.0", ] [[package]] @@ -8547,22 +8527,22 @@ checksum = "8eaa81235c7058867fa8c0e7314f33dcce9c215f535d1913822a2b3f5e289f3c" [[package]] name = "thiserror" -version = "1.0.40" +version = "1.0.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" +checksum = "611040a08a0439f8248d1990b111c95baa9c704c805fa1f62104b39655fd7f90" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.40" +version = "1.0.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" +checksum = "090198534930841fab3a5d1bb637cde49e339654e606195f8d9c76eeb081dc96" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.28", ] [[package]] @@ -8588,33 +8568,41 @@ dependencies = [ [[package]] name = "time" -version = "0.1.45" +version = "0.1.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" +checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438" dependencies = [ "libc", - "wasi 0.10.0+wasi-snapshot-preview1", "winapi", ] [[package]] name = "time" -version = "0.3.15" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d634a985c4d4238ec39cacaed2e7ae552fbd3c476b552c1deac3021b7d7eaf0c" +checksum = "b0fdd63d58b18d663fbdf70e049f00a22c8e42be082203be7f26589213cd75ea" dependencies = [ - "itoa 1.0.6", - "libc", - "num_threads", + "deranged", + "itoa 1.0.9", "serde", + "time-core", "time-macros", ] [[package]] -name = "time-macros" -version = "0.2.4" +name = "time-core" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42657b1a6f4d817cda8e7a0ace261fe0cc946cf3a80314390b22cc61ae080792" +checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" + +[[package]] +name = "time-macros" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb71511c991639bb078fd5bf97757e03914361c48100d52878b8e52b46fb92cd" +dependencies = [ + "time-core", +] [[package]] name = "tinytemplate" @@ -8643,11 +8631,12 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.28.2" +version = "1.29.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94d7b1cfd2aa4011f2de74c2c4c63665e27a71006b0a192dcd2710272e73dfa2" +checksum = "532826ff75199d5833b9d2c5fe410f29235e25704ee5f0ef599fb51c21f4a4da" dependencies = [ "autocfg", + "backtrace", "bytes", "libc", "mio", @@ -8655,7 +8644,7 @@ dependencies = [ "parking_lot 0.12.1", "pin-project-lite", "signal-hook-registry", - "socket2", + "socket2 0.4.9", "tokio-macros", "windows-sys 0.48.0", ] @@ -8668,7 +8657,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.28", ] [[package]] @@ -8718,9 +8707,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.7.3" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b403acf6f2bb0859c93c7f0d967cb4a75a7ac552100f9322faf64dc047669b21" +checksum = "c17e963a819c331dcacd7ab957d80bc2b9a9c1e71c804826d2f283dd65306542" dependencies = [ "serde", "serde_spanned", @@ -8730,20 +8719,20 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a76a9312f5ba4c2dec6b9161fdf25d87ad8a09256ccea5a556fef03c706a10f" +checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.19.8" +version = "0.19.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "239410c8609e8125456927e6707163a3b1fdb40561e4b803bc041f466ccfdc13" +checksum = "f8123f27e969974a3dfba720fdb560be359f57b44302d280ba72e76a74480e8a" dependencies = [ - "indexmap", + "indexmap 2.0.0", "serde", "serde_spanned", "toml_datetime", @@ -8768,11 +8757,11 @@ dependencies = [ [[package]] name = "tower-http" -version = "0.4.0" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d1d42a9b3f3ec46ba828e8d376aec14592ea199f70a06a548587ecd1c4ab658" +checksum = "55ae70283aba8d2a8b411c695c437fe25b8b5e44e23e780662002fc72fb47a82" dependencies = [ - "bitflags", + "bitflags 2.3.3", "bytes", "futures-core", "futures-util", @@ -8812,7 +8801,7 @@ dependencies = [ "cfg-if", "log", "pin-project-lite", - "tracing-attributes 0.1.24", + "tracing-attributes 0.1.26", "tracing-core 0.1.31", ] @@ -8833,19 +8822,19 @@ source = "git+https://github.com/tokio-rs/tracing?rev=29146260fb4615d271d2e899ad dependencies = [ "crossbeam-channel", "thiserror", - "time 0.3.15", + "time 0.3.25", "tracing-subscriber 0.3.0", ] [[package]] name = "tracing-attributes" -version = "0.1.24" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f57e3ca2a01450b1a921183a9c9cbfda207fd822cef4ccb00a65402cbba7a74" +checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.28", ] [[package]] @@ -8855,7 +8844,7 @@ source = "git+https://github.com/tokio-rs/tracing?rev=29146260fb4615d271d2e899ad dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.28", ] [[package]] @@ -8941,7 +8930,7 @@ dependencies = [ "once_cell", "regex", "sharded-slab", - "smallvec 1.10.0", + "smallvec 1.11.0", "thread_local", "tracing 0.2.0", "tracing-core 0.2.0", @@ -8959,7 +8948,7 @@ dependencies = [ "once_cell", "regex", "sharded-slab", - "smallvec 1.10.0", + "smallvec 1.11.0", "thread_local", "tracing 0.1.37", "tracing-core 0.1.31", @@ -9000,9 +8989,9 @@ dependencies = [ [[package]] name = "triomphe" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1ee9bd9239c339d714d657fac840c6d2a4f9c45f4f9ec7b0975113458be78db" +checksum = "0eee8098afad3fb0c54a9007aab6804558410503ad676d4633f9c2559a00ac0f" [[package]] name = "trust-dns-proto" @@ -9021,8 +9010,8 @@ dependencies = [ "ipnet", "lazy_static", "rand 0.8.5", - "smallvec 1.10.0", - "socket2", + "smallvec 1.11.0", + "socket2 0.4.9", "thiserror", "tinyvec", "tokio", @@ -9043,7 +9032,7 @@ dependencies = [ "lru-cache", "parking_lot 0.12.1", "resolv-conf", - "smallvec 1.10.0", + "smallvec 1.11.0", "thiserror", "tokio", "tracing 0.1.37", @@ -9102,9 +9091,9 @@ checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" [[package]] name = "ucd-trie" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e79c4d996edb816c91e4308506774452e55e95c3c9de07b6729e17e15a5ef81" +checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" [[package]] name = "uhlc" @@ -9128,17 +9117,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" dependencies = [ "byteorder", - "crunchy 0.2.2", + "crunchy", "hex", "static_assertions", ] -[[package]] -name = "unarray" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" - [[package]] name = "unicase" version = "2.6.0" @@ -9156,9 +9139,9 @@ checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.9" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0" +checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" [[package]] name = "unicode-normalization" @@ -9234,12 +9217,12 @@ checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" [[package]] name = "url" -version = "2.3.1" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" +checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" dependencies = [ "form_urlencoded", - "idna 0.3.0", + "idna 0.4.0", "percent-encoding", "serde", ] @@ -9260,7 +9243,7 @@ version = "0.1.0" source = "git+https://github.com/Brendonovich/prisma-engines?branch=new-4.14.0-pcr#45b026c8b64ed0b60cb03deed5f478c457de645b" dependencies = [ "backtrace", - "indoc 2.0.1", + "indoc 2.0.3", "itertools", "quaint", "serde", @@ -9283,11 +9266,11 @@ checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" [[package]] name = "uuid" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d023da39d1fde5a8a3fe1f3e01ca9632ada0a63e9797de55a879d6e2236277be" +checksum = "79daa5ed5740825c40b389c5e50312b9c86df53fccd33f281df655642b43869d" dependencies = [ - "getrandom 0.2.9", + "getrandom 0.2.10", "serde", ] @@ -9347,15 +9330,6 @@ dependencies = [ "libc", ] -[[package]] -name = "wait-timeout" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6" -dependencies = [ - "libc", -] - [[package]] name = "waitgroup" version = "0.1.2" @@ -9383,11 +9357,10 @@ dependencies = [ [[package]] name = "want" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" dependencies = [ - "log", "try-lock", ] @@ -9399,9 +9372,9 @@ checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" [[package]] name = "wasi" -version = "0.10.0+wasi-snapshot-preview1" +version = "0.10.2+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" +checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" [[package]] name = "wasi" @@ -9411,9 +9384,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.86" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bba0e8cb82ba49ff4e229459ff22a191bbe9a1cb3a341610c9c33efc27ddf73" +checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -9421,24 +9394,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.86" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b04bc93f9d6bdee709f6bd2118f57dd6679cf1176a1af464fca3ab0d66d8fb" +checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.28", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.36" +version = "0.4.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d1985d03709c53167ce907ff394f5316aa22cb4e12761295c5dc57dacb6297e" +checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" dependencies = [ "cfg-if", "js-sys", @@ -9448,9 +9421,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.86" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14d6b024f1a526bb0234f52840389927257beb670610081360e5a03c5df9c258" +checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -9458,22 +9431,35 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.86" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e128beba882dd1eb6200e1dc92ae6c5dbaa4311aa7bb211ca035779e5efc39f8" +checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.28", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.86" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed9d5b4305409d1fc9482fee2d7f9bcbf24b3972bf59817ef757e23982242a93" +checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" + +[[package]] +name = "wasm-streams" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bbae3363c08332cadccd13b67db371814cd214c2524020932f0804b8cf7c078" +dependencies = [ + "futures-util", + "js-sys", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] [[package]] name = "wasm-timer" @@ -9492,9 +9478,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.63" +version = "0.3.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bdd9ef4e984da1187bf8110c5cf5b845fbc87a23602cdf912386a76fcd3a7c2" +checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" dependencies = [ "js-sys", "wasm-bindgen", @@ -9506,7 +9492,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", @@ -9531,7 +9517,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", @@ -9544,14 +9530,14 @@ dependencies = [ "pango-sys", "pkg-config", "soup2-sys", - "system-deps 6.1.0", + "system-deps 6.1.1", ] [[package]] name = "webp" -version = "0.2.2" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf022f821f166079a407d000ab57e84de020e66ffbbf4edde999bc7d6e371cae" +checksum = "12ff0ebb440d1db63b778cb609db8a8abfda825a7841664a76a70b628502c7e1" dependencies = [ "image", "libwebp-sys", @@ -9600,10 +9586,10 @@ dependencies = [ "sdp", "serde", "serde_json", - "sha2 0.10.6", + "sha2 0.10.7", "stun", "thiserror", - "time 0.3.15", + "time 0.3.25", "tokio", "turn", "url", @@ -9663,7 +9649,7 @@ dependencies = [ "sec1", "serde", "sha1", - "sha2 0.10.6", + "sha2 0.10.7", "signature", "subtle", "thiserror", @@ -9705,7 +9691,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f08dfd7a6e3987e255c4dbe710dde5d94d0f0574f8a21afa95d171376c143106" dependencies = [ "log", - "socket2", + "socket2 0.4.9", "thiserror", "tokio", "webrtc-util", @@ -9772,7 +9758,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93f1db1727772c05cf7a2cfece52c3aca8045ca1e176cd517d323489aa3c6d87" dependencies = [ "async-trait", - "bitflags", + "bitflags 1.3.2", "bytes", "cc", "ipnet", @@ -9832,9 +9818,9 @@ checksum = "9193164d4de03a926d909d3bc7c30543cecb35400c02114792c2cae20d5e2dbb" [[package]] name = "widestring" -version = "0.5.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17882f045410753661207383517a6f62ec3dbeb6a4ed2acce01f0728238d1983" +checksum = "653f141f39ec16bba3c5abe400a0c60da7468261cc2cbf36805022876bc721a8" [[package]] name = "winapi" @@ -9925,7 +9911,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.1", ] [[package]] @@ -9984,7 +9970,7 @@ 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.1", ] [[package]] @@ -10004,9 +9990,9 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.48.0" +version = "0.48.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" dependencies = [ "windows_aarch64_gnullvm 0.48.0", "windows_aarch64_msvc 0.48.0", @@ -10199,9 +10185,9 @@ checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" [[package]] name = "winnow" -version = "0.4.1" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae8970b36c66498d8ff1d66685dc86b91b29db0c7739899012f63a63814b4b28" +checksum = "f46aab759304e4d7b2075a9aecba26228bb073ee8c50db796b2c72c676b5d807" dependencies = [ "memchr", ] @@ -10225,6 +10211,16 @@ dependencies = [ "winapi", ] +[[package]] +name = "winreg" +version = "0.50.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", +] + [[package]] name = "wry" version = "0.24.3" @@ -10251,7 +10247,7 @@ dependencies = [ "once_cell", "serde", "serde_json", - "sha2 0.10.6", + "sha2 0.10.7", "soup2", "tao", "thiserror", @@ -10331,7 +10327,7 @@ dependencies = [ "ring", "rusticata-macros", "thiserror", - "time 0.3.15", + "time 0.3.25", ] [[package]] @@ -10349,7 +10345,7 @@ dependencies = [ "oid-registry 0.6.1", "rusticata-macros", "thiserror", - "time 0.3.15", + "time 0.3.25", ] [[package]] @@ -10367,7 +10363,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e17bb3549cc1321ae1296b9cdc2698e2b6cb1992adfa19a8c72e5b7a738f44cd" dependencies = [ - "time 0.3.15", + "time 0.3.25", ] [[package]] @@ -10380,7 +10376,7 @@ dependencies = [ "byteorder", "derivative", "enumflags2 0.6.4", - "fastrand", + "fastrand 1.9.0", "futures", "nb-connect", "nix 0.22.3", @@ -10422,7 +10418,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.28", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 83680a706..d28cd39be 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,19 +19,19 @@ edition = "2021" repository = "https://github.com/spacedriveapp/spacedrive" [workspace.dependencies] -prisma-client-rust = { git = "https://github.com/Brendonovich/prisma-client-rust", rev = "047c1102284a61ee400788baa7529d54ae745790", features = [ +prisma-client-rust = { git = "https://github.com/Brendonovich/prisma-client-rust", branch = "spacedrive", features = [ "rspc", "sqlite-create-many", "migrations", "sqlite", ], default-features = false } -prisma-client-rust-cli = { git = "https://github.com/Brendonovich/prisma-client-rust", rev = "047c1102284a61ee400788baa7529d54ae745790", features = [ +prisma-client-rust-cli = { git = "https://github.com/Brendonovich/prisma-client-rust", branch = "spacedrive", features = [ "rspc", "sqlite-create-many", "migrations", "sqlite", ], default-features = false } -prisma-client-rust-sdk = { git = "https://github.com/Brendonovich/prisma-client-rust", rev = "047c1102284a61ee400788baa7529d54ae745790", features = [ +prisma-client-rust-sdk = { git = "https://github.com/Brendonovich/prisma-client-rust", branch = "spacedrive", features = [ "sqlite", ], default-features = false } diff --git a/apps/cli/Cargo.toml b/apps/cli/Cargo.toml index b60a717b2..b435d17b1 100644 --- a/apps/cli/Cargo.toml +++ b/apps/cli/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "cli" +name = "sd-cli" version = "0.1.0" license = { workspace = true } repository = { workspace = true } diff --git a/apps/desktop/src-tauri/Cargo.toml b/apps/desktop/src-tauri/Cargo.toml index 5cbdf0e27..85841d870 100644 --- a/apps/desktop/src-tauri/Cargo.toml +++ b/apps/desktop/src-tauri/Cargo.toml @@ -1,9 +1,9 @@ [package] -name = "spacedrive" +name = "sd-desktop" version = "0.1.0" description = "The universal file manager." authors = ["Spacedrive Technology Inc."] -default-run = "spacedrive" +default-run = "sd-desktop" license = { workspace = true } repository = { workspace = true } edition = { workspace = true } diff --git a/apps/desktop/src/commands.ts b/apps/desktop/src/commands.ts index 58e13e0ee..e413d10f0 100644 --- a/apps/desktop/src/commands.ts +++ b/apps/desktop/src/commands.ts @@ -42,7 +42,7 @@ export function lockAppTheme(themeType: AppThemeType) { return invoke()("lock_app_theme", { themeType }) } -export type OpenWithApplication = { url: string; name: string } -export type OpenFilePathResult = { t: "NoLibrary" } | { t: "NoFile"; c: number } | { t: "OpenError"; c: [number, string] } | { t: "AllGood"; c: number } | { t: "Internal"; c: string } -export type AppThemeType = "Auto" | "Light" | "Dark" export type RevealItem = { Location: { id: number } } | { FilePath: { id: number } } +export type AppThemeType = "Auto" | "Light" | "Dark" +export type OpenFilePathResult = { t: "NoLibrary" } | { t: "NoFile"; c: number } | { t: "OpenError"; c: [number, string] } | { t: "AllGood"; c: number } | { t: "Internal"; c: string } +export type OpenWithApplication = { url: string; name: string } diff --git a/apps/server/Cargo.toml b/apps/server/Cargo.toml index b33dc1eb0..3ee4a663a 100644 --- a/apps/server/Cargo.toml +++ b/apps/server/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "server" +name = "sd-server" version = "0.1.0" license = { workspace = true } repository = { workspace = true } diff --git a/apps/server/package.json b/apps/server/package.json index f1254391f..b868df6fa 100644 --- a/apps/server/package.json +++ b/apps/server/package.json @@ -1,9 +1,9 @@ { - "name": "@sd/server", - "version": "0.0.0", - "main": "index.js", - "license": "GPL-3.0-only", - "scripts": { - "dev": "RUST_LOG=\"sd_core=info\" cargo watch -x 'run -p server'" - } + "name": "@sd/server", + "version": "0.0.0", + "main": "index.js", + "license": "GPL-3.0-only", + "scripts": { + "dev": "RUST_LOG=\"sd_core=info\" cargo watch -x 'run -p sd-server'" + } } diff --git a/core/crates/sync/Cargo.toml b/core/crates/sync/Cargo.toml index 83cc6fc92..0c4c506b7 100644 --- a/core/crates/sync/Cargo.toml +++ b/core/crates/sync/Cargo.toml @@ -4,7 +4,7 @@ version = "0.0.0" edition = "2021" [features] -default = ["emit-messages"] +default = [] emit-messages = [] [dependencies] @@ -19,3 +19,4 @@ serde_json = { workspace = true } tokio = { workspace = true } uuid = { workspace = true } uhlc = "0.5.2" +slotmap = "1.0.6" diff --git a/core/crates/sync/src/actor.rs b/core/crates/sync/src/actor.rs new file mode 100644 index 000000000..f59430502 --- /dev/null +++ b/core/crates/sync/src/actor.rs @@ -0,0 +1,61 @@ +use tokio::sync::mpsc; + +pub trait ActorTypes { + type Event; + type Request; + type Handler; +} + +pub struct ActorIO { + pub event_rx: mpsc::Receiver, + pub req_tx: mpsc::Sender, +} + +impl ActorIO { + pub async fn send(&self, value: T::Request) -> Result<(), mpsc::error::SendError> { + self.req_tx.send(value).await + } +} + +pub struct HandlerIO { + handler: T::Handler, + req_rx: mpsc::Receiver, +} + +pub type SplitHandlerIO = ( + ::Handler, + mpsc::Receiver<::Request>, +); + +impl HandlerIO { + pub fn split(self) -> SplitHandlerIO { + (self.handler, self.req_rx) + } +} + +pub fn create_actor_io( + make_handler: fn(mpsc::Sender) -> T::Handler, +) -> (ActorIO, HandlerIO) { + let (req_tx, req_rx) = mpsc::channel(20); + let (event_tx, event_rx) = mpsc::channel(20); + + ( + ActorIO { event_rx, req_tx }, + HandlerIO { + handler: make_handler(event_tx), + req_rx, + }, + ) +} + +#[macro_export] +macro_rules! wait { + ($rx:expr, $pattern:pat $(=> $expr:expr)?) => { + loop { + match $rx.recv().await { + Some($pattern) => break $($expr)?, + _ => continue + } + } + }; +} diff --git a/core/crates/sync/src/db_operation.rs b/core/crates/sync/src/db_operation.rs new file mode 100644 index 000000000..72dc4270a --- /dev/null +++ b/core/crates/sync/src/db_operation.rs @@ -0,0 +1,62 @@ +use sd_prisma::prisma::*; +use sd_sync::*; +use uhlc::NTP64; +use uuid::Uuid; + +shared_operation::include!(shared_include { + instance: select { pub_id } +}); +relation_operation::include!(relation_include { + instance: select { pub_id } +}); + +pub enum DbOperation { + Shared(shared_include::Data), + Relation(relation_include::Data), +} + +impl DbOperation { + pub fn timestamp(&self) -> NTP64 { + NTP64(match self { + Self::Shared(op) => op.timestamp, + Self::Relation(op) => op.timestamp, + } as u64) + } + + pub fn id(&self) -> Uuid { + Uuid::from_slice(match self { + Self::Shared(op) => &op.id, + Self::Relation(op) => &op.id, + }) + .unwrap() + } + + pub fn instance(&self) -> Uuid { + Uuid::from_slice(match self { + Self::Shared(op) => &op.instance.pub_id, + Self::Relation(op) => &op.instance.pub_id, + }) + .unwrap() + } + + pub fn into_operation(self) -> CRDTOperation { + CRDTOperation { + id: self.id(), + instance: self.instance(), + timestamp: self.timestamp(), + typ: match self { + Self::Shared(op) => CRDTOperationType::Shared(SharedOperation { + record_id: serde_json::from_slice(&op.record_id).unwrap(), + model: op.model, + data: serde_json::from_slice(&op.data).unwrap(), + }), + Self::Relation(op) => CRDTOperationType::Relation(RelationOperation { + relation: op.relation, + data: serde_json::from_slice(&op.data).unwrap(), + relation_item: serde_json::from_slice(&op.item_id).unwrap(), + relation_group: serde_json::from_slice(&op.group_id).unwrap(), + }), + }, + } + } +} diff --git a/core/crates/sync/src/ingest.rs b/core/crates/sync/src/ingest.rs index 98086a9da..4863c9fb7 100644 --- a/core/crates/sync/src/ingest.rs +++ b/core/crates/sync/src/ingest.rs @@ -1,34 +1,261 @@ -use sd_p2p::{spacetunnel::Tunnel, PeerId}; -use sd_sync::CRDTOperation; +use std::{ops::Deref, sync::Arc}; + +use sd_p2p::spacetunnel::Tunnel; +use sd_prisma::{prisma::*, prisma_sync::ModelSyncData}; +use sd_sync::*; +use sd_utils::uuid_to_bytes; +use serde_json::to_vec; use tokio::sync::mpsc; -use uhlc::NTP64; +use uhlc::{Timestamp, NTP64}; use uuid::Uuid; -use crate::Timestamps; - -pub struct Actor { - pub events: mpsc::Sender, -} +use crate::{actor::*, wait, SharedState}; #[must_use] +/// Stuff that can be handled outside the actor pub enum Request { Messages { tunnel: Tunnel, timestamps: Vec<(Uuid, NTP64)>, }, - Ingest(Vec), + Ingested, } +/// Stuff that the actor consumes #[derive(Debug)] pub enum Event { Notification(NotificationEvent), Messages(MessagesEvent), } +#[derive(Debug, Default)] +pub enum State { + #[default] + WaitingForNotification, + RetrievingMessages(Tunnel), + Ingesting(MessagesEvent), +} + +pub struct Actor { + state: Option, + shared: Arc, + io: ActorIO, +} + +impl Actor { + async fn tick(mut self) -> Option { + let state = match self.state.take()? { + State::WaitingForNotification => { + let notification = wait!(self.io.event_rx, Event::Notification(n) => n); + + State::RetrievingMessages(notification.tunnel) + } + State::RetrievingMessages(tunnel) => { + self.io + .send(Request::Messages { + tunnel, + timestamps: self + .timestamps + .read() + .await + .iter() + .map(|(&k, &v)| (k, v)) + .collect(), + }) + .await + .ok(); + + State::Ingesting(wait!(self.io.event_rx, Event::Messages(event) => event)) + } + State::Ingesting(event) => { + let count = event.messages.len(); + + dbg!(&event.messages); + + for op in event.messages { + let fut = self.receive_crdt_operation(op); + fut.await; + } + + println!("Ingested {count} messages!"); + + match event.has_more { + true => State::RetrievingMessages(event.tunnel), + false => State::WaitingForNotification, + } + } + }; + + Some(Self { + state: Some(state), + ..self + }) + } + + pub fn spawn(shared: Arc) -> SplitHandlerIO { + let (actor_io, handler_io) = create_actor_io::(|event_tx| Handler { event_tx }); + + tokio::spawn(async move { + let mut this = Self { + state: Some(Default::default()), + io: actor_io, + shared, + }; + + loop { + this = match this.tick().await { + Some(this) => this, + None => break, + }; + } + }); + + handler_io.split() + } + + async fn receive_crdt_operation(&mut self, op: CRDTOperation) { + self.clock + .update_with_timestamp(&Timestamp::new(op.timestamp, op.instance.into())) + .ok(); + + let mut timestamp = { + let mut clocks = self.timestamps.write().await; + clocks + .entry(op.instance) + .or_insert_with(|| op.timestamp) + .clone() + }; + + if timestamp < op.timestamp { + timestamp = op.timestamp; + } + + let op_instance = op.instance; + + let is_old = self.compare_message(&op).await; + + if !is_old { + self.apply_op(op).await.ok(); + } + + self.db + ._transaction() + .run({ + let timestamps = self.timestamps.clone(); + |db| async move { + match db + .instance() + .update( + instance::pub_id::equals(uuid_to_bytes(op_instance)), + vec![instance::timestamp::set(Some(timestamp.as_u64() as i64))], + ) + .exec() + .await + { + Ok(_) => { + timestamps.write().await.insert(op_instance, timestamp); + Ok(()) + } + Err(e) => Err(e), + } + } + }) + .await + .unwrap(); + } + + async fn apply_op(&mut self, op: CRDTOperation) -> prisma_client_rust::Result<()> { + ModelSyncData::from_op(op.typ.clone()) + .unwrap() + .exec(&self.db) + .await?; + + match &op.typ { + CRDTOperationType::Shared(shared_op) => { + shared_op_db(&op, shared_op) + .to_query(&self.db) + .exec() + .await?; + } + CRDTOperationType::Relation(relation_op) => { + relation_op_db(&op, relation_op) + .to_query(&self.db) + .exec() + .await?; + } + } + + self.io.req_tx.send(Request::Ingested).await.ok(); + + Ok(()) + } + + async fn compare_message(&mut self, op: &CRDTOperation) -> bool { + let old_timestamp = match &op.typ { + CRDTOperationType::Shared(shared_op) => { + let newer_op = self + .db + .shared_operation() + .find_first(vec![ + shared_operation::timestamp::gte(op.timestamp.as_u64() as i64), + shared_operation::model::equals(shared_op.model.to_string()), + shared_operation::record_id::equals( + serde_json::to_vec(&shared_op.record_id).unwrap(), + ), + shared_operation::kind::equals(shared_op.kind().to_string()), + ]) + .order_by(shared_operation::timestamp::order(SortOrder::Desc)) + .exec() + .await + .unwrap(); + + newer_op.map(|newer_op| newer_op.timestamp) + } + CRDTOperationType::Relation(relation_op) => { + let newer_op = self + .db + .relation_operation() + .find_first(vec![ + relation_operation::timestamp::gte(op.timestamp.as_u64() as i64), + relation_operation::relation::equals(relation_op.relation.to_string()), + relation_operation::item_id::equals( + serde_json::to_vec(&relation_op.relation_item).unwrap(), + ), + relation_operation::kind::equals(relation_op.kind().to_string()), + ]) + .order_by(relation_operation::timestamp::order(SortOrder::Desc)) + .exec() + .await + .unwrap(); + + newer_op.map(|newer_op| newer_op.timestamp) + } + }; + + old_timestamp + .map(|old| old != op.timestamp.as_u64() as i64) + .unwrap_or_default() + } +} + +impl Deref for Actor { + type Target = SharedState; + + fn deref(&self) -> &Self::Target { + &self.shared + } +} + +pub struct Handler { + pub event_tx: mpsc::Sender, +} + #[derive(Debug)] pub struct MessagesEvent { pub instance_id: Uuid, pub messages: Vec, + pub has_more: bool, + pub tunnel: Tunnel, } #[derive(Debug)] @@ -36,91 +263,39 @@ pub struct NotificationEvent { pub tunnel: Tunnel, } -#[derive(Debug)] -pub enum State { - WaitingForNotification, - ExecutingMessagesRequest, - Ingesting, +impl ActorTypes for Actor { + type Event = Event; + type Request = Request; + type Handler = Handler; } -#[macro_export] -macro_rules! wait { - ($rx:ident, $pattern:pat $(=> $expr:expr)?) => { - loop { - match $rx.recv().await { - Some($pattern) => break $($expr)?, - _ => continue - } - } - }; -} - -impl Actor { - pub fn spawn(timestamps: Timestamps) -> (Self, mpsc::Receiver) { - let (req_tx, req_rx) = mpsc::channel(4); - let (events_tx, mut events_rx) = mpsc::channel(4); - - tokio::spawn(async move { - let mut state = State::WaitingForNotification; - - loop { - dbg!(&state); - - state = match state { - State::WaitingForNotification => { - let notification = wait!(events_rx, Event::Notification(n) => n); - - // req_tx.send(Request::Messages(tunnel, peer_id, 69)); - - // let notification = wait!( - // events_rx, - // Incoming::Notification(notification) => notification - // ); - - req_tx - .send(Request::Messages { - tunnel: notification.tunnel, - timestamps: timestamps - .read() - .await - .iter() - .map(|(&k, &v)| (k, v)) - .collect(), - }) - .await - .ok(); - - State::ExecutingMessagesRequest - } - State::ExecutingMessagesRequest => { - let event = wait!(events_rx, Event::Messages(event) => event); - - req_tx - .send(Request::Ingest(event.messages.clone())) - .await - .ok(); - - dbg!(&event.messages); - - State::Ingesting - } - State::Ingesting => { - println!("Ingested!"); - - State::WaitingForNotification - } - }; - } - }); - - (Self { events: events_tx }, req_rx) +fn shared_op_db(op: &CRDTOperation, shared_op: &SharedOperation) -> shared_operation::Create { + shared_operation::Create { + id: op.id.as_bytes().to_vec(), + timestamp: op.timestamp.0 as i64, + instance: instance::pub_id::equals(op.instance.as_bytes().to_vec()), + kind: shared_op.kind().to_string(), + data: to_vec(&shared_op.data).unwrap(), + model: shared_op.model.to_string(), + record_id: to_vec(&shared_op.record_id).unwrap(), + _params: vec![], } +} - pub async fn notify(&self, tunnel: Tunnel, _peer_id: PeerId) { - self.events - .send(Event::Notification(NotificationEvent { tunnel })) - .await - .ok(); +fn relation_op_db( + op: &CRDTOperation, + relation_op: &RelationOperation, +) -> relation_operation::Create { + relation_operation::Create { + id: op.id.as_bytes().to_vec(), + timestamp: op.timestamp.0 as i64, + instance: instance::pub_id::equals(op.instance.as_bytes().to_vec()), + kind: relation_op.kind().to_string(), + data: to_vec(&relation_op.data).unwrap(), + relation: relation_op.relation.to_string(), + item_id: to_vec(&relation_op.relation_item).unwrap(), + group_id: to_vec(&relation_op.relation_group).unwrap(), + _params: vec![], } } diff --git a/core/crates/sync/src/lib.rs b/core/crates/sync/src/lib.rs index 3da4d12a2..cb29a617f 100644 --- a/core/crates/sync/src/lib.rs +++ b/core/crates/sync/src/lib.rs @@ -1,10 +1,12 @@ #![allow(clippy::unwrap_used, clippy::panic)] // TODO: Brendan remove this once you've got error handling here +mod actor; +mod db_operation; pub mod ingest; +mod manager; -use sd_prisma::{prisma::*, prisma_sync::ModelSyncData}; +use sd_prisma::prisma::*; use sd_sync::*; -use sd_utils::uuid_to_bytes; use std::{ collections::{BTreeMap, HashMap}, @@ -12,15 +14,8 @@ use std::{ sync::Arc, }; -use serde_json::to_vec; -use tokio::sync::{ - broadcast::{self}, - mpsc, RwLock, -}; -use uhlc::{HLCBuilder, Timestamp, HLC}; -use uuid::Uuid; - -pub use sd_prisma::prisma_sync; +pub use ingest::*; +pub use manager::*; pub use uhlc::NTP64; #[derive(Clone)] @@ -29,367 +24,29 @@ pub enum SyncMessage { Created, } -pub type Timestamps = Arc>>; +pub type Timestamps = Arc>>; -pub struct SyncManager { - db: Arc, - pub instance: Uuid, - // TODO: Remove `Mutex` and store this on `ingest` actor - timestamps: Timestamps, - clock: HLC, - pub tx: broadcast::Sender, - pub ingest: ingest::Actor, +pub struct SharedState { + pub db: Arc, + pub instance: uuid::Uuid, + pub timestamps: Timestamps, + pub clock: uhlc::HLC, } -impl fmt::Debug for SyncManager { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_struct("SyncManager").finish() - } -} - -pub struct SyncManagerNew { - pub manager: SyncManager, - pub rx: broadcast::Receiver, - pub ingest_rx: mpsc::Receiver, -} - -impl SyncManager { - #[allow(clippy::new_ret_no_self)] - pub fn new(db: &Arc, instance: Uuid) -> SyncManagerNew { - let (tx, rx) = broadcast::channel(64); - - let timestamps: Timestamps = Default::default(); - - let (ingest, ingest_rx) = ingest::Actor::spawn(timestamps.clone()); - - SyncManagerNew { - manager: Self { - db: db.clone(), - instance, - clock: HLCBuilder::new().with_id(instance.into()).build(), - timestamps, - tx, - ingest, - }, - rx, - ingest_rx, - } - } - - pub async fn write_ops<'item, I: prisma_client_rust::BatchItem<'item>>( - &self, - tx: &PrismaClient, - (_ops, queries): (Vec, I), - ) -> prisma_client_rust::Result<::ReturnValue> { - #[cfg(feature = "emit-messages")] - let res = { - macro_rules! variant { - ($var:ident, $variant:ident, $fn:ident) => { - let $var = _ops - .iter() - .filter_map(|op| match &op.typ { - CRDTOperationType::$variant(inner) => { - Some($fn(&op, &inner).to_query(tx)) - } - _ => None, - }) - .collect::>(); - }; - } - - variant!(shared, Shared, shared_op_db); - variant!(relation, Relation, relation_op_db); - - let (res, _) = tx._batch((queries, (shared, relation))).await?; - - self.tx.send(SyncMessage::Created).ok(); - - res - }; - #[cfg(not(feature = "emit-messages"))] - let res = tx._batch([queries]).await?.remove(0); - - Ok(res) - } - - #[allow(unused_variables)] - pub async fn write_op<'item, Q: prisma_client_rust::BatchItem<'item>>( - &self, - tx: &PrismaClient, - op: CRDTOperation, - query: Q, - ) -> prisma_client_rust::Result<::ReturnValue> { - #[cfg(feature = "emit-messages")] - let ret = { - macro_rules! exec { - ($fn:ident, $inner:ident) => { - tx._batch(($fn(&op, $inner).to_query(tx), query)).await?.1 - }; - } - - let ret = match &op.typ { - CRDTOperationType::Shared(inner) => exec!(shared_op_db, inner), - CRDTOperationType::Relation(inner) => exec!(relation_op_db, inner), - }; - - self.tx.send(SyncMessage::Created).ok(); - - ret - }; - #[cfg(not(feature = "emit-messages"))] - let ret = tx._batch(vec![query]).await?.remove(0); - - Ok(ret) - } - - pub async fn get_ops( - &self, - args: GetOpsArgs, - ) -> prisma_client_rust::Result> { - let Self { db, .. } = self; - - shared_operation::include!(shared_include { - instance: select { pub_id } - }); - relation_operation::include!(relation_include { - instance: select { pub_id } - }); - - enum DbOperation { - Shared(shared_include::Data), - Relation(relation_include::Data), - } - - impl DbOperation { - fn timestamp(&self) -> NTP64 { - NTP64(match self { - Self::Shared(op) => op.timestamp, - Self::Relation(op) => op.timestamp, - } as u64) - } - - fn id(&self) -> Uuid { - Uuid::from_slice(match self { - Self::Shared(op) => &op.id, - Self::Relation(op) => &op.id, - }) - .unwrap() - } - - fn instance(&self) -> Uuid { - Uuid::from_slice(match self { - Self::Shared(op) => &op.instance.pub_id, - Self::Relation(op) => &op.instance.pub_id, - }) - .unwrap() - } - - fn into_operation(self) -> CRDTOperation { - CRDTOperation { - id: self.id(), - instance: self.instance(), - timestamp: self.timestamp(), - typ: match self { - Self::Shared(op) => CRDTOperationType::Shared(SharedOperation { - record_id: serde_json::from_slice(&op.record_id).unwrap(), - model: op.model, - data: serde_json::from_slice(&op.data).unwrap(), - }), - Self::Relation(op) => CRDTOperationType::Relation(RelationOperation { - relation: op.relation, - data: serde_json::from_slice(&op.data).unwrap(), - relation_item: serde_json::from_slice(&op.item_id).unwrap(), - relation_group: serde_json::from_slice(&op.group_id).unwrap(), - }), - }, - } - } - } - - macro_rules! db_args { - ($op:ident) => { - vec![prisma_client_rust::operator::or( - args.clocks - .iter() - .map(|(instance_id, timestamp)| { - prisma_client_rust::and![ - $op::instance::is(vec![instance::pub_id::equals(uuid_to_bytes( - *instance_id - ))]), - $op::timestamp::gte(timestamp.as_u64() as i64) - ] - }) - .collect(), - )] - }; - } - - let (shared, relation) = db - ._batch(( - db.shared_operation() - .find_many(db_args!(shared_operation)) - .take(args.count as i64) - .include(shared_include::include()), - db.relation_operation() - .find_many(db_args!(relation_operation)) - .take(args.count as i64) - .include(relation_include::include()), - )) - .await?; - - let mut ops = BTreeMap::new(); - - ops.extend( - shared - .into_iter() - .map(DbOperation::Shared) - .map(|op| (op.timestamp(), op)), - ); - ops.extend( - relation - .into_iter() - .map(DbOperation::Relation) - .map(|op| (op.timestamp(), op)), - ); - - Ok(ops - .into_values() - .rev() - .take(args.count as usize) - .map(DbOperation::into_operation) - .collect()) - } - - pub async fn apply_op(&self, op: CRDTOperation) -> prisma_client_rust::Result<()> { - ModelSyncData::from_op(op.typ.clone()) - .unwrap() - .exec(&self.db) - .await?; - - match &op.typ { - CRDTOperationType::Shared(shared_op) => { - shared_op_db(&op, shared_op) - .to_query(&self.db) - .exec() - .await?; - } - CRDTOperationType::Relation(relation_op) => { - relation_op_db(&op, relation_op) - .to_query(&self.db) - .exec() - .await?; - } - } - - self.tx.send(SyncMessage::Ingested).ok(); - - Ok(()) - } - - async fn compare_message(&self, op: &CRDTOperation) -> bool { - let old_timestamp = match &op.typ { - CRDTOperationType::Shared(shared_op) => { - let newer_op = self - .db - .shared_operation() - .find_first(vec![ - shared_operation::timestamp::gte(op.timestamp.as_u64() as i64), - shared_operation::model::equals(shared_op.model.to_string()), - shared_operation::record_id::equals( - serde_json::to_vec(&shared_op.record_id).unwrap(), - ), - shared_operation::kind::equals(shared_op.kind().to_string()), - ]) - .order_by(shared_operation::timestamp::order(SortOrder::Desc)) - .exec() - .await - .unwrap(); - - newer_op.map(|newer_op| newer_op.timestamp) - } - CRDTOperationType::Relation(relation_op) => { - let newer_op = self - .db - .relation_operation() - .find_first(vec![ - relation_operation::timestamp::gte(op.timestamp.as_u64() as i64), - relation_operation::relation::equals(relation_op.relation.to_string()), - relation_operation::item_id::equals( - serde_json::to_vec(&relation_op.relation_item).unwrap(), - ), - relation_operation::kind::equals(relation_op.kind().to_string()), - ]) - .order_by(relation_operation::timestamp::order(SortOrder::Desc)) - .exec() - .await - .unwrap(); - - newer_op.map(|newer_op| newer_op.timestamp) - } - }; - - old_timestamp - .map(|old| old != op.timestamp.as_u64() as i64) - .unwrap_or_default() - } - - pub async fn receive_crdt_operation(&self, op: CRDTOperation) { - self.clock - .update_with_timestamp(&Timestamp::new(op.timestamp, op.instance.into())) - .ok(); - - let mut clocks = self.timestamps.write().await; - let timestamp = clocks.entry(op.instance).or_insert_with(|| op.timestamp); - - if *timestamp < op.timestamp { - *timestamp = op.timestamp; - } - - let op_timestamp = op.timestamp; - let op_instance = op.instance; - - let is_old = self.compare_message(&op).await; - - if !is_old { - self.apply_op(op).await.ok(); - } - - self.db - .instance() - .update( - instance::pub_id::equals(uuid_to_bytes(op_instance)), - vec![instance::timestamp::set(Some(op_timestamp.as_u64() as i64))], - ) - .exec() - .await - .ok(); - } - - pub async fn register_instance(&self, instance_id: Uuid) { - self.timestamps.write().await.insert(instance_id, NTP64(0)); - } -} - -#[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq, Eq)] -pub struct GetOpsArgs { - pub clocks: Vec<(Uuid, NTP64)>, - pub count: u32, -} - -fn shared_op_db(op: &CRDTOperation, shared_op: &SharedOperation) -> shared_operation::Create { +pub fn shared_op_db(op: &CRDTOperation, shared_op: &SharedOperation) -> shared_operation::Create { shared_operation::Create { id: op.id.as_bytes().to_vec(), timestamp: op.timestamp.0 as i64, instance: instance::pub_id::equals(op.instance.as_bytes().to_vec()), kind: shared_op.kind().to_string(), - data: to_vec(&shared_op.data).unwrap(), + data: serde_json::to_vec(&shared_op.data).unwrap(), model: shared_op.model.to_string(), - record_id: to_vec(&shared_op.record_id).unwrap(), + record_id: serde_json::to_vec(&shared_op.record_id).unwrap(), _params: vec![], } } -fn relation_op_db( +pub fn relation_op_db( op: &CRDTOperation, relation_op: &RelationOperation, ) -> relation_operation::Create { @@ -398,20 +55,10 @@ fn relation_op_db( timestamp: op.timestamp.0 as i64, instance: instance::pub_id::equals(op.instance.as_bytes().to_vec()), kind: relation_op.kind().to_string(), - data: to_vec(&relation_op.data).unwrap(), + data: serde_json::to_vec(&relation_op.data).unwrap(), relation: relation_op.relation.to_string(), - item_id: to_vec(&relation_op.relation_item).unwrap(), - group_id: to_vec(&relation_op.relation_group).unwrap(), + item_id: serde_json::to_vec(&relation_op.relation_item).unwrap(), + group_id: serde_json::to_vec(&relation_op.relation_group).unwrap(), _params: vec![], } } - -impl OperationFactory for SyncManager { - fn get_clock(&self) -> &HLC { - &self.clock - } - - fn get_instance(&self) -> Uuid { - self.instance - } -} diff --git a/core/crates/sync/src/manager.rs b/core/crates/sync/src/manager.rs new file mode 100644 index 000000000..3df8a726a --- /dev/null +++ b/core/crates/sync/src/manager.rs @@ -0,0 +1,206 @@ +use sd_prisma::prisma::*; +use sd_sync::*; +use sd_utils::uuid_to_bytes; + +use crate::{db_operation::*, *}; +use std::{cmp::Ordering, ops::Deref, sync::Arc}; +use tokio::sync::{broadcast, mpsc}; +use uhlc::{HLCBuilder, HLC}; +use uuid::Uuid; + +pub struct Manager { + pub tx: broadcast::Sender, + pub ingest: ingest::Handler, + shared: Arc, +} + +pub struct SyncManagerNew { + pub manager: Manager, + pub rx: broadcast::Receiver, + pub ingest_rx: mpsc::Receiver, +} + +#[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq, Eq)] +pub struct GetOpsArgs { + pub clocks: Vec<(Uuid, NTP64)>, + pub count: u32, +} + +impl Manager { + pub fn new(db: &Arc, instance: Uuid) -> SyncManagerNew { + let (tx, rx) = broadcast::channel(64); + + let timestamps: Timestamps = Default::default(); + let clock = HLCBuilder::new().with_id(instance.into()).build(); + + let shared = Arc::new(SharedState { + db: db.clone(), + instance, + timestamps, + clock, + }); + + let (ingest, ingest_rx) = ingest::Actor::spawn(shared.clone()); + + SyncManagerNew { + manager: Self { shared, tx, ingest }, + rx, + ingest_rx, + } + } + + pub async fn write_ops<'item, I: prisma_client_rust::BatchItem<'item>>( + &self, + tx: &PrismaClient, + (_ops, queries): (Vec, I), + ) -> prisma_client_rust::Result<::ReturnValue> { + #[cfg(feature = "emit-messages")] + let res = { + macro_rules! variant { + ($var:ident, $variant:ident, $fn:ident) => { + let $var = _ops + .iter() + .filter_map(|op| match &op.typ { + CRDTOperationType::$variant(inner) => { + Some($fn(&op, &inner).to_query(tx)) + } + _ => None, + }) + .collect::>(); + }; + } + + variant!(shared, Shared, shared_op_db); + variant!(relation, Relation, relation_op_db); + + let (res, _) = tx._batch((queries, (shared, relation))).await?; + + self.tx.send(SyncMessage::Created).ok(); + + res + }; + #[cfg(not(feature = "emit-messages"))] + let res = tx._batch([queries]).await?.remove(0); + + Ok(res) + } + + #[allow(unused_variables)] + pub async fn write_op<'item, Q: prisma_client_rust::BatchItem<'item>>( + &self, + tx: &PrismaClient, + op: CRDTOperation, + query: Q, + ) -> prisma_client_rust::Result<::ReturnValue> { + #[cfg(feature = "emit-messages")] + let ret = { + macro_rules! exec { + ($fn:ident, $inner:ident) => { + tx._batch(($fn(&op, $inner).to_query(tx), query)).await?.1 + }; + } + + let ret = match &op.typ { + CRDTOperationType::Shared(inner) => exec!(shared_op_db, inner), + CRDTOperationType::Relation(inner) => exec!(relation_op_db, inner), + }; + + self.tx.send(SyncMessage::Created).ok(); + + ret + }; + #[cfg(not(feature = "emit-messages"))] + let ret = tx._batch(vec![query]).await?.remove(0); + + Ok(ret) + } + + pub async fn get_ops( + &self, + args: GetOpsArgs, + ) -> prisma_client_rust::Result> { + let db = &self.db; + + macro_rules! db_args { + ($args:ident, $op:ident) => { + vec![prisma_client_rust::operator::or( + $args + .clocks + .iter() + .map(|(instance_id, timestamp)| { + prisma_client_rust::and![ + $op::instance::is(vec![instance::pub_id::equals(uuid_to_bytes( + *instance_id + ))]), + $op::timestamp::gt(timestamp.as_u64() as i64) + ] + }) + .chain([ + $op::instance::is_not(vec![ + instance::pub_id::in_vec( + $args + .clocks + .iter() + .map(|(instance_id, _)| { + uuid_to_bytes(*instance_id) + }) + .collect() + ) + ]) + ]) + .collect(), + )] + }; + } + + let (shared, relation) = db + ._batch(( + db.shared_operation() + .find_many(db_args!(args, shared_operation)) + .take(args.count as i64) + .order_by(shared_operation::timestamp::order(SortOrder::Asc)) + .include(shared_include::include()), + db.relation_operation() + .find_many(db_args!(args, relation_operation)) + .take(args.count as i64) + .order_by(relation_operation::timestamp::order(SortOrder::Asc)) + .include(relation_include::include()), + )) + .await?; + + let mut ops: Vec<_> = [] + .into_iter() + .chain(shared.into_iter().map(DbOperation::Shared)) + .chain(relation.into_iter().map(DbOperation::Relation)) + .collect(); + + ops.sort_by(|a, b| match a.timestamp().cmp(&b.timestamp()) { + Ordering::Equal => a.instance().cmp(&b.instance()), + o => o, + }); + + Ok(ops + .into_iter() + .take(args.count as usize) + .map(DbOperation::into_operation) + .collect()) + } +} + +impl OperationFactory for Manager { + fn get_clock(&self) -> &HLC { + &self.clock + } + + fn get_instance(&self) -> Uuid { + self.instance + } +} + +impl Deref for Manager { + type Target = SharedState; + + fn deref(&self) -> &Self::Target { + &self.shared + } +} diff --git a/core/crates/sync/tests/lib.rs b/core/crates/sync/tests/lib.rs index d25b8c812..194eb3572 100644 --- a/core/crates/sync/tests/lib.rs +++ b/core/crates/sync/tests/lib.rs @@ -18,7 +18,7 @@ struct Instance { id: Uuid, _peer_id: sd_p2p::PeerId, db: Arc, - sync: Arc, + sync: Arc, } impl Instance { @@ -54,7 +54,7 @@ impl Instance { .await .unwrap(); - let sync = sd_core_sync::SyncManager::new(&db, id); + let sync = sd_core_sync::Manager::new(&db, id); ( Arc::new(Self { @@ -105,9 +105,6 @@ impl Instance { .exec() .await .unwrap(); - - left.sync.register_instance(right.id).await; - right.sync.register_instance(left.id).await; } } @@ -125,15 +122,9 @@ async fn bruh() -> Result<(), Box> { async move { while let Ok(msg) = sync_rx1.recv().await { match msg { - SyncMessage::Created => instance2 - .sync - .ingest - .events - .send(ingest::Event::Notification(ingest::NotificationEvent { - tunnel: todo!(), - })) - .await - .unwrap(), + SyncMessage::Created => { + instance2.sync.ingest.event_tx.send(todo!()).await.unwrap() + } _ => {} } } @@ -160,9 +151,11 @@ async fn bruh() -> Result<(), Box> { instance2 .sync .ingest - .events + .event_tx .send(ingest::Event::Messages(ingest::MessagesEvent { + tunnel: todo!(), messages, + has_more: false, instance_id: instance1.id, })) .await diff --git a/core/prisma/schema.prisma b/core/prisma/schema.prisma index 0df6ccbca..a4f7c0a23 100644 --- a/core/prisma/schema.prisma +++ b/core/prisma/schema.prisma @@ -6,7 +6,7 @@ datasource db { generator client { provider = "cargo prisma" output = "../../crates/prisma/src/prisma" - module_path = "sd_prisma::prisma" + module_path = "prisma" client_format = "folder" } @@ -91,6 +91,7 @@ model Instance { SharedOperation SharedOperation[] RelationOperation RelationOperation[] + locations Location[] @@map("instance") } @@ -141,7 +142,7 @@ model Location { date_created DateTime? instance_id Int? - // instance Instance? @relation(fields: [instance_id], references: [id]) // TODO: Enabling this breaks migration 7's `update_many` in `library/config.rs` + instance Instance? @relation(fields: [instance_id], references: [id], onDelete: SetNull) file_paths FilePath[] indexer_rules IndexerRulesInLocation[] diff --git a/core/src/lib.rs b/core/src/lib.rs index b6f56c6a8..2398ebe17 100644 --- a/core/src/lib.rs +++ b/core/src/lib.rs @@ -46,6 +46,8 @@ pub(crate) mod preferences; pub mod util; pub(crate) mod volume; +pub(crate) use sd_core_sync as sync; + /// Holds references to all the services that make up the Spacedrive core. /// This can easily be passed around as a context to the rest of the core. pub struct NodeServices { diff --git a/core/src/library/library.rs b/core/src/library/library.rs index f6aa9d1c6..bf85b91a6 100644 --- a/core/src/library/library.rs +++ b/core/src/library/library.rs @@ -6,6 +6,7 @@ use crate::{ location::file_path_helper::{file_path_to_full_path, IsolatedFilePathData}, object::{orphan_remover::OrphanRemoverActor, preview::get_thumbnail_path}, prisma::{file_path, location, PrismaClient}, + sync, util::{db::maybe_missing, error::FileIOError}, Node, NotificationManager, }; @@ -18,7 +19,7 @@ use std::{ }; use chrono::{DateTime, Utc}; -use sd_core_sync::{SyncManager, SyncMessage}; +use sd_core_sync::SyncMessage; use sd_p2p::spacetunnel::Identity; use sd_prisma::prisma::notification; use tokio::{fs, io, sync::broadcast}; @@ -42,7 +43,7 @@ pub struct LoadedLibrary { pub config: LibraryConfig, /// db holds the database client for the current library. pub db: Arc, - pub sync: Arc, + pub sync: Arc, /// key manager that provides encryption keys to functions that require them // pub key_manager: Arc, /// p2p identity @@ -78,7 +79,7 @@ impl LoadedLibrary { manager: Arc, node: &Arc, ) -> Arc { - let mut sync = SyncManager::new(&db, instance_id); + let mut sync = sync::Manager::new(&db, instance_id); let library = Arc::new(Self { id, @@ -106,24 +107,31 @@ impl LoadedLibrary { loop { tokio::select! { req = sync.ingest_rx.recv() => { - use sd_core_sync::ingest::Request; + use sd_core_sync::ingest; let Some(req) = req else { continue; }; + const OPS_PER_REQUEST: u32 = 100; + match req { - Request::Messages { tunnel, timestamps } => { - node.nlm.request_and_ingest_ops( - tunnel, - sd_core_sync::GetOpsArgs { clocks: timestamps, count: 100 }, - &library.sync, - library.id + ingest::Request::Messages { mut tunnel, timestamps } => { + let ops = library.node().nlm.request_ops( + &mut tunnel, + sd_core_sync::GetOpsArgs { clocks: timestamps, count: OPS_PER_REQUEST }, ).await; + + library.sync.ingest + .event_tx + .send(ingest::Event::Messages(ingest::MessagesEvent { + tunnel, + instance_id: library.sync.instance, + has_more: ops.len() == OPS_PER_REQUEST as usize, + messages: ops, + })) + .await + .expect("TODO: Handle ingest channel closed, so we don't loose ops"); }, - Request::Ingest(ops) => { - for op in ops.into_iter() { - library.sync.receive_crdt_operation(op).await; - } - } + _ => {} } }, msg = sync.rx.recv() => { diff --git a/core/src/location/indexer/mod.rs b/core/src/location/indexer/mod.rs index 851869dca..c7161df58 100644 --- a/core/src/location/indexer/mod.rs +++ b/core/src/location/indexer/mod.rs @@ -110,7 +110,7 @@ async fn execute_indexer_save_step( ( location::NAME, json!(prisma_sync::location::SyncId { - pub_id: pub_id.clone() + pub_id: location.pub_id.clone() }), ), location_id::set(Some(location.id)), diff --git a/core/src/location/mod.rs b/core/src/location/mod.rs index c202cb3d8..8eb4def27 100644 --- a/core/src/location/mod.rs +++ b/core/src/location/mod.rs @@ -24,6 +24,7 @@ use normpath::PathExt; use prisma_client_rust::{operator::and, or, QueryError}; use sd_prisma::prisma_sync; use sd_sync::*; +use sd_utils::uuid_to_bytes; use serde::Deserialize; use serde_json::json; use specta::Type; @@ -600,10 +601,9 @@ async fn create_location( (location::path::NAME, json!(&location_path)), (location::date_created::NAME, json!(date_created)), ( - location::instance_id::NAME, + location::instance::NAME, json!(prisma_sync::instance::SyncId { - pub_id: vec![], - // id: library.config.instance_id, + pub_id: uuid_to_bytes(library.sync.instance) }), ), ], @@ -741,7 +741,7 @@ impl From for location::Data { date_created: data.date_created, file_paths: None, indexer_rules: None, - // instance: None, + instance: None, } } } @@ -763,7 +763,7 @@ impl From<&location_with_indexer_rules::Data> for location::Data { date_created: data.date_created, file_paths: None, indexer_rules: None, - // instance: None, + instance: None, } } } diff --git a/core/src/object/file_identifier/mod.rs b/core/src/object/file_identifier/mod.rs index 301a89e0e..d21000e8d 100644 --- a/core/src/object/file_identifier/mod.rs +++ b/core/src/object/file_identifier/mod.rs @@ -9,7 +9,6 @@ use crate::{ util::{db::maybe_missing, error::FileIOError}, }; -use sd_core_sync::SyncManager; use sd_file_ext::{extensions::Extension, kind::ObjectKind}; use sd_prisma::prisma_sync; use sd_sync::{CRDTOperation, OperationFactory}; @@ -308,7 +307,7 @@ async fn identifier_job_step( fn file_path_object_connect_ops<'db>( file_path_id: Uuid, object_id: Uuid, - sync: &SyncManager, + sync: &crate::sync::Manager, db: &'db PrismaClient, ) -> (CRDTOperation, file_path::UpdateQuery<'db>) { #[cfg(debug_assertions)] diff --git a/core/src/p2p/p2p_manager.rs b/core/src/p2p/p2p_manager.rs index 111ce82fa..e0a617ba7 100644 --- a/core/src/p2p/p2p_manager.rs +++ b/core/src/p2p/p2p_manager.rs @@ -259,6 +259,7 @@ impl P2PManager { } Header::Sync(library_id) => { // Header -> Tunnel -> SyncMessage + use sd_core_sync::ingest; let mut tunnel = Tunnel::responder(stream).await.unwrap(); @@ -276,16 +277,16 @@ impl P2PManager { SyncMessage::NewOperations => { // The ends up in `NetworkedLibraryManager::request_and_ingest_ops`. // TODO: Throw tunnel around like this makes it soooo confusing. - ingest.notify(tunnel, event.peer_id).await; + ingest + .event_tx + .send(ingest::Event::Notification( + ingest::NotificationEvent { tunnel }, + )) + .await + .ok(); } SyncMessage::OperationsRequest(_) => { - nlm.exchange_sync_ops( - tunnel, - &event.peer_id, - library_id, - &library.sync, - ) - .await; + todo!("this should be received somewhere else!"); } SyncMessage::OperationsRequestResponse(_) => { todo!("unreachable but add proper error handling") diff --git a/core/src/p2p/pairing/initial_sync.rs b/core/src/p2p/pairing/initial_sync.rs deleted file mode 100644 index 7f87d0c20..000000000 --- a/core/src/p2p/pairing/initial_sync.rs +++ /dev/null @@ -1,376 +0,0 @@ -use sd_prisma::prisma::*; - -// TODO: Turn this entire file into a Prisma generator cause it could be way more maintainable - -// Pairing will fail if the two clients aren't on versions with identical DB models so it's safe to send them and ignore migrations. - -const ITEMS_PER_BATCH: i64 = 1000; - -macro_rules! impl_for_models { - ($($variant:ident($model:ident)),* $(,)+) => { - /// Represents any DB model to be ingested into the database as part of the initial sync - #[derive(Debug, serde::Serialize, serde::Deserialize)] - pub enum ModelData { - $( - $variant(Vec<$model::Data>), - )* - } - - impl ModelData { - /// Length of data - pub fn len(&self) -> usize { - match self { - $( - Self::$variant(data) => data.len(), - )* - } - } - - /// Get count of all of the rows in the database - pub async fn total_count(db: &PrismaClient) -> Result { - let mut total_count = 0; - - let ($( $model ),*) = tokio::join!( - $( - db.$model().count(vec![]).exec(), - )* - ); - - $(total_count += $model?;)* - Ok(total_count) - } - - /// Insert the data into the database - pub async fn insert(self, db: &PrismaClient) -> Result<(), prisma_client_rust::QueryError> { - match self { - $( - Self::$variant(data) => { - // TODO: Prisma Client Rust is broke - // db.$model().create_many(data.into_iter().map(|v| FromData(v).into()).collect()).exec().await?; - - for i in data { - $model::CreateUnchecked::from(FromData(i)).to_query(db).exec().await?; - } - } - )* - } - - Ok(()) - } - - pub fn model_name(&self) -> &'static str { - match self { - $( - Self::$variant(_) => stringify!($model), - )* - } - } - } - - /// This exists to determine the next model to sync. - /// It emulates `.window()` functionality but for a `macro_rules` - // TODO: When replacing with a generator this can be removed and done at compile time - #[derive(Debug)] - enum ModelSyncCursorIterator { - Done = 0, - $( - $variant, - )* - } - - impl<'a> From<&'a ModelSyncCursor> for ModelSyncCursorIterator { - fn from(cursor: &'a ModelSyncCursor) -> Self { - match cursor { - $( - ModelSyncCursor::$variant(_) => Self::$variant, - )* - ModelSyncCursor::Done => Self::Done, - } - } - } - - impl ModelSyncCursorIterator { - pub fn next(self) -> ModelSyncCursor { - let i = self as i32; - match i + 1 { - $( - v if v == Self::$variant as i32 => ModelSyncCursor::$variant(0), - )* - _ => ModelSyncCursor::Done, - } - } - } - - /// Represent where we ar eup to with the sync - #[derive(Debug, serde::Serialize, serde::Deserialize)] - pub enum ModelSyncCursor { - $( - $variant(i64), - )* - Done, - } - - impl ModelSyncCursor { - pub fn new() -> Self { - new_impl!($( $variant ),*) - } - - pub async fn next(&mut self, db: &PrismaClient) -> Option> { - match self { - $( - Self::$variant(cursor) => { - match db.$model() - .find_many(vec![]) - .skip(*cursor) - .take(ITEMS_PER_BATCH + 1) - .exec() - .await { - Ok(data) => { - if data.len() <= ITEMS_PER_BATCH as usize { - *self = ModelSyncCursorIterator::from(&*self).next(); - } else { - *self = Self::$variant(*cursor + ITEMS_PER_BATCH); - } - - Some(Ok(ModelData::$variant(data))) - }, - Err(e) => return Some(Err(e)), - } - }, - )* - Self::Done => None - } - } - } - }; -} - -macro_rules! new_impl { - ($x:ident, $($y:ident),+) => { - Self::$x(0) - }; -} - -impl PartialEq for ModelData { - // Crude EQ impl based only on ID's not struct content. - // It's super annoying PCR does have this impl but it kinda makes sense with relation fetching. - fn eq(&self, other: &Self) -> bool { - match (self, other) { - (ModelData::SharedOperation(a), ModelData::SharedOperation(b)) => a - .iter() - .map(|x| x.id.clone()) - .eq(b.iter().map(|x| x.id.clone())), - (ModelData::Volume(a), ModelData::Volume(b)) => { - a.iter().map(|x| x.id).eq(b.iter().map(|x| x.id)) - } - (ModelData::Location(a), ModelData::Location(b)) => { - a.iter().map(|x| x.id).eq(b.iter().map(|x| x.id)) - } - (ModelData::FilePath(a), ModelData::FilePath(b)) => { - a.iter().map(|x| x.id).eq(b.iter().map(|x| x.id)) - } - (ModelData::Object(a), ModelData::Object(b)) => { - a.iter().map(|x| x.id).eq(b.iter().map(|x| x.id)) - } - (ModelData::Tag(a), ModelData::Tag(b)) => { - a.iter().map(|x| x.id).eq(b.iter().map(|x| x.id)) - } - (ModelData::TagOnObject(a), ModelData::TagOnObject(b)) => a - .iter() - .map(|x| (x.tag_id, x.object_id)) - .eq(b.iter().map(|x| (x.tag_id, x.object_id))), - (ModelData::IndexerRule(a), ModelData::IndexerRule(b)) => { - a.iter().map(|x| x.id).eq(b.iter().map(|x| x.id)) - } - (ModelData::IndexerRulesInLocation(a), ModelData::IndexerRulesInLocation(b)) => a - .iter() - .map(|x| (x.location_id, x.indexer_rule_id)) - .eq(b.iter().map(|x| (x.location_id, x.indexer_rule_id))), - (ModelData::Preference(a), ModelData::Preference(b)) => a - .iter() - .map(|x| (x.key.clone(), x.value.clone())) - .eq(b.iter().map(|x| (x.key.clone(), x.value.clone()))), - _ => false, - } - } -} - -/// Meaningless wrapper to avoid Rust's orphan rule -struct FromData(T); - -impl From> for shared_operation::CreateUnchecked { - fn from(FromData(data): FromData) -> Self { - Self { - id: data.id, - timestamp: data.timestamp, - model: data.model, - record_id: data.record_id, - kind: data.kind, - data: data.data, - instance_id: data.instance_id, - _params: vec![], - } - } -} - -impl From> for volume::CreateUnchecked { - fn from(FromData(data): FromData) -> Self { - Self { - name: data.name, - mount_point: data.mount_point, - _params: vec![ - volume::id::set(data.id), - volume::total_bytes_capacity::set(data.total_bytes_capacity), - volume::total_bytes_available::set(data.total_bytes_available), - volume::disk_type::set(data.disk_type), - volume::filesystem::set(data.filesystem), - volume::is_system::set(data.is_system), - volume::date_modified::set(data.date_modified), - ], - } - } -} - -impl From> for location::CreateUnchecked { - fn from(FromData(data): FromData) -> Self { - Self { - pub_id: data.pub_id, - _params: vec![ - location::id::set(data.id), - location::name::set(data.name), - location::path::set(data.path), - location::total_capacity::set(data.total_capacity), - location::available_capacity::set(data.available_capacity), - location::is_archived::set(data.is_archived), - location::generate_preview_media::set(data.generate_preview_media), - location::sync_preview_media::set(data.sync_preview_media), - location::hidden::set(data.hidden), - location::date_created::set(data.date_created), - location::instance_id::set(data.instance_id), - ], - } - } -} - -impl From> for file_path::CreateUnchecked { - fn from(FromData(data): FromData) -> Self { - Self { - pub_id: data.pub_id, - _params: vec![ - file_path::id::set(data.id), - file_path::is_dir::set(data.is_dir), - file_path::cas_id::set(data.cas_id), - file_path::integrity_checksum::set(data.integrity_checksum), - file_path::location_id::set(data.location_id), - file_path::materialized_path::set(data.materialized_path), - file_path::name::set(data.name), - file_path::extension::set(data.extension), - file_path::size_in_bytes::set(data.size_in_bytes), - file_path::size_in_bytes_bytes::set(data.size_in_bytes_bytes), - file_path::inode::set(data.inode), - file_path::device::set(data.device), - file_path::object_id::set(data.object_id), - file_path::key_id::set(data.key_id), - file_path::date_created::set(data.date_created), - file_path::date_modified::set(data.date_modified), - file_path::date_indexed::set(data.date_indexed), - ], - } - } -} - -impl From> for object::CreateUnchecked { - fn from(FromData(data): FromData) -> Self { - Self { - pub_id: data.pub_id, - _params: vec![ - object::id::set(data.id), - object::kind::set(data.kind), - object::key_id::set(data.key_id), - object::hidden::set(data.hidden), - object::favorite::set(data.favorite), - object::important::set(data.important), - object::note::set(data.note), - object::date_created::set(data.date_created), - object::date_accessed::set(data.date_accessed), - ], - } - } -} - -impl From> for tag::CreateUnchecked { - fn from(FromData(data): FromData) -> Self { - Self { - pub_id: data.pub_id, - _params: vec![ - tag::id::set(data.id), - tag::name::set(data.name), - tag::color::set(data.color), - tag::redundancy_goal::set(data.redundancy_goal), - tag::date_created::set(data.date_created), - tag::date_modified::set(data.date_modified), - ], - } - } -} - -impl From> for tag_on_object::CreateUnchecked { - fn from(FromData(data): FromData) -> Self { - Self { - tag_id: data.tag_id, - object_id: data.object_id, - _params: vec![], - } - } -} - -impl From> for indexer_rule::CreateUnchecked { - fn from(FromData(data): FromData) -> Self { - Self { - pub_id: data.pub_id, - _params: vec![ - indexer_rule::id::set(data.id), - indexer_rule::name::set(data.name), - indexer_rule::default::set(data.default), - indexer_rule::rules_per_kind::set(data.rules_per_kind), - indexer_rule::date_created::set(data.date_created), - indexer_rule::date_modified::set(data.date_modified), - ], - } - } -} - -impl From> - for indexer_rules_in_location::CreateUnchecked -{ - fn from(FromData(data): FromData) -> Self { - Self { - location_id: data.location_id, - indexer_rule_id: data.indexer_rule_id, - _params: vec![], - } - } -} - -impl From> for preference::CreateUnchecked { - fn from(FromData(data): FromData) -> Self { - Self { - key: data.key, - _params: vec![preference::value::set(data.value)], - } - } -} - -// Ensure you order the models to Foreign Keys are created before the models that reference them. -impl_for_models! { - Object(object), - SharedOperation(shared_operation), - Volume(volume), - Location(location), - FilePath(file_path), - Tag(tag), - TagOnObject(tag_on_object), - IndexerRule(indexer_rule), - IndexerRulesInLocation(indexer_rules_in_location), - Preference(preference), -} diff --git a/core/src/p2p/pairing/mod.rs b/core/src/p2p/pairing/mod.rs index dc66c0439..62f0e68cd 100644 --- a/core/src/p2p/pairing/mod.rs +++ b/core/src/p2p/pairing/mod.rs @@ -22,10 +22,8 @@ use tokio::{ use tracing::{error, info}; use uuid::Uuid; -mod initial_sync; mod proto; -pub use initial_sync::*; use proto::*; use crate::{ @@ -79,7 +77,157 @@ impl PairingManager { node_config: NodeConfig, library_manager: Arc, ) -> u16 { - todo!(); + // TODO: Timeout for max number of pairings in a time period + + let pairing_id = self.id.fetch_add(1, Ordering::SeqCst); + self.emit_progress(pairing_id, PairingStatus::EstablishingConnection); + + info!("Beginning pairing '{pairing_id}' as originator to remote peer '{peer_id}'"); + + tokio::spawn(async move { + let mut stream = self.manager.stream(peer_id).await.unwrap(); + stream.write_all(&Header::Pair.to_bytes()).await.unwrap(); + + // TODO: Ensure both clients are on a compatible version cause Prisma model changes will cause issues + + // 1. Create new instance for originator and send it to the responder + self.emit_progress(pairing_id, PairingStatus::PairingRequested); + let now = Utc::now(); + let identity = Identity::new(); + let self_instance_id = Uuid::new_v4(); + let req = PairingRequest(Instance { + id: self_instance_id, + identity: identity.to_remote_identity(), + node_id: node_config.id, + node_name: node_config.name.clone(), + node_platform: Platform::current(), + last_seen: now, + date_created: now, + }); + stream.write_all(&req.to_bytes()).await.unwrap(); + + // 2. + match PairingResponse::from_stream(&mut stream).await.unwrap() { + PairingResponse::Accepted { + library_id, + library_name, + library_description, + instances, + } => { + info!("Pairing '{pairing_id}' accepted by remote into library '{library_id}'"); + // TODO: Log all instances and library info + self.emit_progress( + pairing_id, + PairingStatus::PairingInProgress { + library_name: library_name.clone(), + library_description: library_description.clone(), + }, + ); + + // TODO: Future - Library in pairing state + // TODO: Create library + + if library_manager + .get_all_libraries() + .await + .into_iter() + .find(|i| i.id == library_id) + .is_some() + { + self.emit_progress(pairing_id, PairingStatus::LibraryAlreadyExists); + + // TODO: Properly handle this at a protocol level so the error is on both sides + + return; + } + + let (this, instances): (Vec<_>, Vec<_>) = instances + .into_iter() + .partition(|i| i.id == self_instance_id); + + if this.len() != 1 { + todo!("error handling"); + } + let this = this.first().expect("unreachable"); + if this.identity != identity.to_remote_identity() { + todo!("error handling. Something went really wrong!"); + } + + let library = library_manager + .create_with_uuid( + library_id, + LibraryName::new(library_name).unwrap(), + library_description, + node_config, + false, // We will sync everything which will conflict with the seeded stuff + Some(instance::Create { + pub_id: this.id.as_bytes().to_vec(), + identity: IdentityOrRemoteIdentity::Identity(identity).to_bytes(), + node_id: this.node_id.as_bytes().to_vec(), + node_name: this.node_name.clone(), // TODO: Remove `clone` + node_platform: this.node_platform as i32, + last_seen: this.last_seen.into(), + date_created: this.date_created.into(), + // timestamp: Default::default(), // TODO: Source this properly! + _params: vec![], + }), + ) + .await + .unwrap(); + + let library = library_manager.get_library(&library.id).await.unwrap(); + + library + .db + .instance() + .create_many( + instances + .into_iter() + .map(|i| { + instance::CreateUnchecked { + pub_id: i.id.as_bytes().to_vec(), + identity: IdentityOrRemoteIdentity::RemoteIdentity( + i.identity, + ) + .to_bytes(), + node_id: i.node_id.as_bytes().to_vec(), + node_name: i.node_name, + node_platform: i.node_platform as i32, + last_seen: i.last_seen.into(), + date_created: i.date_created.into(), + // timestamp: Default::default(), // TODO: Source this properly! + _params: vec![], + } + }) + .collect(), + ) + .exec() + .await + .unwrap(); + + // Called again so the new instances are picked up + library_manager.node.nlm.load_library(&library).await; + + P2PManager::resync( + library_manager.node.nlm.clone(), + &mut stream, + peer_id, + self.metadata_manager.get().instances, + ) + .await; + + // TODO: Done message to frontend + self.emit_progress(pairing_id, PairingStatus::PairingComplete(library_id)); + stream.flush().await.unwrap(); + } + PairingResponse::Rejected => { + info!("Pairing '{pairing_id}' rejected by remote"); + self.emit_progress(pairing_id, PairingStatus::PairingRejected); + } + } + }); + + pairing_id } pub async fn responder( @@ -88,7 +236,116 @@ impl PairingManager { mut stream: impl AsyncRead + AsyncWrite + Unpin, library_manager: &LibraryManager, ) { - todo!(); + let pairing_id = self.id.fetch_add(1, Ordering::SeqCst); + self.emit_progress(pairing_id, PairingStatus::EstablishingConnection); + + info!("Beginning pairing '{pairing_id}' as responder to remote peer '{peer_id}'"); + + let remote_instance = PairingRequest::from_stream(&mut stream).await.unwrap().0; + self.emit_progress(pairing_id, PairingStatus::PairingDecisionRequest); + self.events_tx + .send(P2PEvent::PairingRequest { + id: pairing_id, + name: remote_instance.node_name.clone(), + os: remote_instance.node_platform.clone().into(), + }) + .ok(); + + // Prompt the user and wait + // TODO: After 1 minute remove channel from map and assume it was rejected + let (tx, rx) = oneshot::channel(); + self.pairing_response + .write() + .unwrap() + .insert(pairing_id, tx); + let PairingDecision::Accept(library_id) = rx.await.unwrap() else { + info!("The user rejected pairing '{pairing_id}'!"); + // self.emit_progress(pairing_id, PairingStatus::PairingRejected); // TODO: Event to remove from frontend index + stream.write_all(&PairingResponse::Rejected.to_bytes()).await.unwrap(); + return; + }; + info!("The user accepted pairing '{pairing_id}' for library '{library_id}'!"); + + let library = library_manager.get_library(&library_id).await.unwrap(); + + // TODO: Rollback this on pairing failure + instance::Create { + pub_id: remote_instance.id.as_bytes().to_vec(), + identity: IdentityOrRemoteIdentity::RemoteIdentity(remote_instance.identity.clone()) + .to_bytes(), + node_id: remote_instance.node_id.as_bytes().to_vec(), + node_name: remote_instance.node_name, + node_platform: remote_instance.node_platform as i32, + last_seen: remote_instance.last_seen.into(), + date_created: remote_instance.date_created.into(), + // timestamp: Default::default(), // TODO: Source this properly! + _params: vec![], + } + .to_query(&library.db) + .exec() + .await + .unwrap(); + + stream + .write_all( + &PairingResponse::Accepted { + library_id: library.id, + library_name: library.config.name.clone().into(), + library_description: library.config.description.clone(), + instances: library + .db + .instance() + .find_many(vec![]) + .exec() + .await + .unwrap() + .into_iter() + .map(|i| Instance { + id: Uuid::from_slice(&i.pub_id).unwrap(), + identity: IdentityOrRemoteIdentity::from_bytes(&i.identity) + .unwrap() + .remote_identity(), + node_id: Uuid::from_slice(&i.node_id).unwrap(), + node_name: i.node_name, + node_platform: Platform::try_from(i.node_platform as u8) + .unwrap_or(Platform::Unknown), + last_seen: i.last_seen.into(), + date_created: i.date_created.into(), + }) + .collect(), + } + .to_bytes(), + ) + .await + .unwrap(); + + // TODO: Pairing confirmation + rollback + + // Called again so the new instances are picked up + library_manager.node.nlm.load_library(&library).await; + + let Header::Connected(remote_identities) = Header::from_stream(&mut stream).await.unwrap() else { + todo!("unreachable; todo error handling"); + }; + + P2PManager::resync_handler( + library_manager.node.nlm.clone(), + &mut stream, + peer_id, + self.metadata_manager.get().instances, + remote_identities, + ) + .await; + + self.emit_progress(pairing_id, PairingStatus::PairingComplete(library_id)); + + library_manager + .node + .nlm + .alert_new_ops(library_id, library.sync.clone()) + .await; + + stream.flush().await.unwrap(); } } diff --git a/core/src/p2p/pairing/proto.rs b/core/src/p2p/pairing/proto.rs index c46270c18..27313d86d 100644 --- a/core/src/p2p/pairing/proto.rs +++ b/core/src/p2p/pairing/proto.rs @@ -10,8 +10,6 @@ use uuid::Uuid; use crate::node::Platform; -use super::ModelData; - /// Terminology: /// Instance - DB model which represents a single `.db` file. /// Originator - begins the pairing process and is asking to join a library that will be selected by the responder. @@ -62,19 +60,6 @@ pub enum PairingConfirmation { Error, } -/// 4. Sync the data in the database with the originator. -/// Sent `Responder` -> `Originator`. -#[derive(Debug, PartialEq)] -pub enum SyncData { - Data { - /// Only included in first request and is an **estimate** of how many models will be sent. - /// It will likely be wrong so should be constrained to being used for UI purposes only. - total_models: Option, - data: ModelData, - }, - Finished, -} - impl Instance { pub async fn from_stream( stream: &mut (impl AsyncRead + Unpin), @@ -222,50 +207,6 @@ impl PairingConfirmation { } } -impl SyncData { - pub async fn from_stream( - stream: &mut (impl AsyncRead + Unpin), - ) -> Result { - let discriminator = stream - .read_u8() - .await - .map_err(|e| ("discriminator", e.into()))?; - - match discriminator { - 0 => Ok(Self::Data { - total_models: match stream - .read_i64_le() - .await - .map_err(|e| ("total_models", e.into()))? - { - 0 => None, - n => Some(n), - }, - data: rmp_serde::from_slice(&decode::buf(stream).await.map_err(|e| ("data", e))?) - .unwrap(), // TODO: Error handling - }), - 1 => Ok(Self::Finished), - _ => todo!(), // TODO: Error handling - } - } - - pub fn to_bytes(&self) -> Result, rmp_serde::encode::Error> { - let mut buf = Vec::new(); - match self { - Self::Data { total_models, data } => { - buf.push(0); - buf.extend((total_models.unwrap_or(0) as i64).to_le_bytes()); - encode::buf(&mut buf, &rmp_serde::to_vec_named(data)?); - } - Self::Finished => { - buf.push(1); - } - } - - Ok(buf) - } -} - #[cfg(test)] mod tests { use sd_p2p::spacetunnel::Identity; @@ -342,24 +283,5 @@ mod tests { let result = PairingConfirmation::from_stream(&mut cursor).await.unwrap(); assert_eq!(original, result); } - - { - let original = SyncData::Data { - total_models: Some(123), - data: ModelData::Location(vec![]), - }; - - let mut cursor = std::io::Cursor::new(original.to_bytes().unwrap()); - let result = SyncData::from_stream(&mut cursor).await.unwrap(); - assert_eq!(original, result); - } - - { - let original = SyncData::Finished; - - let mut cursor = std::io::Cursor::new(original.to_bytes().unwrap()); - let result = SyncData::from_stream(&mut cursor).await.unwrap(); - assert_eq!(original, result); - } } } diff --git a/core/src/p2p/sync/mod.rs b/core/src/p2p/sync/mod.rs index db741be06..6a94d3a15 100644 --- a/core/src/p2p/sync/mod.rs +++ b/core/src/p2p/sync/mod.rs @@ -1,7 +1,5 @@ use std::{collections::HashMap, sync::Arc}; -use futures::future::join_all; -use sd_core_sync::{ingest, GetOpsArgs, SyncManager}; use sd_p2p::{ spacetunnel::{RemoteIdentity, Tunnel}, DiscoveredPeer, PeerId, @@ -17,6 +15,7 @@ use super::{Header, IdentityOrRemoteIdentity, P2PManager, PeerMetadata}; mod proto; pub use proto::*; +#[derive(Debug, Clone, Copy)] pub enum InstanceState { Unavailable, Discovered(PeerId), @@ -201,85 +200,93 @@ impl NetworkedLibraryManager { } // TODO: Error handling - pub async fn alert_new_ops(&self, library_id: Uuid, sync: &Arc) { + pub async fn alert_new_ops(&self, library_id: Uuid, sync: Arc) { debug!("NetworkedLibraryManager::alert_new_ops({library_id})"); - join_all( - self.libraries - .read() - .await - .get(&library_id) - .unwrap() - .instances - .iter() - .filter_map(|(_, i)| match i { - InstanceState::Connected(peer_id) => Some(peer_id), - _ => None, - }) - // TODO: Deduplicate any duplicate peer ids -> This is an edge case but still - .map(|peer_id| { - let p2p = self.p2p.clone(); - async move { - debug!("Alerting peer '{peer_id:?}' of new sync events for library '{library_id:?}'"); + let libraries = self.libraries.read().await; + let library = libraries.get(&library_id).unwrap(); - let mut stream = - p2p.manager.stream(*peer_id).await.map_err(|_| ()).unwrap(); // TODO: handle providing incorrect peer id + // libraries only connecting one-way atm + dbg!(&library.instances); - stream - .write_all(&Header::Sync(library_id).to_bytes()) - .await - .unwrap(); + // TODO: Deduplicate any duplicate peer ids -> This is an edge case but still + for (_, instance) in &library.instances { + let InstanceState::Connected(peer_id) = *instance else { + continue; + }; - let mut tunnel = Tunnel::initiator(stream).await.unwrap(); + let sync = sync.clone(); + let p2p = self.p2p.clone(); - tunnel - .write_all(&SyncMessage::NewOperations.to_bytes()) - .await - .unwrap(); - tunnel.flush().await.unwrap(); + tokio::spawn(async move { + debug!( + "Alerting peer '{peer_id:?}' of new sync events for library '{library_id:?}'" + ); - let id = match SyncMessage::from_stream(&mut tunnel).await.unwrap() { - SyncMessage::OperationsRequest(resp) => resp, - _ => todo!("unreachable but proper error handling"), - }; + let mut stream = p2p + .manager + .stream(peer_id.clone()) + .await + .map_err(|_| ()) + .unwrap(); // TODO: handle providing incorrect peer id - self.exchange_sync_ops(tunnel, peer_id, library_id, sync) - .await; - } - }), - ) - .await; + stream + .write_all(&Header::Sync(library_id).to_bytes()) + .await + .unwrap(); + + let mut tunnel = Tunnel::initiator(stream).await.unwrap(); + + tunnel + .write_all(&SyncMessage::NewOperations.to_bytes()) + .await + .unwrap(); + tunnel.flush().await.unwrap(); + + while let Ok(SyncMessage::OperationsRequest(args)) = + SyncMessage::from_stream(&mut tunnel).await + { + // let args = match .unwrap() { + // => resp, + // _ => todo!("unreachable but proper error handling"), + // }; + + let ops = sync.get_ops(args).await.unwrap(); + + debug!( + "Sending '{}' sync ops from peer '{peer_id:?}' for library '{library_id:?}'", + ops.len() + ); + + tunnel + .write_all(&SyncMessage::OperationsRequestResponse(ops).to_bytes()) + .await + .unwrap(); + tunnel.flush().await.unwrap(); + } + }); + } } // Ask the remote for operations and then ingest them - pub async fn request_and_ingest_ops( + pub async fn request_ops( &self, - mut tunnel: Tunnel, + tunnel: &mut Tunnel, args: GetOpsArgs, - sync: &SyncManager, - library_id: Uuid, - ) { + ) -> Vec { tunnel .write_all(&SyncMessage::OperationsRequest(args).to_bytes()) .await .unwrap(); tunnel.flush().await.unwrap(); - let SyncMessage::OperationsRequestResponse(ops) = SyncMessage::from_stream(&mut tunnel).await.unwrap() else { + let SyncMessage::OperationsRequestResponse(ops) = SyncMessage::from_stream(tunnel).await.unwrap() else { todo!("unreachable but proper error handling") }; // debug!("Received sync events response w/ id '{id}' from peer '{peer_id:?}' for library '{library_id:?}'"); - sync.ingest - .events - .send(ingest::Event::Messages(ingest::MessagesEvent { - instance_id: sync.instance, - messages: ops, - })) - .await - .map_err(|_| "TODO: Handle ingest channel closed, so we don't loose ops") - .unwrap(); + ops } // TODO: Error handling @@ -288,15 +295,10 @@ impl NetworkedLibraryManager { mut tunnel: Tunnel, peer_id: &PeerId, library_id: Uuid, - sync: &SyncManager, + sync: &sync::Manager, + args: GetOpsArgs, ) { - let ops = sync - .get_ops(sd_core_sync::GetOpsArgs { - clocks: vec![], - count: 100, - }) - .await - .unwrap(); + let ops = sync.get_ops(args).await.unwrap(); debug!( "Sending '{}' sync ops from peer '{peer_id:?}' for library '{library_id:?}'", diff --git a/interface/app/p2p/pairing.tsx b/interface/app/p2p/pairing.tsx index d890a8252..287aff645 100644 --- a/interface/app/p2p/pairing.tsx +++ b/interface/app/p2p/pairing.tsx @@ -47,7 +47,6 @@ function OriginatorDialog({ ctaLabel="Done" // closeLabel="Cancel" onSubmit={async () => { - alert('TODO'); // TODO: Change into the new library }} // onCancelled={() => acceptSpacedrop.mutate([props.dropId, null])}