From 72b65063be2d120be8c0ecbadd4b64fd1aab542d Mon Sep 17 00:00:00 2001 From: Romulus21 Date: Sat, 28 Sep 2024 00:52:51 +0200 Subject: [PATCH] working proto --- .gitignore | 1 + Cargo.lock | 2442 +++++++++-------- Cargo.toml | 77 +- Makefile.toml | 4 - README.md | 8 +- migrations/20221207194615_init.up.sql | 9 + .../20221118172000_create_todo_table.sql | 6 - src/app.rs | 48 +- src/database.rs | 26 + src/lib.rs | 16 +- src/main.rs | 79 +- src/models/mod.rs | 3 + src/models/value.rs | 81 + src/routes/mod.rs | 3 + src/routes/value.rs | 51 + src/setup.rs | 49 + src/todo.rs | 172 -- src/values.rs | 118 - style.css | 3 - style/output.css | 79 +- 20 files changed, 1706 insertions(+), 1569 deletions(-) delete mode 100644 Makefile.toml create mode 100644 migrations/20221207194615_init.up.sql delete mode 100644 migrations/examples/todo_app_sqlite/migrations/20221118172000_create_todo_table.sql create mode 100644 src/database.rs create mode 100644 src/models/mod.rs create mode 100644 src/models/value.rs create mode 100644 src/routes/mod.rs create mode 100644 src/routes/value.rs create mode 100644 src/setup.rs delete mode 100644 src/todo.rs delete mode 100644 src/values.rs delete mode 100644 style.css diff --git a/.gitignore b/.gitignore index 78ccf8f..b84e84a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ Todos.db target/ style/output.css +.env diff --git a/Cargo.lock b/Cargo.lock index 2a7b4ae..4a7695b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,212 +2,6 @@ # It is not intended for manual editing. version = 3 -[[package]] -name = "actix-codec" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f7b0a21988c1bf877cf4759ef5ddaac04c1c9fe808c9142ecb78ba97d97a28a" -dependencies = [ - "bitflags 2.6.0", - "bytes", - "futures-core", - "futures-sink", - "memchr", - "pin-project-lite", - "tokio", - "tokio-util", - "tracing", -] - -[[package]] -name = "actix-files" -version = "0.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0773d59061dedb49a8aed04c67291b9d8cf2fe0b60130a381aab53c6dd86e9be" -dependencies = [ - "actix-http", - "actix-service", - "actix-utils", - "actix-web", - "bitflags 2.6.0", - "bytes", - "derive_more", - "futures-core", - "http-range", - "log", - "mime", - "mime_guess", - "percent-encoding", - "pin-project-lite", - "v_htmlescape", -] - -[[package]] -name = "actix-http" -version = "3.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d48f96fc3003717aeb9856ca3d02a8c7de502667ad76eeacd830b48d2e91fac4" -dependencies = [ - "actix-codec", - "actix-rt", - "actix-service", - "actix-utils", - "ahash", - "base64", - "bitflags 2.6.0", - "brotli", - "bytes", - "bytestring", - "derive_more", - "encoding_rs", - "flate2", - "futures-core", - "h2", - "http 0.2.12", - "httparse", - "httpdate", - "itoa", - "language-tags", - "local-channel", - "mime", - "percent-encoding", - "pin-project-lite", - "rand", - "sha1", - "smallvec", - "tokio", - "tokio-util", - "tracing", - "zstd", -] - -[[package]] -name = "actix-macros" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e01ed3140b2f8d422c68afa1ed2e85d996ea619c988ac834d255db32138655cb" -dependencies = [ - "quote", - "syn", -] - -[[package]] -name = "actix-router" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13d324164c51f63867b57e73ba5936ea151b8a41a1d23d1031eeb9f70d0236f8" -dependencies = [ - "bytestring", - "cfg-if 1.0.0", - "http 0.2.12", - "regex", - "regex-lite", - "serde", - "tracing", -] - -[[package]] -name = "actix-rt" -version = "2.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24eda4e2a6e042aa4e55ac438a2ae052d3b5da0ecf83d7411e1a368946925208" -dependencies = [ - "futures-core", - "tokio", -] - -[[package]] -name = "actix-server" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ca2549781d8dd6d75c40cf6b6051260a2cc2f3c62343d761a969a0640646894" -dependencies = [ - "actix-rt", - "actix-service", - "actix-utils", - "futures-core", - "futures-util", - "mio", - "socket2", - "tokio", - "tracing", -] - -[[package]] -name = "actix-service" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b894941f818cfdc7ccc4b9e60fa7e53b5042a2e8567270f9147d5591893373a" -dependencies = [ - "futures-core", - "paste", - "pin-project-lite", -] - -[[package]] -name = "actix-utils" -version = "3.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88a1dcdff1466e3c2488e1cb5c36a71822750ad43839937f85d2f4d9f8b705d8" -dependencies = [ - "local-waker", - "pin-project-lite", -] - -[[package]] -name = "actix-web" -version = "4.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9180d76e5cc7ccbc4d60a506f2c727730b154010262df5b910eb17dbe4b8cb38" -dependencies = [ - "actix-codec", - "actix-http", - "actix-macros", - "actix-router", - "actix-rt", - "actix-server", - "actix-service", - "actix-utils", - "actix-web-codegen", - "ahash", - "bytes", - "bytestring", - "cfg-if 1.0.0", - "cookie", - "derive_more", - "encoding_rs", - "futures-core", - "futures-util", - "impl-more", - "itoa", - "language-tags", - "log", - "mime", - "once_cell", - "pin-project-lite", - "regex", - "regex-lite", - "serde", - "serde_json", - "serde_urlencoded", - "smallvec", - "socket2", - "time", - "url", -] - -[[package]] -name = "actix-web-codegen" -version = "4.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f591380e2e68490b5dfaf1dd1aa0ebe78d84ba7067078512b4ea6e4492d622b8" -dependencies = [ - "actix-router", - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "addr2line" version = "0.22.0" @@ -229,13 +23,24 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" +[[package]] +name = "aes" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" +dependencies = [ + "cfg-if", + "cipher", + "cpufeatures", +] + [[package]] name = "ahash" version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "getrandom", "once_cell", "version_check", @@ -251,21 +56,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "alloc-no-stdlib" -version = "2.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" - -[[package]] -name = "alloc-stdlib" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece" -dependencies = [ - "alloc-no-stdlib", -] - [[package]] name = "allocator-api2" version = "0.2.18" @@ -273,14 +63,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" [[package]] -name = "any_spawner" +name = "android-tzdata" version = "0.1.1" -source = "git+https://github.com/leptos-rs/leptos#3b1b2e2dcc0b373f249c85fe537ffedb6ec48235" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" dependencies = [ - "futures", - "thiserror", - "tokio", - "wasm-bindgen-futures", + "libc", ] [[package]] @@ -290,14 +84,34 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" [[package]] -name = "async-lock" -version = "3.4.0" +name = "arbitrary" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff6e472cdea888a4bd64f342f09b3f50e1886d32afe8df3d663c01140b811b18" +checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" dependencies = [ - "event-listener", - "event-listener-strategy", - "pin-project-lite", + "derive_arbitrary", +] + +[[package]] +name = "async-recursion" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.76", +] + +[[package]] +name = "async-trait" +version = "0.1.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.76", ] [[package]] @@ -320,7 +134,7 @@ dependencies = [ "manyhow", "proc-macro2", "quote", - "syn", + "syn 2.0.76", ] [[package]] @@ -336,7 +150,7 @@ dependencies = [ "proc-macro2", "quote", "quote-use", - "syn", + "syn 2.0.76", ] [[package]] @@ -345,6 +159,62 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +[[package]] +name = "axum" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f43644eed690f5374f1af436ecd6aea01cd201f6fbdf0178adaf6907afb2cec" +dependencies = [ + "async-trait", + "axum-core", + "bytes", + "futures-util", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-util", + "itoa", + "matchit", + "memchr", + "mime", + "multer", + "percent-encoding", + "pin-project-lite", + "rustversion", + "serde", + "serde_json", + "serde_path_to_error", + "serde_urlencoded", + "sync_wrapper 1.0.1", + "tokio", + "tower 0.5.1", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "axum-core" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e6b8ba012a258d63c9adfa28b9ddcf66149da6f986c5b5452e629d5ee64bf00" +dependencies = [ + "async-trait", + "bytes", + "futures-util", + "http", + "http-body", + "http-body-util", + "mime", + "pin-project-lite", + "rustversion", + "sync_wrapper 1.0.1", + "tower-layer", + "tower-service", + "tracing", +] + [[package]] name = "backtrace" version = "0.3.73" @@ -353,13 +223,19 @@ checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" dependencies = [ "addr2line", "cc", - "cfg-if 1.0.0", + "cfg-if", "libc", "miniz_oxide 0.7.4", "object", "rustc-demangle", ] +[[package]] +name = "base64" +version = "0.21.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" + [[package]] name = "base64" version = "0.22.1" @@ -372,21 +248,6 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" -[[package]] -name = "bincode" -version = "1.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" -dependencies = [ - "serde", -] - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - [[package]] name = "bitflags" version = "2.6.0" @@ -405,41 +266,6 @@ dependencies = [ "generic-array", ] -[[package]] -name = "broadcaster" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9c972e21e0d055a36cf73e4daae870941fe7a8abcd5ac3396aab9e4c126bd87" -dependencies = [ - "futures-channel", - "futures-core", - "futures-sink", - "futures-util", - "parking_lot 0.10.2", - "slab", -] - -[[package]] -name = "brotli" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74f7971dbd9326d58187408ab83117d8ac1bb9c17b085fdacd1cf2f598719b6b" -dependencies = [ - "alloc-no-stdlib", - "alloc-stdlib", - "brotli-decompressor", -] - -[[package]] -name = "brotli-decompressor" -version = "4.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a45bd2e4095a8b518033b128020dd4a55aab1c0a381ba4404a472630f4bc362" -dependencies = [ - "alloc-no-stdlib", - "alloc-stdlib", -] - [[package]] name = "bumpalo" version = "3.16.0" @@ -459,14 +285,58 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" [[package]] -name = "bytestring" -version = "1.3.1" +name = "bzip2" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74d80203ea6b29df88012294f62733de21cfeab47f17b41af3a38bc30a03ee72" +checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8" dependencies = [ - "bytes", + "bzip2-sys", + "libc", ] +[[package]] +name = "bzip2-sys" +version = "0.1.11+1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" +dependencies = [ + "cc", + "libc", + "pkg-config", +] + +[[package]] +name = "cached" +version = "0.45.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90eb5776f28a149524d1d8623035760b4454ec881e8cf3838fa8d7e1b11254b3" +dependencies = [ + "cached_proc_macro", + "cached_proc_macro_types", + "hashbrown 0.13.2", + "instant", + "once_cell", + "thiserror", +] + +[[package]] +name = "cached_proc_macro" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c878c71c2821aa2058722038a59a67583a4240524687c6028571c9b395ded61f" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "cached_proc_macro_types" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ade8366b8bd5ba243f0a58f036cc0ca8a2f069cff1a2351ef1cac6b083e16fc0" + [[package]] name = "camino" version = "1.1.9" @@ -484,18 +354,24 @@ dependencies = [ "shlex", ] -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - [[package]] name = "cfg-if" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "chrono" +version = "0.4.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" +dependencies = [ + "android-tzdata", + "iana-time-zone", + "num-traits", + "windows-targets 0.52.6", +] + [[package]] name = "ciborium" version = "0.2.2" @@ -524,23 +400,13 @@ dependencies = [ ] [[package]] -name = "cloudabi" -version = "0.0.3" +name = "cipher" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" dependencies = [ - "bitflags 1.3.2", -] - -[[package]] -name = "codee" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d3ad3122b0001c7f140cf4d605ef9a9e2c24d96ab0b4fb4347b76de2425f445" -dependencies = [ - "serde", - "serde_json", - "thiserror", + "crypto-common", + "inout", ] [[package]] @@ -549,16 +415,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "186dce98367766de751c42c4f03970fc60fc012296e706ccbb9d5df9b6c1e271" -[[package]] -name = "colored" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbf2150cce219b664a8a70df7a1f933836724b503f8a413af9365b4dcc4d90b8" -dependencies = [ - "lazy_static", - "windows-sys 0.48.0", -] - [[package]] name = "concurrent-queue" version = "2.5.0" @@ -574,7 +430,7 @@ version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7328b20597b53c2454f0b1919720c25c7339051c02b72b7e05409e00b14132be" dependencies = [ - "convert_case 0.6.0", + "convert_case", "lazy_static", "nom", "pathdiff", @@ -588,20 +444,10 @@ version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "wasm-bindgen", ] -[[package]] -name = "console_log" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be8aed40e4edbf4d3b4431ab260b63fdc40f5780a4766824329ea0f1eefe3c0f" -dependencies = [ - "log", - "web-sys", -] - [[package]] name = "const-oid" version = "0.9.6" @@ -629,15 +475,10 @@ dependencies = [ ] [[package]] -name = "const_str_slice_concat" -version = "0.1.0" -source = "git+https://github.com/leptos-rs/leptos#3b1b2e2dcc0b373f249c85fe537ffedb6ec48235" - -[[package]] -name = "convert_case" -version = "0.4.0" +name = "constant_time_eq" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" +checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" [[package]] name = "convert_case" @@ -649,15 +490,10 @@ dependencies = [ ] [[package]] -name = "cookie" -version = "0.16.2" +name = "core-foundation-sys" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e859cd57d0710d9e06c381b550c06e76992472a8c6d527aecd2fc673dcc231fb" -dependencies = [ - "percent-encoding", - "time", - "version_check", -] +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" @@ -689,7 +525,7 @@ version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -723,32 +559,65 @@ dependencies = [ "typenum", ] +[[package]] +name = "darling" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 1.0.109", +] + +[[package]] +name = "darling_macro" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" +dependencies = [ + "darling_core", + "quote", + "syn 1.0.109", +] + [[package]] name = "dashmap" version = "5.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" dependencies = [ - "cfg-if 1.0.0", - "hashbrown", - "lock_api 0.4.12", + "cfg-if", + "hashbrown 0.14.5", + "lock_api", "once_cell", - "parking_lot_core 0.9.10", + "parking_lot_core", ] [[package]] -name = "dashmap" -version = "6.0.1" +name = "data-encoding" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "804c8821570c3f8b70230c2ba75ffa5c0f9a4189b9a432b6656c536712acae28" -dependencies = [ - "cfg-if 1.0.0", - "crossbeam-utils", - "hashbrown", - "lock_api 0.4.12", - "once_cell", - "parking_lot_core 0.9.10", -] +checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" + +[[package]] +name = "deflate64" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da692b8d1080ea3045efaab14434d40468c3d8657e42abddfffca87b428f4c1b" [[package]] name = "der" @@ -778,20 +647,18 @@ checksum = "62d671cc41a825ebabc75757b62d3d168c577f9149b2d49ece1dad1f72119d25" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.76", ] [[package]] -name = "derive_more" -version = "0.99.18" +name = "derive_arbitrary" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce" +checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" dependencies = [ - "convert_case 0.4.0", "proc-macro2", "quote", - "rustc_version", - "syn", + "syn 2.0.76", ] [[package]] @@ -806,6 +673,17 @@ dependencies = [ "subtle", ] +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.76", +] + [[package]] name = "dotenvy" version = "0.15.7" @@ -827,21 +705,25 @@ dependencies = [ "serde", ] -[[package]] -name = "either_of" -version = "0.1.0" -source = "git+https://github.com/leptos-rs/leptos#3b1b2e2dcc0b373f249c85fe537ffedb6ec48235" -dependencies = [ - "pin-project-lite", -] - [[package]] name = "encoding_rs" version = "0.8.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", +] + +[[package]] +name = "enum-as-inner" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1e6a265c649f3f5979b601d26f1d05ada116434c87741c9493cb56218f76cbc" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn 2.0.76", ] [[package]] @@ -866,7 +748,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "136d1b5283a1ab77bd9257427ffd09d8667ced0570b6f938942bc7568ed5b943" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "home", "windows-sys 0.48.0", ] @@ -882,16 +764,6 @@ dependencies = [ "pin-project-lite", ] -[[package]] -name = "event-listener-strategy" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1" -dependencies = [ - "event-listener", - "pin-project-lite", -] - [[package]] name = "fastrand" version = "2.1.1" @@ -900,9 +772,9 @@ checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" [[package]] name = "flate2" -version = "1.0.33" +version = "1.0.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "324a1be68054ef05ad64b861cc9eaf1d623d2d8cb25b4bf2cb9cdd902b4bf253" +checksum = "a1b589b4dc103969ad3cf85c950899926ec64300a1a46d76c03a6072957036f0" dependencies = [ "crc32fast", "miniz_oxide 0.8.0", @@ -916,7 +788,7 @@ checksum = "55ac459de2512911e4b674ce33cf20befaba382d05b62b008afc1c8b57cbf181" dependencies = [ "futures-core", "futures-sink", - "spin", + "spin 0.9.8", ] [[package]] @@ -983,8 +855,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d930c203dd0b6ff06e0201a4a2fe9149b43c684fd4420555b26d21b1a02956f" dependencies = [ "futures-core", - "lock_api 0.4.12", - "parking_lot 0.12.3", + "lock_api", + "parking_lot", ] [[package]] @@ -1001,7 +873,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.76", ] [[package]] @@ -1044,13 +916,23 @@ dependencies = [ "version_check", ] +[[package]] +name = "gethostname" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0176e0459c2e4a1fe232f984bca6890e681076abb9934f6cea7c326f3fc47818" +dependencies = [ + "libc", + "windows-targets 0.48.5", +] + [[package]] name = "getrandom" version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "js-sys", "libc", "wasi", @@ -1063,81 +945,6 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" -[[package]] -name = "gloo" -version = "0.11.0" -source = "git+https://github.com/rustwasm/gloo#d600d3ac934b1c62b7009c22eabe2f91be4bd974" -dependencies = [ - "gloo-console", - "gloo-dialogs", - "gloo-events", - "gloo-file", - "gloo-history", - "gloo-net 0.6.0 (git+https://github.com/rustwasm/gloo)", - "gloo-render", - "gloo-storage", - "gloo-timers", - "gloo-utils 0.2.0 (git+https://github.com/rustwasm/gloo)", - "gloo-worker", -] - -[[package]] -name = "gloo-console" -version = "0.3.0" -source = "git+https://github.com/rustwasm/gloo#d600d3ac934b1c62b7009c22eabe2f91be4bd974" -dependencies = [ - "gloo-utils 0.2.0 (git+https://github.com/rustwasm/gloo)", - "js-sys", - "serde", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "gloo-dialogs" -version = "0.2.0" -source = "git+https://github.com/rustwasm/gloo#d600d3ac934b1c62b7009c22eabe2f91be4bd974" -dependencies = [ - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "gloo-events" -version = "0.2.0" -source = "git+https://github.com/rustwasm/gloo#d600d3ac934b1c62b7009c22eabe2f91be4bd974" -dependencies = [ - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "gloo-file" -version = "0.3.0" -source = "git+https://github.com/rustwasm/gloo#d600d3ac934b1c62b7009c22eabe2f91be4bd974" -dependencies = [ - "gloo-events", - "js-sys", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "gloo-history" -version = "0.2.2" -source = "git+https://github.com/rustwasm/gloo#d600d3ac934b1c62b7009c22eabe2f91be4bd974" -dependencies = [ - "getrandom", - "gloo-events", - "gloo-utils 0.2.0 (git+https://github.com/rustwasm/gloo)", - "serde", - "serde-wasm-bindgen", - "serde_urlencoded", - "thiserror", - "wasm-bindgen", - "web-sys", -] - [[package]] name = "gloo-net" version = "0.6.0" @@ -1147,8 +954,8 @@ dependencies = [ "futures-channel", "futures-core", "futures-sink", - "gloo-utils 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "http 1.1.0", + "gloo-utils", + "http", "js-sys", "pin-project", "serde", @@ -1159,58 +966,6 @@ dependencies = [ "web-sys", ] -[[package]] -name = "gloo-net" -version = "0.6.0" -source = "git+https://github.com/rustwasm/gloo#d600d3ac934b1c62b7009c22eabe2f91be4bd974" -dependencies = [ - "futures-channel", - "futures-core", - "futures-sink", - "gloo-utils 0.2.0 (git+https://github.com/rustwasm/gloo)", - "http 1.1.0", - "js-sys", - "pin-project", - "serde", - "serde_json", - "thiserror", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] - -[[package]] -name = "gloo-render" -version = "0.2.0" -source = "git+https://github.com/rustwasm/gloo#d600d3ac934b1c62b7009c22eabe2f91be4bd974" -dependencies = [ - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "gloo-storage" -version = "0.3.0" -source = "git+https://github.com/rustwasm/gloo#d600d3ac934b1c62b7009c22eabe2f91be4bd974" -dependencies = [ - "gloo-utils 0.2.0 (git+https://github.com/rustwasm/gloo)", - "js-sys", - "serde", - "serde_json", - "thiserror", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "gloo-timers" -version = "0.3.0" -source = "git+https://github.com/rustwasm/gloo#d600d3ac934b1c62b7009c22eabe2f91be4bd974" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - [[package]] name = "gloo-utils" version = "0.2.0" @@ -1224,82 +979,22 @@ dependencies = [ "web-sys", ] -[[package]] -name = "gloo-utils" -version = "0.2.0" -source = "git+https://github.com/rustwasm/gloo#d600d3ac934b1c62b7009c22eabe2f91be4bd974" -dependencies = [ - "js-sys", - "serde", - "serde_json", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "gloo-worker" -version = "0.5.0" -source = "git+https://github.com/rustwasm/gloo#d600d3ac934b1c62b7009c22eabe2f91be4bd974" -dependencies = [ - "bincode", - "futures", - "gloo-utils 0.2.0 (git+https://github.com/rustwasm/gloo)", - "gloo-worker-macros", - "js-sys", - "pinned", - "serde", - "thiserror", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] - -[[package]] -name = "gloo-worker-macros" -version = "0.1.0" -source = "git+https://github.com/rustwasm/gloo#d600d3ac934b1c62b7009c22eabe2f91be4bd974" -dependencies = [ - "proc-macro-crate", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "guardian" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "493913a18c0d7bebb75127a26a432162c59edbe06f6cf712001e3e769345e8b5" - -[[package]] -name = "h2" -version = "0.3.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http 0.2.12", - "indexmap", - "slab", - "tokio", - "tokio-util", - "tracing", -] - [[package]] name = "half" version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "crunchy", ] +[[package]] +name = "hashbrown" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" + [[package]] name = "hashbrown" version = "0.14.5" @@ -1316,7 +1011,7 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ba4ff7128dee98c7dc9794b6a411377e1404dba1c97deb8d1a55297bd25d8af" dependencies = [ - "hashbrown", + "hashbrown 0.14.5", ] [[package]] @@ -1337,6 +1032,57 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +[[package]] +name = "hickory-proto" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07698b8420e2f0d6447a436ba999ec85d8fbf2a398bbd737b82cac4a2e96e512" +dependencies = [ + "async-trait", + "cfg-if", + "data-encoding", + "enum-as-inner", + "futures-channel", + "futures-io", + "futures-util", + "idna 0.4.0", + "ipnet", + "once_cell", + "rand", + "ring 0.16.20", + "rustls 0.21.12", + "rustls-pemfile 1.0.4", + "thiserror", + "tinyvec", + "tokio", + "tokio-rustls 0.24.1", + "tracing", + "url", +] + +[[package]] +name = "hickory-resolver" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28757f23aa75c98f254cf0405e6d8c25b831b32921b050a66692427679b1f243" +dependencies = [ + "cfg-if", + "futures-util", + "hickory-proto", + "ipconfig", + "lru-cache", + "once_cell", + "parking_lot", + "rand", + "resolv-conf", + "rustls 0.21.12", + "smallvec", + "thiserror", + "tokio", + "tokio-rustls 0.24.1", + "tracing", +] + [[package]] name = "hkdf" version = "0.12.4" @@ -1364,6 +1110,17 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "hostname" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c731c3e10504cc8ed35cfe2f1db4c9274c3d35fa486e3b31df46f068ef3e867" +dependencies = [ + "libc", + "match_cfg", + "winapi", +] + [[package]] name = "html-escape" version = "0.2.13" @@ -1373,17 +1130,6 @@ dependencies = [ "utf8-width", ] -[[package]] -name = "http" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - [[package]] name = "http" version = "1.1.0" @@ -1396,10 +1142,33 @@ dependencies = [ ] [[package]] -name = "http-range" -version = "0.1.5" +name = "http-body" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21dec9db110f5f872ed9699c3ecf50cf16f423502706ba5c72462e28d3157573" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes", + "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" +dependencies = [ + "bytes", + "futures-util", + "http", + "http-body", + "pin-project-lite", +] + +[[package]] +name = "http-range-header" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08a397c49fec283e3d6211adbe480be95aae5f304cfb923e9970e08956d5168a" [[package]] name = "httparse" @@ -1414,18 +1183,77 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] -name = "hydration_context" -version = "0.2.0-beta4" -source = "git+https://github.com/leptos-rs/leptos#3b1b2e2dcc0b373f249c85fe537ffedb6ec48235" +name = "hyper" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" dependencies = [ - "futures", - "js-sys", - "once_cell", - "or_poisoned", + "bytes", + "futures-channel", + "futures-util", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", "pin-project-lite", - "serde", - "throw_error", + "smallvec", + "tokio", +] + +[[package]] +name = "hyper-util" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b" +dependencies = [ + "bytes", + "futures-util", + "http", + "http-body", + "hyper", + "pin-project-lite", + "tokio", + "tower-service", +] + +[[package]] +name = "iana-time-zone" +version = "0.1.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "idna" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" +dependencies = [ + "unicode-bidi", + "unicode-normalization", ] [[package]] @@ -1438,12 +1266,6 @@ dependencies = [ "unicode-normalization", ] -[[package]] -name = "impl-more" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "206ca75c9c03ba3d4ace2460e57b189f39f43de612c2f85836e65c929701bb2d" - [[package]] name = "indexmap" version = "2.4.0" @@ -1451,7 +1273,25 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93ead53efc7ea8ed3cfb0c79fc8023fbb782a5432b52830b6518941cebe6505c" dependencies = [ "equivalent", - "hashbrown", + "hashbrown 0.14.5", +] + +[[package]] +name = "inout" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" +dependencies = [ + "generic-array", +] + +[[package]] +name = "instant" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" +dependencies = [ + "cfg-if", ] [[package]] @@ -1467,10 +1307,28 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f958d3d68f4167080a18141e10381e7634563984a537f2a49a30fd8e53ac5767" [[package]] -name = "itertools" -version = "0.13.0" +name = "ipconfig" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f" +dependencies = [ + "socket2", + "widestring", + "windows-sys 0.48.0", + "winreg", +] + +[[package]] +name = "ipnet" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "187674a687eed5fe42285b40c6291f9a01517d415fad1c3cbc6a9f778af7fcd4" + +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" dependencies = [ "either", ] @@ -1500,10 +1358,19 @@ dependencies = [ ] [[package]] -name = "language-tags" -version = "0.3.2" +name = "jsonwebtoken" +version = "9.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4345964bb142484797b161f473a503a434de77149dd8c7427788c6e13379388" +checksum = "b9ae10193d25051e74945f1ea2d0b42e03cc3b890f7e4cc5faa44997d808193f" +dependencies = [ + "base64 0.21.7", + "js-sys", + "pem", + "ring 0.17.8", + "serde", + "serde_json", + "simple_asn1", +] [[package]] name = "lazy_static" @@ -1511,39 +1378,23 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" dependencies = [ - "spin", + "spin 0.9.8", ] [[package]] name = "leptos" -version = "0.7.0-beta4" -source = "git+https://github.com/leptos-rs/leptos#3b1b2e2dcc0b373f249c85fe537ffedb6ec48235" +version = "0.6.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cbb3237c274dadf00dcc27db96c52601b40375117178fb24a991cda073624f0" dependencies = [ - "any_spawner", - "base64", - "cfg-if 1.0.0", - "either_of", - "futures", - "hydration_context", + "cfg-if", "leptos_config", "leptos_dom", - "leptos_hot_reload", "leptos_macro", + "leptos_reactive", "leptos_server", - "oco_ref", - "or_poisoned", - "paste", - "rand", - "reactive_graph", - "rustc-hash", - "send_wrapper", - "serde", - "serde_qs", - "server_fn 0.7.0-beta4", - "slotmap", - "tachys", - "thiserror", - "throw_error", + "server_fn", + "tracing", "typed-builder", "typed-builder-macro", "wasm-bindgen", @@ -1551,34 +1402,34 @@ dependencies = [ ] [[package]] -name = "leptos_actix" -version = "0.7.0-beta4" -source = "git+https://github.com/leptos-rs/leptos#3b1b2e2dcc0b373f249c85fe537ffedb6ec48235" +name = "leptos_axum" +version = "0.6.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "910681b920c48a43508b2bd0261bdb67c4ef9456a0b3613f956a0d30e832e9de" dependencies = [ - "actix-files", - "actix-http", - "actix-web", - "any_spawner", - "dashmap 6.0.1", + "axum", + "cfg-if", "futures", - "hydration_context", + "http-body-util", "leptos", "leptos_integration_utils", "leptos_macro", "leptos_meta", "leptos_router", "once_cell", - "parking_lot 0.12.3", - "send_wrapper", + "parking_lot", "serde_json", - "server_fn 0.7.0-beta4", + "server_fn", "tokio", + "tokio-util", + "tracing", ] [[package]] name = "leptos_config" -version = "0.7.0-beta4" -source = "git+https://github.com/leptos-rs/leptos#3b1b2e2dcc0b373f249c85fe537ffedb6ec48235" +version = "0.6.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62ed778611380ddea47568ac6ad6ec5158d39b5bd59e6c4dcd24efc15dc3dc0d" dependencies = [ "config", "regex", @@ -1589,136 +1440,177 @@ dependencies = [ [[package]] name = "leptos_dom" -version = "0.7.0-beta4" -source = "git+https://github.com/leptos-rs/leptos#3b1b2e2dcc0b373f249c85fe537ffedb6ec48235" +version = "0.6.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8401c46c86c1f4c16dcb7881ed319fcdca9cda9b9e78a6088955cb423afcf119" dependencies = [ + "async-recursion", + "cfg-if", + "drain_filter_polyfill", + "futures", + "getrandom", + "html-escape", + "indexmap", + "itertools", "js-sys", - "or_poisoned", - "reactive_graph", - "send_wrapper", - "tachys", + "leptos_reactive", + "once_cell", + "pad-adapter", + "paste", + "rustc-hash", + "serde", + "serde_json", + "server_fn", + "smallvec", + "tracing", "wasm-bindgen", + "wasm-bindgen-futures", "web-sys", ] [[package]] name = "leptos_hot_reload" -version = "0.7.0-beta4" -source = "git+https://github.com/leptos-rs/leptos#3b1b2e2dcc0b373f249c85fe537ffedb6ec48235" +version = "0.6.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6cb53d4794240b684a2f4be224b84bee9e62d2abc498cf2bcd643cd565e01d96" dependencies = [ "anyhow", "camino", "indexmap", - "parking_lot 0.12.3", + "parking_lot", "proc-macro2", "quote", "rstml", "serde", - "syn", + "syn 2.0.76", "walkdir", ] [[package]] name = "leptos_integration_utils" -version = "0.7.0-beta4" -source = "git+https://github.com/leptos-rs/leptos#3b1b2e2dcc0b373f249c85fe537ffedb6ec48235" +version = "0.6.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a96976631c2225ec116a7bf9c0ed5bf6999a19fed33f5e3cbcf37af44c384dc" dependencies = [ "futures", - "hydration_context", "leptos", "leptos_config", + "leptos_hot_reload", "leptos_meta", - "leptos_router", - "reactive_graph", + "tracing", ] [[package]] name = "leptos_macro" -version = "0.7.0-beta4" -source = "git+https://github.com/leptos-rs/leptos#3b1b2e2dcc0b373f249c85fe537ffedb6ec48235" +version = "0.6.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b13bc3db70715cd8218c4535a5af3ae3c0e5fea6f018531fc339377b36bc0e0" dependencies = [ "attribute-derive", - "cfg-if 1.0.0", - "convert_case 0.6.0", + "cfg-if", + "convert_case", "html-escape", "itertools", "leptos_hot_reload", "prettyplease", - "proc-macro-error", + "proc-macro-error2", "proc-macro2", "quote", "rstml", - "server_fn_macro 0.7.0-beta4", - "syn", + "server_fn_macro", + "syn 2.0.76", + "tracing", "uuid", ] [[package]] name = "leptos_meta" -version = "0.7.0-beta4" -source = "git+https://github.com/leptos-rs/leptos#3b1b2e2dcc0b373f249c85fe537ffedb6ec48235" +version = "0.6.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25acc2f63cf91932013e400a95bf6e35e5d3dbb44a7b7e25a8e3057d12005b3b" dependencies = [ - "futures", + "cfg-if", "indexmap", "leptos", - "once_cell", - "or_poisoned", - "send_wrapper", + "tracing", "wasm-bindgen", "web-sys", ] +[[package]] +name = "leptos_reactive" +version = "0.6.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4161acbf80f59219d8d14182371f57302bc7ff81ee41aba8ba1ff7295727f23" +dependencies = [ + "base64 0.22.1", + "cfg-if", + "futures", + "indexmap", + "js-sys", + "oco_ref", + "paste", + "pin-project", + "rustc-hash", + "self_cell", + "serde", + "serde-wasm-bindgen", + "serde_json", + "slotmap", + "thiserror", + "tokio", + "tracing", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + [[package]] name = "leptos_router" -version = "0.7.0-beta4" -source = "git+https://github.com/leptos-rs/leptos#3b1b2e2dcc0b373f249c85fe537ffedb6ec48235" +version = "0.6.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d71dea7d42c0d29c40842750232d3425ed1cf10e313a1f898076d20871dad32" dependencies = [ - "any_spawner", - "either_of", - "futures", - "gloo-net 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cached", + "cfg-if", + "gloo-net", + "itertools", "js-sys", + "lazy_static", "leptos", - "leptos_router_macro", + "leptos_integration_utils", + "leptos_meta", + "linear-map", + "lru", "once_cell", - "or_poisoned", - "paste", "percent-encoding", - "reactive_graph", + "regex", "send_wrapper", "serde", - "tachys", + "serde_json", + "serde_qs 0.13.0", "thiserror", + "tracing", "url", "wasm-bindgen", + "wasm-bindgen-futures", "web-sys", ] -[[package]] -name = "leptos_router_macro" -version = "0.7.0-beta4" -source = "git+https://github.com/leptos-rs/leptos#3b1b2e2dcc0b373f249c85fe537ffedb6ec48235" -dependencies = [ - "proc-macro-error", - "proc-macro2", - "quote", -] - [[package]] name = "leptos_server" -version = "0.7.0-beta4" -source = "git+https://github.com/leptos-rs/leptos#3b1b2e2dcc0b373f249c85fe537ffedb6ec48235" +version = "0.6.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a97eb90a13f71500b831c7119ddd3bdd0d7ae0a6b0487cade4fddeed3b8c03f" dependencies = [ - "any_spawner", - "base64", - "codee", - "futures", - "hydration_context", - "reactive_graph", + "inventory", + "lazy_static", + "leptos_macro", + "leptos_reactive", "serde", - "serde_json", - "server_fn 0.7.0-beta4", - "tachys", + "server_fn", + "thiserror", + "tracing", ] [[package]] @@ -1749,6 +1641,16 @@ name = "linear-map" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfae20f6b19ad527b550c223fddc3077a547fc70cda94b9b566575423fd303ee" +dependencies = [ + "serde", + "serde_test", +] + +[[package]] +name = "linked-hash-map" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" [[package]] name = "linux-raw-sys" @@ -1756,32 +1658,6 @@ version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" -[[package]] -name = "local-channel" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6cbc85e69b8df4b8bb8b89ec634e7189099cea8927a276b7384ce5488e53ec8" -dependencies = [ - "futures-core", - "futures-sink", - "local-waker", -] - -[[package]] -name = "local-waker" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d873d7c67ce09b42110d801813efbc9364414e356be9935700d368351657487" - -[[package]] -name = "lock_api" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75" -dependencies = [ - "scopeguard", -] - [[package]] name = "lock_api" version = "0.4.12" @@ -1792,12 +1668,105 @@ dependencies = [ "scopeguard", ] +[[package]] +name = "lockfree-object-pool" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9374ef4228402d4b7e403e5838cb880d9ee663314b0a900d5a6aabf0c213552e" + [[package]] name = "log" version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" +[[package]] +name = "lru" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4a83fb7698b3643a0e34f9ae6f2e8f0178c0fd42f8b59d493aa271ff3a5bf21" +dependencies = [ + "hashbrown 0.14.5", +] + +[[package]] +name = "lru-cache" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31e24f1ad8321ca0e8a1e0ac13f23cb668e6f5466c2c57319f6a5cf1cc8e3b1c" +dependencies = [ + "linked-hash-map", +] + +[[package]] +name = "lzma-rs" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "297e814c836ae64db86b36cf2a557ba54368d03f6afcd7d947c266692f71115e" +dependencies = [ + "byteorder", + "crc", +] + +[[package]] +name = "mail-auth" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bd9d657de66a3d5ac360c3eab8c9f5cac2565f2b97cc032d5de4c900ef470de" +dependencies = [ + "ahash", + "flate2", + "hickory-resolver", + "lru-cache", + "mail-builder", + "mail-parser", + "parking_lot", + "quick-xml", + "ring 0.17.8", + "rustls-pemfile 2.1.3", + "serde", + "serde_json", + "zip", +] + +[[package]] +name = "mail-builder" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25f5871d5270ed80f2ee750b95600c8d69b05f8653ad3be913b2ad2e924fefcb" +dependencies = [ + "gethostname", +] + +[[package]] +name = "mail-parser" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93c3b9e5d8b17faf573330bbc43b37d6e918c0a3bf8a88e7d0a220ebc84af9fc" +dependencies = [ + "encoding_rs", +] + +[[package]] +name = "mail-send" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a575d25cf00ed68e5790b473b29242a47e991c6187785d47b45e31fc5816554" +dependencies = [ + "base64 0.22.1", + "gethostname", + "mail-auth", + "mail-builder", + "md5", + "rand", + "rustls 0.23.12", + "rustls-pki-types", + "smtp-proto", + "tokio", + "tokio-rustls 0.26.0", + "webpki-roots", +] + [[package]] name = "manyhow" version = "0.10.4" @@ -1807,7 +1776,7 @@ dependencies = [ "manyhow-macros", "proc-macro2", "quote", - "syn", + "syn 2.0.76", ] [[package]] @@ -1821,16 +1790,34 @@ dependencies = [ "quote", ] +[[package]] +name = "match_cfg" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4" + +[[package]] +name = "matchit" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" + [[package]] name = "md-5" version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "digest", ] +[[package]] +name = "md5" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "490cc448043f947bae3cbee9c203358d62dbee0db12107a74be5c30ccfd09771" + [[package]] name = "memchr" version = "2.7.4" @@ -1885,15 +1872,26 @@ checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ "hermit-abi", "libc", - "log", "wasi", "windows-sys 0.52.0", ] [[package]] -name = "next_tuple" -version = "0.1.0-beta4" -source = "git+https://github.com/leptos-rs/leptos#3b1b2e2dcc0b373f249c85fe537ffedb6ec48235" +name = "multer" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83e87776546dc87511aa5ee218730c92b666d7264ab6ed41f9d215af9cd5224b" +dependencies = [ + "bytes", + "encoding_rs", + "futures-util", + "http", + "httparse", + "memchr", + "mime", + "spin 0.9.8", + "version_check", +] [[package]] name = "nom" @@ -1905,6 +1903,26 @@ dependencies = [ "minimal-lexical", ] +[[package]] +name = "nu-ansi-term" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +dependencies = [ + "overload", + "winapi", +] + +[[package]] +name = "num-bigint" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" +dependencies = [ + "num-integer", + "num-traits", +] + [[package]] name = "num-bigint-dig" version = "0.8.4" @@ -1958,15 +1976,6 @@ dependencies = [ "libm", ] -[[package]] -name = "num_threads" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c7398b9c8b70908f6371f47ed36737907c87c52af34c268fed0bf0ceb92ead9" -dependencies = [ - "libc", -] - [[package]] name = "object" version = "0.36.4" @@ -1978,8 +1987,9 @@ dependencies = [ [[package]] name = "oco_ref" -version = "0.2.0" -source = "git+https://github.com/leptos-rs/leptos#3b1b2e2dcc0b373f249c85fe537ffedb6ec48235" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c51ebcefb2f0b9a5e0bea115532c8ae4215d1b01eff176d0f4ba4192895c2708" dependencies = [ "serde", "thiserror", @@ -1992,25 +2002,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] -name = "or_poisoned" -version = "0.1.0" -source = "git+https://github.com/leptos-rs/leptos#3b1b2e2dcc0b373f249c85fe537ffedb6ec48235" +name = "overload" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" + +[[package]] +name = "pad-adapter" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56d80efc4b6721e8be2a10a5df21a30fa0b470f1539e53d8b4e6e75faf938b63" [[package]] name = "parking" -version = "2.2.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" - -[[package]] -name = "parking_lot" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e" -dependencies = [ - "lock_api 0.3.4", - "parking_lot_core 0.7.3", -] +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" [[package]] name = "parking_lot" @@ -2018,22 +2025,8 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" dependencies = [ - "lock_api 0.4.12", - "parking_lot_core 0.9.10", -] - -[[package]] -name = "parking_lot_core" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b93f386bb233083c799e6e642a9d73db98c24a5deeb95ffc85bf281255dffc98" -dependencies = [ - "cfg-if 0.1.10", - "cloudabi", - "libc", - "redox_syscall 0.1.57", - "smallvec", - "winapi", + "lock_api", + "parking_lot_core", ] [[package]] @@ -2042,9 +2035,9 @@ version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", - "redox_syscall 0.5.3", + "redox_syscall", "smallvec", "windows-targets 0.52.6", ] @@ -2061,6 +2054,26 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" +[[package]] +name = "pbkdf2" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" +dependencies = [ + "digest", + "hmac", +] + +[[package]] +name = "pem" +version = "3.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e459365e590736a54c3fa561947c84837534b8e9af6fc5bf781307e82658fae" +dependencies = [ + "base64 0.22.1", + "serde", +] + [[package]] name = "pem-rfc7468" version = "0.7.0" @@ -2093,7 +2106,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.76", ] [[package]] @@ -2108,17 +2121,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" -[[package]] -name = "pinned" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a829027bd95e54cfe13e3e258a1ae7b645960553fb82b75ff852c29688ee595b" -dependencies = [ - "futures", - "rustversion", - "thiserror", -] - [[package]] name = "pkcs1" version = "0.7.5" @@ -2168,17 +2170,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "479cf940fbbb3426c32c5d5176f62ad57549a0bb84773423ba8be9d089f5faba" dependencies = [ "proc-macro2", - "syn", -] - -[[package]] -name = "proc-macro-crate" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" -dependencies = [ - "once_cell", - "toml_edit 0.19.15", + "syn 2.0.76", ] [[package]] @@ -2204,6 +2196,27 @@ dependencies = [ "version_check", ] +[[package]] +name = "proc-macro-error-attr2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96de42df36bb9bba5542fe9f1a054b8cc87e172759a1868aa05c1f3acc89dfc5" +dependencies = [ + "proc-macro2", + "quote", +] + +[[package]] +name = "proc-macro-error2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11ec05c52be0a07b08061f7dd003e7d7092e0472bc731b4af7bb1ef876109802" +dependencies = [ + "proc-macro-error-attr2", + "proc-macro2", + "quote", +] + [[package]] name = "proc-macro-utils" version = "0.8.0" @@ -2243,11 +2256,26 @@ checksum = "af066a9c399a26e020ada66a034357a868728e72cd426f3adcd35f80d88d88c8" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.76", "version_check", "yansi", ] +[[package]] +name = "quick-error" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" + +[[package]] +name = "quick-xml" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d3a6e5838b60e0e8fa7a43f22ade549a37d61f8bdbe636d0d7816191de969c2" +dependencies = [ + "memchr", +] + [[package]] name = "quote" version = "1.0.37" @@ -2276,7 +2304,7 @@ dependencies = [ "proc-macro-utils 0.10.0", "proc-macro2", "quote", - "syn", + "syn 2.0.76", ] [[package]] @@ -2309,48 +2337,13 @@ dependencies = [ "getrandom", ] -[[package]] -name = "reactive_graph" -version = "0.1.0-beta4" -source = "git+https://github.com/leptos-rs/leptos#3b1b2e2dcc0b373f249c85fe537ffedb6ec48235" -dependencies = [ - "any_spawner", - "async-lock", - "futures", - "guardian", - "hydration_context", - "or_poisoned", - "pin-project-lite", - "rustc-hash", - "send_wrapper", - "serde", - "slotmap", - "thiserror", - "web-sys", -] - -[[package]] -name = "redox_syscall" -version = "0.1.57" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" - -[[package]] -name = "redox_syscall" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" -dependencies = [ - "bitflags 1.3.2", -] - [[package]] name = "redox_syscall" version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" dependencies = [ - "bitflags 2.6.0", + "bitflags", ] [[package]] @@ -2376,18 +2369,37 @@ dependencies = [ "regex-syntax", ] -[[package]] -name = "regex-lite" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53a49587ad06b26609c52e423de037e7f57f20d53535d66e08c695f347df952a" - [[package]] name = "regex-syntax" version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" +[[package]] +name = "resolv-conf" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52e44394d2086d010551b14b53b1f24e31647570cd1deb0379e2c21b329aba00" +dependencies = [ + "hostname", + "quick-error", +] + +[[package]] +name = "ring" +version = "0.16.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" +dependencies = [ + "cc", + "libc", + "once_cell", + "spin 0.5.2", + "untrusted 0.7.1", + "web-sys", + "winapi", +] + [[package]] name = "ring" version = "0.17.8" @@ -2395,11 +2407,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", - "cfg-if 1.0.0", + "cfg-if", "getrandom", "libc", - "spin", - "untrusted", + "spin 0.9.8", + "untrusted 0.9.0", "windows-sys 0.52.0", ] @@ -2425,15 +2437,14 @@ dependencies = [ [[package]] name = "rstml" -version = "0.12.0" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51187e564f12336ef40cd04f6f4d805d6919188001dcf1e0a021898ea0fe28ce" +checksum = "fe542870b8f59dd45ad11d382e5339c9a1047cde059be136a7016095bbdefa77" dependencies = [ - "derive-where", "proc-macro2", "proc-macro2-diagnostics", "quote", - "syn", + "syn 2.0.76", "syn_derive", "thiserror", ] @@ -2442,24 +2453,23 @@ dependencies = [ name = "rust_leptos" version = "0.1.0" dependencies = [ - "actix-files", - "actix-web", - "anyhow", - "broadcaster", + "axum", "console_error_panic_hook", - "console_log", - "futures", - "gloo", + "jsonwebtoken", "leptos", - "leptos_actix", + "leptos_axum", "leptos_meta", "leptos_router", - "log", + "mail-send", + "regex", "serde", - "server_fn 0.6.14", - "simple_logger", "sqlx", "tokio", + "tower 0.4.13", + "tower-http", + "tracing", + "tracing-subscriber", + "tracing-wasm", "wasm-bindgen", ] @@ -2471,32 +2481,35 @@ checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustc-hash" -version = "2.0.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" - -[[package]] -name = "rustc_version" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" -dependencies = [ - "semver", -] +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustix" -version = "0.38.35" +version = "0.38.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a85d50532239da68e9addb745ba38ff4612a242c1c7ceea689c4bc7c2f43c36f" +checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" dependencies = [ - "bitflags 2.6.0", + "bitflags", "errno", "libc", "linux-raw-sys", "windows-sys 0.52.0", ] +[[package]] +name = "rustls" +version = "0.21.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" +dependencies = [ + "log", + "ring 0.17.8", + "rustls-webpki 0.101.7", + "sct", +] + [[package]] name = "rustls" version = "0.23.12" @@ -2504,20 +2517,29 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c58f8c84392efc0a126acce10fa59ff7b3d2ac06ab451a33f2741989b806b044" dependencies = [ "once_cell", - "ring", + "ring 0.17.8", "rustls-pki-types", - "rustls-webpki", + "rustls-webpki 0.102.7", "subtle", "zeroize", ] +[[package]] +name = "rustls-pemfile" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" +dependencies = [ + "base64 0.21.7", +] + [[package]] name = "rustls-pemfile" version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "196fe16b00e106300d3e45ecfcb764fa292a535d7326a29a5875c579c7417425" dependencies = [ - "base64", + "base64 0.22.1", "rustls-pki-types", ] @@ -2527,15 +2549,25 @@ version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc0a2ce646f8655401bb81e7927b812614bd5d91dbc968696be50603510fcaf0" +[[package]] +name = "rustls-webpki" +version = "0.101.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +dependencies = [ + "ring 0.17.8", + "untrusted 0.9.0", +] + [[package]] name = "rustls-webpki" version = "0.102.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "84678086bd54edf2b415183ed7a94d0efb049f1b646a33e22a36f3794be6ae56" dependencies = [ - "ring", + "ring 0.17.8", "rustls-pki-types", - "untrusted", + "untrusted 0.9.0", ] [[package]] @@ -2566,10 +2598,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] -name = "semver" -version = "1.0.23" +name = "sct" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" +dependencies = [ + "ring 0.17.8", + "untrusted 0.9.0", +] + +[[package]] +name = "self_cell" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d369a96f978623eb3dc28807c4852d6cc617fed53da5d3c400feff1ef34a714a" [[package]] name = "send_wrapper" @@ -2608,7 +2650,7 @@ checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.76", ] [[package]] @@ -2623,6 +2665,27 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_path_to_error" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af99884400da37c88f5e9146b7f1fd0fbcae8f6eec4e9da38b67d05486f814a6" +dependencies = [ + "itoa", + "serde", +] + +[[package]] +name = "serde_qs" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0431a35568651e363364210c91983c1da5eb29404d9f0928b67d4ebcfa7d330c" +dependencies = [ + "percent-encoding", + "serde", + "thiserror", +] + [[package]] name = "serde_qs" version = "0.13.0" @@ -2643,6 +2706,15 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_test" +version = "1.0.177" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f901ee573cab6b3060453d2d5f0bae4e6d628c23c0a962ff9b5f1d7c8d4f1ed" +dependencies = [ + "serde", +] + [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -2657,48 +2729,31 @@ dependencies = [ [[package]] name = "server_fn" -version = "0.6.14" +version = "0.6.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "024b400db1aca5bd4188714f7bbbf7a2e1962b9a12a80b2a21e937e509086963" +checksum = "4fae7a3038a32e5a34ba32c6c45eb4852f8affaf8b794ebfcd4b1099e2d62ebe" dependencies = [ + "axum", "bytes", "ciborium", "const_format", - "dashmap 5.5.3", + "dashmap", "futures", - "http 1.1.0", - "once_cell", - "serde", - "serde_json", - "server_fn_macro_default 0.6.14", - "thiserror", - "url", - "xxhash-rust", -] - -[[package]] -name = "server_fn" -version = "0.7.0-beta4" -source = "git+https://github.com/leptos-rs/leptos#3b1b2e2dcc0b373f249c85fe537ffedb6ec48235" -dependencies = [ - "actix-web", - "bytes", - "const_format", - "dashmap 6.0.1", - "futures", - "gloo-net 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "http 1.1.0", + "gloo-net", + "http", + "http-body-util", + "hyper", "inventory", "js-sys", "once_cell", - "pin-project-lite", "send_wrapper", "serde", "serde_json", - "serde_qs", - "server_fn_macro_default 0.7.0-beta4", + "serde_qs 0.12.0", + "server_fn_macro_default", "thiserror", - "throw_error", + "tower 0.4.13", + "tower-layer", "url", "wasm-bindgen", "wasm-bindgen-futures", @@ -2709,28 +2764,15 @@ dependencies = [ [[package]] name = "server_fn_macro" -version = "0.6.14" +version = "0.6.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf0e6f71fc924df36e87f27dfbd447f0bedd092d365db3a5396878256d9f00c" +checksum = "faaaf648c6967aef78177c0610478abb5a3455811f401f3c62d10ae9bd3901a1" dependencies = [ "const_format", - "convert_case 0.6.0", + "convert_case", "proc-macro2", "quote", - "syn", - "xxhash-rust", -] - -[[package]] -name = "server_fn_macro" -version = "0.7.0-beta4" -source = "git+https://github.com/leptos-rs/leptos#3b1b2e2dcc0b373f249c85fe537ffedb6ec48235" -dependencies = [ - "const_format", - "convert_case 0.6.0", - "proc-macro2", - "quote", - "syn", + "syn 2.0.76", "xxhash-rust", ] @@ -2740,17 +2782,8 @@ version = "0.6.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "556e4fd51eb9ee3e7d9fb0febec6cef486dcbc8f7f427591dfcfebee1abe1ad4" dependencies = [ - "server_fn_macro 0.6.14", - "syn", -] - -[[package]] -name = "server_fn_macro_default" -version = "0.7.0-beta4" -source = "git+https://github.com/leptos-rs/leptos#3b1b2e2dcc0b373f249c85fe537ffedb6ec48235" -dependencies = [ - "server_fn_macro 0.7.0-beta4", - "syn", + "server_fn_macro", + "syn 2.0.76", ] [[package]] @@ -2759,7 +2792,7 @@ version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "digest", ] @@ -2770,26 +2803,26 @@ version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "digest", ] +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + [[package]] name = "shlex" version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" -[[package]] -name = "signal-hook-registry" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" -dependencies = [ - "libc", -] - [[package]] name = "signature" version = "2.2.0" @@ -2801,15 +2834,21 @@ dependencies = [ ] [[package]] -name = "simple_logger" -version = "5.0.0" +name = "simd-adler32" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8c5dfa5e08767553704aa0ffd9d9794d527103c736aba9854773851fd7497eb" +checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" + +[[package]] +name = "simple_asn1" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adc4e5204eb1910f40f9cfa375f6f05b68c3abac4b6fd879c8ff5e7ae8a0a085" dependencies = [ - "colored", - "log", + "num-bigint", + "num-traits", + "thiserror", "time", - "windows-sys 0.48.0", ] [[package]] @@ -2827,6 +2866,7 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dbff4acf519f630b3a3ddcfaea6c06b42174d9a44bc70c620e9ed1649d58b82a" dependencies = [ + "serde", "version_check", ] @@ -2839,6 +2879,12 @@ dependencies = [ "serde", ] +[[package]] +name = "smtp-proto" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51b8ad3dd187f0d4debab02ad65405a9919d6a4f7bce25bd64a258781063a53a" + [[package]] name = "socket2" version = "0.5.7" @@ -2849,13 +2895,19 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + [[package]] name = "spin" version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" dependencies = [ - "lock_api 0.4.12", + "lock_api", ] [[package]] @@ -2880,9 +2932,9 @@ dependencies = [ [[package]] name = "sqlx" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcfa89bea9500db4a0d038513d7a060566bfc51d46d1c014847049a45cce85e8" +checksum = "93334716a037193fac19df402f8571269c84a00852f6a7066b5d2616dcd64d3e" dependencies = [ "sqlx-core", "sqlx-macros", @@ -2893,13 +2945,14 @@ dependencies = [ [[package]] name = "sqlx-core" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d06e2f2bd861719b1f3f0c7dbe1d80c30bf59e76cf019f07d9014ed7eefb8e08" +checksum = "d4d8060b456358185f7d50c55d9b5066ad956956fddec42ee2e8567134a8936e" dependencies = [ "atoi", "byteorder", "bytes", + "chrono", "crc", "crossbeam-queue", "either", @@ -2909,7 +2962,7 @@ dependencies = [ "futures-intrusive", "futures-io", "futures-util", - "hashbrown", + "hashbrown 0.14.5", "hashlink", "hex", "indexmap", @@ -2918,8 +2971,8 @@ dependencies = [ "once_cell", "paste", "percent-encoding", - "rustls", - "rustls-pemfile", + "rustls 0.23.12", + "rustls-pemfile 2.1.3", "serde", "serde_json", "sha2", @@ -2935,22 +2988,22 @@ dependencies = [ [[package]] name = "sqlx-macros" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f998a9defdbd48ed005a89362bd40dd2117502f15294f61c8d47034107dbbdc" +checksum = "cac0692bcc9de3b073e8d747391827297e075c7710ff6276d9f7a1f3d58c6657" dependencies = [ "proc-macro2", "quote", "sqlx-core", "sqlx-macros-core", - "syn", + "syn 2.0.76", ] [[package]] name = "sqlx-macros-core" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d100558134176a2629d46cec0c8891ba0be8910f7896abfdb75ef4ab6f4e7ce" +checksum = "1804e8a7c7865599c9c79be146dc8a9fd8cc86935fa641d3ea58e5f0688abaa5" dependencies = [ "dotenvy", "either", @@ -2966,7 +3019,7 @@ dependencies = [ "sqlx-mysql", "sqlx-postgres", "sqlx-sqlite", - "syn", + "syn 2.0.76", "tempfile", "tokio", "url", @@ -2974,15 +3027,16 @@ dependencies = [ [[package]] name = "sqlx-mysql" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "936cac0ab331b14cb3921c62156d913e4c15b74fb6ec0f3146bd4ef6e4fb3c12" +checksum = "64bb4714269afa44aef2755150a0fc19d756fb580a67db8885608cf02f47d06a" dependencies = [ "atoi", - "base64", - "bitflags 2.6.0", + "base64 0.22.1", + "bitflags", "byteorder", "bytes", + "chrono", "crc", "digest", "dotenvy", @@ -3016,14 +3070,15 @@ dependencies = [ [[package]] name = "sqlx-postgres" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9734dbce698c67ecf67c442f768a5e90a49b2a4d61a9f1d59f73874bd4cf0710" +checksum = "6fa91a732d854c5d7726349bb4bb879bb9478993ceb764247660aee25f67c2f8" dependencies = [ "atoi", - "base64", - "bitflags 2.6.0", + "base64 0.22.1", + "bitflags", "byteorder", + "chrono", "crc", "dotenvy", "etcetera", @@ -3054,11 +3109,12 @@ dependencies = [ [[package]] name = "sqlx-sqlite" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75b419c3c1b1697833dd927bdc4c6545a620bc1bbafabd44e1efbe9afcd337e" +checksum = "d5b2cf34a45953bfd3daaf3db0f7a7878ab9b7a6b91b422d24a7a9e4c857b680" dependencies = [ "atoi", + "chrono", "flume", "futures-channel", "futures-core", @@ -3086,12 +3142,29 @@ dependencies = [ "unicode-properties", ] +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + [[package]] name = "subtle" version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + [[package]] name = "syn" version = "2.0.76" @@ -3112,39 +3185,20 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn", + "syn 2.0.76", ] [[package]] -name = "tachys" -version = "0.1.0-beta4" -source = "git+https://github.com/leptos-rs/leptos#3b1b2e2dcc0b373f249c85fe537ffedb6ec48235" -dependencies = [ - "any_spawner", - "const_str_slice_concat", - "drain_filter_polyfill", - "either_of", - "futures", - "html-escape", - "indexmap", - "itertools", - "js-sys", - "linear-map", - "next_tuple", - "oco_ref", - "once_cell", - "or_poisoned", - "parking_lot 0.12.3", - "paste", - "pin-project-lite", - "reactive_graph", - "rustc-hash", - "send_wrapper", - "slotmap", - "throw_error", - "wasm-bindgen", - "web-sys", -] +name = "sync_wrapper" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" + +[[package]] +name = "sync_wrapper" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" [[package]] name = "tempfile" @@ -3152,7 +3206,7 @@ version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "fastrand", "once_cell", "rustix", @@ -3176,15 +3230,17 @@ checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.76", ] [[package]] -name = "throw_error" -version = "0.2.0-beta4" -source = "git+https://github.com/leptos-rs/leptos#3b1b2e2dcc0b373f249c85fe537ffedb6ec48235" +name = "thread_local" +version = "1.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" dependencies = [ - "pin-project-lite", + "cfg-if", + "once_cell", ] [[package]] @@ -3195,9 +3251,7 @@ checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" dependencies = [ "deranged", "itoa", - "libc", "num-conv", - "num_threads", "powerfmt", "serde", "time-core", @@ -3245,13 +3299,44 @@ dependencies = [ "bytes", "libc", "mio", - "parking_lot 0.12.3", "pin-project-lite", - "signal-hook-registry", "socket2", + "tokio-macros", "windows-sys 0.52.0", ] +[[package]] +name = "tokio-macros" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.76", +] + +[[package]] +name = "tokio-rustls" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +dependencies = [ + "rustls 0.21.12", + "tokio", +] + +[[package]] +name = "tokio-rustls" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" +dependencies = [ + "rustls 0.23.12", + "rustls-pki-types", + "tokio", +] + [[package]] name = "tokio-stream" version = "0.1.15" @@ -3272,6 +3357,8 @@ dependencies = [ "bytes", "futures-core", "futures-sink", + "futures-util", + "hashbrown 0.14.5", "pin-project-lite", "tokio", ] @@ -3285,7 +3372,7 @@ dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.20", + "toml_edit", ] [[package]] @@ -3297,17 +3384,6 @@ dependencies = [ "serde", ] -[[package]] -name = "toml_edit" -version = "0.19.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" -dependencies = [ - "indexmap", - "toml_datetime", - "winnow 0.5.40", -] - [[package]] name = "toml_edit" version = "0.22.20" @@ -3318,9 +3394,73 @@ dependencies = [ "serde", "serde_spanned", "toml_datetime", - "winnow 0.6.18", + "winnow", ] +[[package]] +name = "tower" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +dependencies = [ + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2873938d487c3cfb9aed7546dc9f2711d867c9f90c46b889989a2cb84eba6b4f" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper 0.1.2", + "tokio", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-http" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9cd434a998747dd2c4276bc96ee2e0c7a2eadf3cae88e52be55a05fa9053f5" +dependencies = [ + "bitflags", + "bytes", + "futures-util", + "http", + "http-body", + "http-body-util", + "http-range-header", + "httpdate", + "mime", + "mime_guess", + "percent-encoding", + "pin-project-lite", + "tokio", + "tokio-util", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-layer" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" + +[[package]] +name = "tower-service" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" + [[package]] name = "tracing" version = "0.1.40" @@ -3341,7 +3481,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.76", ] [[package]] @@ -3351,26 +3491,63 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", + "valuable", +] + +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +dependencies = [ + "nu-ansi-term", + "sharded-slab", + "smallvec", + "thread_local", + "tracing-core", + "tracing-log", +] + +[[package]] +name = "tracing-wasm" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4575c663a174420fa2d78f4108ff68f65bf2fbb7dd89f33749b6e826b3626e07" +dependencies = [ + "tracing", + "tracing-subscriber", + "wasm-bindgen", ] [[package]] name = "typed-builder" -version = "0.19.1" +version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a06fbd5b8de54c5f7c91f6fe4cebb949be2125d7758e630bb58b1d831dbce600" +checksum = "77739c880e00693faef3d65ea3aad725f196da38b22fdc7ea6ded6e1ce4d3add" dependencies = [ "typed-builder-macro", ] [[package]] name = "typed-builder-macro" -version = "0.19.1" +version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9534daa9fd3ed0bd911d462a37f172228077e7abf18c18a5f67199d959205f8" +checksum = "1f718dfaf347dcb5b983bfc87608144b0bad87970aebcbea5ce44d2a30c08e63" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.76", ] [[package]] @@ -3433,6 +3610,12 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" +[[package]] +name = "untrusted" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" + [[package]] name = "untrusted" version = "0.9.0" @@ -3446,7 +3629,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" dependencies = [ "form_urlencoded", - "idna", + "idna 0.5.0", "percent-encoding", ] @@ -3466,10 +3649,10 @@ dependencies = [ ] [[package]] -name = "v_htmlescape" -version = "0.15.8" +name = "valuable" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e8257fbc510f0a46eb602c10215901938b5c2a7d5e70fc11483b1d3c9b5b18c" +checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" [[package]] name = "vcpkg" @@ -3511,7 +3694,7 @@ version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "once_cell", "wasm-bindgen-macro", ] @@ -3527,7 +3710,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn", + "syn 2.0.76", "wasm-bindgen-shared", ] @@ -3537,7 +3720,7 @@ version = "0.4.43" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "js-sys", "wasm-bindgen", "web-sys", @@ -3561,7 +3744,7 @@ checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.76", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -3606,14 +3789,20 @@ dependencies = [ [[package]] name = "whoami" -version = "1.5.1" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44ab49fad634e88f55bf8f9bb3abd2f27d7204172a112c7c9987e01c1c94ea9" +checksum = "372d5b87f58ec45c384ba03563b03544dc5fadc3983e434b286913f5b4a9bb6d" dependencies = [ - "redox_syscall 0.4.1", + "redox_syscall", "wasite", ] +[[package]] +name = "widestring" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7219d36b6eac893fa81e84ebe06485e7dcbb616177469b142df14f1f4deb1311" + [[package]] name = "winapi" version = "0.3.9" @@ -3645,6 +3834,15 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows-core" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +dependencies = [ + "windows-targets 0.52.6", +] + [[package]] name = "windows-sys" version = "0.48.0" @@ -3793,15 +3991,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" -[[package]] -name = "winnow" -version = "0.5.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" -dependencies = [ - "memchr", -] - [[package]] name = "winnow" version = "0.6.18" @@ -3811,6 +4000,16 @@ dependencies = [ "memchr", ] +[[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 = "xxhash-rust" version = "0.8.12" @@ -3841,7 +4040,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.76", ] [[package]] @@ -3849,6 +4048,63 @@ name = "zeroize" version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.76", +] + +[[package]] +name = "zip" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc5e4288ea4057ae23afc69a4472434a87a2495cafce6632fd1c4ec9f5cf3494" +dependencies = [ + "aes", + "arbitrary", + "bzip2", + "constant_time_eq", + "crc32fast", + "crossbeam-utils", + "deflate64", + "displaydoc", + "flate2", + "hmac", + "indexmap", + "lzma-rs", + "memchr", + "pbkdf2", + "rand", + "sha1", + "thiserror", + "time", + "zeroize", + "zopfli", + "zstd", +] + +[[package]] +name = "zopfli" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5019f391bac5cf252e93bbcc53d039ffd62c7bfb7c150414d61369afe57e946" +dependencies = [ + "bumpalo", + "crc32fast", + "lockfree-object-pool", + "log", + "once_cell", + "simd-adler32", +] [[package]] name = "zstd" diff --git a/Cargo.toml b/Cargo.toml index b6facf7..c51b9bb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,44 +7,71 @@ edition = "2021" crate-type = ["cdylib", "rlib"] [dependencies] -actix-files = { version = "0.6.6", optional = true } -actix-web = { version = "4.8", optional = true, features = ["macros"] } -anyhow = "1.0" -broadcaster = "1.0" -console_log = "1.0" -console_error_panic_hook = "0.1.7" -serde = { version = "1.0", features = ["derive"] } -futures = "0.3.30" -leptos = { git = "https://github.com/leptos-rs/leptos" } -leptos_router = { git = "https://github.com/leptos-rs/leptos" } -leptos_meta = { git = "https://github.com/leptos-rs/leptos" } -leptos_actix = { git = "https://github.com/leptos-rs/leptos", optional = true } -log = "0.4.22" -simple_logger = "5.0" -gloo = { git = "https://github.com/rustwasm/gloo" } -sqlx = { version = "0.8.0", features = [ +axum = { version = "0.7", optional = true } +jsonwebtoken = { version = "9", optional = true } +tokio = { version = "1.39", features = ["rt-multi-thread"], optional = true } +tower = { version = "0.4", optional = true } +tower-http = { version = "0.5", features = ["fs", "trace"], optional = true } +sqlx = { version = "0.8", features = [ "runtime-tokio-rustls", "sqlite", + "mysql", + "chrono", ], optional = true } +mail-send = { version = "0.4.7", optional = true } +regex = { version = "1.10", optional = true } + +serde = { version = "1.0", features = ["derive"] } + +console_error_panic_hook = { version = "0.1", optional = true } + +leptos = { version = "0.6.15" } +leptos_meta = { version = "0.6.15" } +leptos_axum = { version = "0.6.11", optional = true } +leptos_router = { version = "0.6.15" } + +tracing = { version = "0.1" } +tracing-subscriber = { version = "0.3", features = ["fmt"] } +tracing-wasm = { version = "0.2", optional = true } + wasm-bindgen = "0.2.93" -tokio = { version = "1.39", features = ["rt", "time"], optional = true } -server_fn = { version = "0.6", features = ["cbor"] } [features] -hydrate = ["leptos/hydrate"] +default = ["ssr", "hydrate"] +hydrate = [ + "leptos/hydrate", + "leptos_meta/hydrate", + "leptos_router/hydrate", + "dep:tracing-wasm", + "dep:console_error_panic_hook", +] ssr = [ - "dep:actix-files", - "dep:actix-web", - "dep:sqlx", "leptos/ssr", - "leptos_actix", "leptos_meta/ssr", "leptos_router/ssr", + "dep:leptos_axum", + "dep:axum", + "dep:jsonwebtoken", "dep:tokio", + "dep:tower", + "dep:tower-http", + "dep:sqlx", + "dep:regex", + "dep:mail-send", ] [package.metadata.cargo-all-features] -denylist = ["actix-files", "actix-web", "leptos_actix", "sqlx"] +denylist = [ + "axum", + "tower", + "tower-http", + "tokio", + "sqlx", + "leptos_axum", + "jsonwebtoken", + "regex", + "mail-send", +] skip_feature_sets = [["csr", "ssr"], ["csr", "hydrate"], ["ssr", "hydrate"]] [package.metadata.leptos] @@ -60,7 +87,7 @@ style-file = "style/output.css" # [Optional] Files in the asset-dir will be copied to the site-root directory assets-dir = "public" # The IP and port (ex: 127.0.0.1:3000) where the server serves the content. Use it in your server setup. -site-addr = "127.0.0.1:3000" +site-addr = "127.0.0.1:3002" # The port to use for automatic reload monitoring reload-port = 3001 # [Optional] Command to use when running end2end tests. It will run in the end2end dir. diff --git a/Makefile.toml b/Makefile.toml deleted file mode 100644 index 23e176d..0000000 --- a/Makefile.toml +++ /dev/null @@ -1,4 +0,0 @@ -extend = [ - { path = "../cargo-make/main.toml" }, - { path = "../cargo-make/cargo-leptos-test.toml" }, -] diff --git a/README.md b/README.md index fa32471..eb8067c 100644 --- a/README.md +++ b/README.md @@ -3,16 +3,20 @@ source : https://github.com/Oishh/leptos-axum-tailwind-start wasm-pack build --target=web --debug --no-default-features --features=hydrate cargo run --no-default-features --features=ssr -npx tailwindcss -i ./input.css -o ./pkg/output.css --watch +npx tailwindcss -i ./input.css -o ./style/output.css --watch ## features [x] ssr -[ ] MySQL +[x] MySQL [x] tailwindcss [x] router +[ ] value gestion des erreurs [ ] deploy ## pages [ ] liens [ ] formulaire [ ] recap capteurs + + +// https://github.com/Bechma/realworld-leptos diff --git a/migrations/20221207194615_init.up.sql b/migrations/20221207194615_init.up.sql new file mode 100644 index 0000000..eab03c2 --- /dev/null +++ b/migrations/20221207194615_init.up.sql @@ -0,0 +1,9 @@ +CREATE TABLE IF NOT EXISTS data ( + id int(11) NOT NULL AUTO_INCREMENT, + service varchar(12) NOT NULL, + device varchar(12) NOT NULL, + type varchar(12) NOT NULL, + data varchar(12) NOT NULL, + date_data datetime NOT NULL, + PRIMARY KEY (id) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; diff --git a/migrations/examples/todo_app_sqlite/migrations/20221118172000_create_todo_table.sql b/migrations/examples/todo_app_sqlite/migrations/20221118172000_create_todo_table.sql deleted file mode 100644 index ba72c35..0000000 --- a/migrations/examples/todo_app_sqlite/migrations/20221118172000_create_todo_table.sql +++ /dev/null @@ -1,6 +0,0 @@ -CREATE TABLE IF NOT EXISTS todos -( - id INTEGER NOT NULL PRIMARY KEY, - title VARCHAR, - completed BOOLEAN -); diff --git a/src/app.rs b/src/app.rs index d058e36..40d3f20 100644 --- a/src/app.rs +++ b/src/app.rs @@ -1,34 +1,34 @@ -use crate::values::FormValues; -use crate::todo::TodoApp; -use leptos::prelude::*; +use leptos::*; use leptos_meta::*; -use leptos_router::{ - components::{FlatRoutes, Route, Router}, - ParamSegment, SsrMode, StaticSegment, -}; +use leptos_router::*; + +use crate::routes::*; #[component] pub fn App() -> impl IntoView { - // Provides context that manages stylesheets, titles, meta tags, etc. provide_meta_context(); - let fallback = || view! { "Page not found." }.into_view(); view! { - - -
- - - - - - -
-
+ + + + + <div class="dark:bg-slate-950 dark:text-white h-screen flex flex-col"> + <Router> + <nav class="flex gap-5 px-2 py-1 "> + <a href="/">Home</a> + <a href="/formulaire">Formulaire</a> + </nav> + <main class="flex-1"> + <Routes> + <Route path="/" view=move || view! { <Home/> }/> + <Route path="/formulaire" view=move || view! { <FormValues/> }/> + //<Route path="/*any" view=move || view! { <NotFound/> }/> + </Routes> + </main> + <footer>Footer</footer> + </Router> + </div> } } diff --git a/src/database.rs b/src/database.rs new file mode 100644 index 0000000..84051e3 --- /dev/null +++ b/src/database.rs @@ -0,0 +1,26 @@ +static DB: std::sync::OnceLock<sqlx::MySqlPool> = std::sync::OnceLock::new(); + +async fn create_pool() -> sqlx::MySqlPool { + let database_url = std::env::var("DATABASE_URL").expect("no database url specify"); + dbg!(&database_url); + let pool = sqlx::mysql::MySqlPoolOptions::new() + .max_connections(4) + .connect(database_url.as_str()) + .await + .expect("could not connect to database_url"); + + sqlx::migrate!() + .run(&pool) + .await + .expect("migrations failed"); + + pool +} + +pub async fn init_db() -> Result<(), sqlx::Pool<sqlx::MySql>> { + DB.set(create_pool().await) +} + +pub fn get_db<'a>() -> &'a sqlx::MySqlPool { + DB.get().expect("database unitialized") +} diff --git a/src/lib.rs b/src/lib.rs index 003a6f9..29b1e8a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,18 +1,18 @@ pub mod app; -pub mod todo; -pub mod values; +#[cfg(feature = "ssr")] +pub(crate) mod database; +pub(crate) mod models; +pub(crate) mod routes; +#[cfg(feature = "ssr")] +pub mod setup; #[cfg(feature = "hydrate")] #[wasm_bindgen::prelude::wasm_bindgen] pub fn hydrate() { use app::App; - use todo::TodoApp; + use leptos::*; - use crate::app::*; - use crate::todo::*; - use crate::values::*; console_error_panic_hook::set_once(); - _ = console_log::init_with_level(log::Level::Debug); - leptos::mount::hydrate_body(App); + mount_to_body(move || view! { <App/> }); } diff --git a/src/main.rs b/src/main.rs index 3f85813..2a5db52 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,75 +1,12 @@ -mod todo; -mod values; - #[cfg(feature = "ssr")] -mod ssr { - pub use actix_files::Files; - pub use actix_web::*; - pub use leptos::prelude::*; - pub use leptos_actix::{generate_route_list, LeptosRoutes}; - pub use rust_leptos::app::*; - - #[get("/style.css")] - pub async fn css() -> impl Responder { - actix_files::NamedFile::open_async("./style/output.css").await - } - - #[get("/favicon.ico")] - pub async fn favicon() -> impl Responder { - actix_files::NamedFile::open_async("./target/site/favicon.ico").await - } +#[tokio::main] +async fn main() { + rust_leptos::setup::init_app(None).await; } -#[cfg(feature = "ssr")] -#[actix_web::main] -async fn main() -> std::io::Result<()> { - use self::{ssr::*, values::ssr::*}; - - use leptos_meta::*; - - let mut conn = db().await.expect("couldn't connect to DB"); - sqlx::migrate!() - .run(&mut conn) - .await - .expect("could not run SQLx migrations"); - - let conf = get_configuration(None).unwrap(); - let addr = conf.leptos_options.site_addr; - println!("listening on http://{}", &addr); - - HttpServer::new(move || { - // Generate the list of routes in your Leptos App - let routes = generate_route_list(App); - let leptos_options = &conf.leptos_options; - let site_root = &leptos_options.site_root; - - App::new() - .service(css) - .leptos_routes(routes, { - let leptos_options = leptos_options.clone(); - move || { - use leptos::prelude::*; - view! { - <!DOCTYPE html> - <html lang="en"> - <head> - <meta charset="utf-8"/> - <meta name="viewport" content="width=device-width, initial-scale=1"/> - <Stylesheet href="/pkg/rust_leptos.css"/> - <AutoReload options=leptos_options.clone() /> - <HydrationScripts options=leptos_options.clone()/> - <MetaTags/> - </head> - <body class="dark:bg-slate-900 dark:text-gray-50"> - <App/> - </body> - </html> - } - }}) - .service(Files::new("/", site_root)) - .wrap(middleware::Compress::default()) - }) - .bind(&addr)? - .run() - .await +#[cfg(not(feature = "ssr"))] +pub fn main() { + // no client-side main function + // unless we want this to work with e.g., Trunk for pure client-side testing + // see lib.rs for hydration function instead } diff --git a/src/models/mod.rs b/src/models/mod.rs new file mode 100644 index 0000000..e432055 --- /dev/null +++ b/src/models/mod.rs @@ -0,0 +1,3 @@ +mod value; +pub use value::Value; +pub use value::OPTIONS; diff --git a/src/models/value.rs b/src/models/value.rs new file mode 100644 index 0000000..4949b2c --- /dev/null +++ b/src/models/value.rs @@ -0,0 +1,81 @@ +use chrono::prelude::*; +use serde::{Deserialize, Serialize}; + +#[derive(Debug)] +pub struct Option { + pub value: &'static str, + pub name: &'static str, + service: &'static str, + device: &'static str, + r_type: &'static str, +} + +pub const OPTIONS: &[Option] = &[ + Option { + value: "citerne", + name: "Citerne", + service: "home", + device: "citerne", + r_type: "height", + }, + Option { + value: "eau", + name: "Eau", + service: "home", + device: "eau", + r_type: "volume", + }, + Option { + value: "elec-hight", + name: "Electricité heure pleine", + service: "home", + device: "elec", + r_type: "pleine", + }, + Option { + value: "elec-low", + name: "Electricité heure creuse", + service: "home", + device: "elec", + r_type: "creuse", + }, +]; + +#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] +pub struct Value { + id: u16, + service: String, + capteur: String, + type_donnee: String, + donnee: String, +} + +impl Value { + #[cfg(feature = "ssr")] + pub async fn insert( + device: String, + value: String, + ) -> Result<sqlx::mysql::MySqlQueryResult, sqlx::Error> { + let option = match find_option(&device) { + Ok(option) => option, + Err(err) => panic!("{}", err), + }; + + sqlx::query!( + "INSERT INTO data(service, device, type, data, date_data) VALUES (?, ?, ?, ?, NOW())", + option.service, + option.device, + option.r_type, + value, + ) + .execute(crate::database::get_db()) + .await + } +} + +fn find_option(value: &str) -> Result<&Option, &str> { + OPTIONS + .iter() + .find(|&option| option.value == value) + .ok_or("No option found with the given value") +} diff --git a/src/routes/mod.rs b/src/routes/mod.rs new file mode 100644 index 0000000..77313f3 --- /dev/null +++ b/src/routes/mod.rs @@ -0,0 +1,3 @@ +pub use value::*; + +mod value; diff --git a/src/routes/value.rs b/src/routes/value.rs new file mode 100644 index 0000000..574a3d1 --- /dev/null +++ b/src/routes/value.rs @@ -0,0 +1,51 @@ +use leptos::*; +use leptos_meta::*; +use leptos_router::*; + +use crate::models::OPTIONS; + +#[server(ValueAction, "/api")] +pub async fn add_value(device: String, value: String) -> Result<(), ServerFnError> { + crate::models::Value::insert(device, value) + .await + .map(|_| ()) + .map_err(|x| { + let err = format!("Error while posting a comment: {x:?}"); + tracing::error!("{err}"); + ServerFnError::ServerError("Could not post a comment, try again later".into()) + }) +} + +#[component] +pub fn FormValues() -> impl IntoView { + let value_action = create_server_action::<ValueAction>(); + let result = value_action.version(); + let reset_value = create_rw_signal(""); + //let add_value = ServerAction::<AddValue>::new(); + //let value = add_value.value(); + //let has_error = move || value.with(|val| matches!(val, Some(Err(_)))); + + view! { + <div class="my-0 mx-auto max-w-3xl text-center"> + <h2 class="p-6 text-4xl">"Formulaire"</h2> + + <ActionForm action=value_action attr:class="border"> + <div> + <label class="block">Capteur</label> + <select name="device" class="dark:bg-slate-800 px-2 py-1"> + {OPTIONS.into_iter() + .map(|option| view! { <option value={option.value}>{option.name}</option>}) + .collect::<Vec<_>>()} + </select> + </div> + <div> + <label class="block">Valeur</label> + <input type="text" name="value" prop:value=move || reset_value.get() class="text-center dark:bg-slate-800 dark:text-white px-2 py-1" /> + </div> + <div> + <button type="submit" class="bg-slate-600 px-2 py-1 w-48 mt-3">Valider</button> + </div> + </ActionForm> + </div> + } +} diff --git a/src/setup.rs b/src/setup.rs new file mode 100644 index 0000000..63a7353 --- /dev/null +++ b/src/setup.rs @@ -0,0 +1,49 @@ +use leptos::*; +use leptos_axum::{generate_route_list, LeptosRoutes}; + +use crate::app::App; + +/// # Panics +/// +/// Will panic if anything is badly setup from database, or web server +pub async fn init_app(configuration_path: Option<&str>) { + tracing_subscriber::fmt() + .with_level(true) + .with_max_level(tracing::Level::INFO) + .init(); + // Init the pool into static + crate::database::init_db() + .await + .expect("problem during initialization of the database"); + + // Get leptos configuration + let conf = get_configuration(configuration_path).await.unwrap(); + let addr = conf.leptos_options.site_addr; + // Generate the list of routes in your Leptos App + let routes = generate_route_list(|| view! { <App/> }); + let leptos_options = conf.leptos_options; + let serve_dir = tower_http::services::ServeDir::new(&leptos_options.site_root) + .append_index_html_on_directories(false); + + let app = axum::Router::new() + .leptos_routes(&leptos_options, routes, || view! { <App/> }) + .fallback_service(serve_dir) + .layer( + tower_http::trace::TraceLayer::new_for_http() + .make_span_with( + tower_http::trace::DefaultMakeSpan::new().level(tracing::Level::INFO), + ) + .on_request(tower_http::trace::DefaultOnRequest::new().level(tracing::Level::INFO)) + .on_response( + tower_http::trace::DefaultOnResponse::new().level(tracing::Level::INFO), + ) + .on_failure( + tower_http::trace::DefaultOnFailure::new().level(tracing::Level::ERROR), + ), + ) + //.layer(axum::middleware::from_fn(crate::auth::auth_middleware)) + .with_state(leptos_options); + + let listener = tokio::net::TcpListener::bind(addr).await.unwrap(); + axum::serve(listener, app).await.unwrap(); +} diff --git a/src/todo.rs b/src/todo.rs deleted file mode 100644 index f8eff33..0000000 --- a/src/todo.rs +++ /dev/null @@ -1,172 +0,0 @@ -use leptos::either::Either; -use leptos::prelude::*; -use serde::{Deserialize, Serialize}; -//use server_fn::ServerFnError; - -#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] -#[cfg_attr(feature = "ssr", derive(sqlx::FromRow))] -pub struct Todo { - id: u16, - title: String, - completed: bool, -} - -#[cfg(feature = "ssr")] -pub mod ssr { - // use http::{header::SET_COOKIE, HeaderMap, HeaderValue, StatusCode}; - use leptos::server_fn::ServerFnError; - use sqlx::{Connection, SqliteConnection}; - - pub async fn db() -> Result<SqliteConnection, ServerFnError> { - Ok(SqliteConnection::connect("sqlite:Todos.db").await?) - } -} - -#[server] -pub async fn get_todos() -> Result<Vec<Todo>, ServerFnError> { - use self::ssr::*; - - // this is just an example of how to access server context injected in the handlers - let req_parts = use_context::<leptos_actix::Request>(); - - if let Some(req_parts) = req_parts { - println!("Path = {:?}", req_parts.path()); - } - - use futures::TryStreamExt; - - let mut conn = db().await?; - - let mut todos = Vec::new(); - let mut rows = sqlx::query_as::<_, Todo>("SELECT * FROM todos").fetch(&mut conn); - while let Some(row) = rows.try_next().await? { - todos.push(row); - } - - // Lines below show how to set status code and headers on the response - // let resp = expect_context::<ResponseOptions>(); - // resp.set_status(StatusCode::IM_A_TEAPOT); - // resp.insert_header(SET_COOKIE, HeaderValue::from_str("fizz=buzz").unwrap()); - - Ok(todos) -} - -#[server] -pub async fn add_todo(title: String) -> Result<(), ServerFnError> { - use self::ssr::*; - let mut conn = db().await?; - - // fake API delay - std::thread::sleep(std::time::Duration::from_millis(250)); - - match sqlx::query("INSERT INTO todos (title, completed) VALUES ($1, false)") - .bind(title) - .execute(&mut conn) - .await - { - Ok(_row) => Ok(()), - Err(e) => Err(ServerFnError::ServerError(e.to_string())), - } -} - -#[server] -pub async fn delete_todo(id: u16) -> Result<(), ServerFnError> { - use self::ssr::*; - let mut conn = db().await?; - - Ok(sqlx::query("DELETE FROM todos WHERE id = $1") - .bind(id) - .execute(&mut conn) - .await - .map(|_| ())?) -} - -#[component] -pub fn TodoApp() -> impl IntoView { - view! { - <header> - <h1>"My Tasks"</h1> - </header> - <main> - <Todos/> - </main> - } -} - -#[component] -pub fn Todos() -> impl IntoView { - let add_todo = ServerMultiAction::<AddTodo>::new(); - let submissions = add_todo.submissions(); - let delete_todo = ServerAction::<DeleteTodo>::new(); - - // list of todos is loaded from the server in reaction to changes - let todos = Resource::new( - move || { - ( - delete_todo.version().get(), - add_todo.version().get(), - delete_todo.version().get(), - ) - }, - move |_| get_todos(), - ); - - let existing_todos = move || { - Suspend::new(async move { - todos.await.map(|todos| { - if todos.is_empty() { - Either::Left(view! { <p>"No tasks were found."</p> }) - } else { - Either::Right( - todos - .iter() - .map(move |todo| { - let id = todo.id; - view! { - <li> - {todo.title.clone()} <ActionForm action=delete_todo> - <input type="hidden" name="id" value=id/> - <input type="submit" value="X"/> - </ActionForm> - </li> - } - }) - .collect::<Vec<_>>(), - ) - } - }) - }) - }; - - view! { - <MultiActionForm action=add_todo> - <label>"Add a Todo" <input type="text" name="title"/></label> - <input type="submit" value="Add"/> - </MultiActionForm> - <div> - <Transition fallback=move || view! { <p>"Loading..."</p> }> - // TODO: ErrorBoundary here seems to break Suspense in Actix - // <ErrorBoundary fallback=|errors| view! { <p>"Error: " {move || format!("{:?}", errors.get())}</p> }> - <ul> - {existing_todos} - {move || { - submissions - .get() - .into_iter() - .filter(|submission| submission.pending().get()) - .map(|submission| { - view! { - <li class="pending"> - {move || submission.input().get().map(|data| data.title)} - </li> - } - }) - .collect::<Vec<_>>() - }} - - </ul> - // </ErrorBoundary> - </Transition> - </div> - } -} diff --git a/src/values.rs b/src/values.rs deleted file mode 100644 index 77931d6..0000000 --- a/src/values.rs +++ /dev/null @@ -1,118 +0,0 @@ -use leptos::prelude::*; -use leptos_meta::*; -use leptos_router::*; -use serde::{Deserialize, Serialize}; - -pub struct Option { - value: &'static str, - name: &'static str, - topic: &'static str, -} - -pub const OPTIONS: &[Option] = &[ - Option { - value: "citerne", - name: "Citerne", - topic: "home/citerne/height", - }, - Option { - value: "eau", - name: "Eau", - topic: "home/eau/volume", - }, - Option { - value: "elec-hight", - name: "Electricité heure pleine", - topic: "home/elec-hight/pleine", - }, - Option { - value: "elec-low", - name: "Electricité heure creuse", - topic: "home/elec-low/creuse", - }, -]; - -#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] -pub struct Value { - id: u16, - service: String, - capteur: String, - type_donnee: String, - donnee: String, -} - -#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] -#[cfg_attr(feature = "ssr", derive(sqlx::FromRow))] -struct HeftyData { - capteur: String, - value: String, -} - -#[cfg(feature = "ssr")] -pub mod ssr { - // use http::{header::SET_COOKIE, HeaderMap, HeaderValue, StatusCode}; - use leptos::server_fn::ServerFnError; - use sqlx::{Connection, SqliteConnection}; - - pub async fn db() -> Result<SqliteConnection, ServerFnError> { - Ok(SqliteConnection::connect("sqlite:Todos.db").await?) - } -} - -#[component] -fn Form() -> impl IntoView { - view! { - <div class="my-0 mx-auto max-w-3xl text-center"> - <h2 class="p-6 text-4xl">"Formulaire"</h2> - </div> - } -} - -#[component] -pub fn FormValues() -> impl IntoView { - let add_value = ServerAction::<AddValue>::new(); - let value = add_value.value(); - let has_error = move || value.with(|val| matches!(val, Some(Err(_)))); - - view! { - <div class="my-0 mx-auto max-w-3xl text-center"> - <h2 class="p-6 text-4xl">"Formulaire"</h2> - - <ActionForm action=add_value attr:class="border"> - <div> - <label class="block">Capteur</label> - <select name="hefty_arg[capteur]"> - {OPTIONS.into_iter() - .map(|option| view! { <option value={option.value}>{option.name}</option>}) - .collect::<Vec<_>>()} - </select> - </div> - <div> - <label class="block">Valeur</label> - <input type="text" name="hefty_arg[value]" /> - </div> - <div> - <button type="submit">Valider</button> - </div> - </ActionForm> - </div> - } -} - -#[server(AddValue, "/api/add-value")] -pub async fn add_value(hefty_arg: HeftyData) -> Result<(), ServerFnError> { - use self::ssr::*; - let mut conn = db().await?; - - dbg!(&hefty_arg); - - match sqlx::query("INSERT INTO donnees (service, donnee) VALUES ($1, $2)") - .bind(hefty_arg.capteur) - .bind(hefty_arg.value) - .execute(&mut conn) - .await - { - Ok(_) => Ok(()), - Err(e) => Err(ServerFnError::ServerError(e.to_string())), - } -} diff --git a/style.css b/style.css deleted file mode 100644 index e3663d2..0000000 --- a/style.css +++ /dev/null @@ -1,3 +0,0 @@ -.pending { - color: purple; -} diff --git a/style/output.css b/style/output.css index f6daf32..2fefbd2 100644 --- a/style/output.css +++ b/style/output.css @@ -558,6 +558,10 @@ video { margin-bottom: 0px; } +.mt-3 { + margin-top: 0.75rem; +} + .block { display: block; } @@ -570,60 +574,49 @@ video { height: 100vh; } +.w-48 { + width: 12rem; +} + .max-w-3xl { max-width: 48rem; } -.gap-3 { - gap: 0.75rem; +.flex-1 { + flex: 1 1 0%; } -.rounded-lg { - border-radius: 0.5rem; +.flex-col { + flex-direction: column; } -.bg-amber-600 { +.gap-5 { + gap: 1.25rem; +} + +.border { + border-width: 1px; +} + +.bg-slate-600 { --tw-bg-opacity: 1; - background-color: rgb(217 119 6 / var(--tw-bg-opacity)); + background-color: rgb(71 85 105 / var(--tw-bg-opacity)); } .p-6 { padding: 1.5rem; } -.px-10 { - padding-left: 2.5rem; - padding-right: 2.5rem; -} - .px-2 { padding-left: 0.5rem; padding-right: 0.5rem; } -.px-5 { - padding-left: 1.25rem; - padding-right: 1.25rem; -} - .py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; } -.py-3 { - padding-top: 0.75rem; - padding-bottom: 0.75rem; -} - -.pb-10 { - padding-bottom: 2.5rem; -} - -.text-left { - text-align: left; -} - .text-center { text-align: center; } @@ -633,29 +626,29 @@ video { line-height: 2.5rem; } -.text-gray-50 { +.\*\:text-black > * { --tw-text-opacity: 1; - color: rgb(249 250 251 / var(--tw-text-opacity)); -} - -.text-white { - --tw-text-opacity: 1; - color: rgb(255 255 255 / var(--tw-text-opacity)); -} - -.hover\:bg-sky-700:hover { - --tw-bg-opacity: 1; - background-color: rgb(3 105 161 / var(--tw-bg-opacity)); + color: rgb(0 0 0 / var(--tw-text-opacity)); } @media (prefers-color-scheme: dark) { - .dark\:bg-slate-900 { + .dark\:bg-slate-800 { --tw-bg-opacity: 1; - background-color: rgb(15 23 42 / var(--tw-bg-opacity)); + background-color: rgb(30 41 59 / var(--tw-bg-opacity)); } .dark\:bg-slate-950 { --tw-bg-opacity: 1; background-color: rgb(2 6 23 / var(--tw-bg-opacity)); } + + .dark\:text-white { + --tw-text-opacity: 1; + color: rgb(255 255 255 / var(--tw-text-opacity)); + } + + .dark\:text-black { + --tw-text-opacity: 1; + color: rgb(0 0 0 / var(--tw-text-opacity)); + } }