diff --git a/Cargo.lock b/Cargo.lock index 846e799..e0903b9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -40,7 +40,7 @@ dependencies = [ "flate2", "futures-core", "h2", - "http", + "http 0.2.11", "httparse", "httpdate", "itoa", @@ -75,7 +75,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d22475596539443685426b6bdadb926ad0ecaefdfc5fb05e5e3441f15463c511" dependencies = [ "bytestring", - "http", + "http 0.2.11", "regex", "serde", "tracing", @@ -148,7 +148,7 @@ dependencies = [ "bytes", "bytestring", "cfg-if", - "cookie", + "cookie 0.16.2", "derive_more", "encoding_rs", "futures-core", @@ -328,6 +328,12 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea50b14b7a4b9343f8c627a7a53c52076482bd4bdad0a24fd3ec533ed616cc2c" +[[package]] +name = "anyhow" +version = "1.0.79" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" + [[package]] name = "approx" version = "0.5.1" @@ -504,6 +510,34 @@ dependencies = [ "critical-section", ] +[[package]] +name = "attribute-derive" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c94f43ede6f25dab1dea046bff84d85dea61bd49aba7a9011ad66c0d449077b" +dependencies = [ + "attribute-derive-macro", + "proc-macro2", + "quote", + "syn 2.0.48", +] + +[[package]] +name = "attribute-derive-macro" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b409e2b2d2dc206d2c0ad3575a93f001ae21a1593e2d0c69b69c308e63f3b422" +dependencies = [ + "collection_literals", + "interpolator", + "manyhow", + "proc-macro-utils", + "proc-macro2", + "quote", + "quote-use", + "syn 2.0.48", +] + [[package]] name = "autocfg" version = "1.1.0" @@ -716,6 +750,7 @@ dependencies = [ "bytecheck_derive", "ptr_meta", "simdutf8", + "uuid", ] [[package]] @@ -767,6 +802,12 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "camino" +version = "1.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c" + [[package]] name = "cc" version = "1.0.83" @@ -870,6 +911,33 @@ dependencies = [ "windows-targets 0.48.5", ] +[[package]] +name = "ciborium" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42e69ffd6f0917f5c029256a24d0161db17cea3997d185db0d35926308770f0e" +dependencies = [ + "ciborium-io", + "ciborium-ll", + "serde", +] + +[[package]] +name = "ciborium-io" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05afea1e0a06c9be33d539b876f1ce3692f4afea2cb41f740e7743225ed1c757" + +[[package]] +name = "ciborium-ll" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57663b653d948a338bfb3eeba9bb2fd5fcfaecb9e199e87e1eda4d9e8b240fd9" +dependencies = [ + "ciborium-io", + "half", +] + [[package]] name = "cipher" version = "0.4.4" @@ -931,6 +999,12 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" +[[package]] +name = "collection_literals" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "186dce98367766de751c42c4f03970fc60fc012296e706ccbb9d5df9b6c1e271" + [[package]] name = "colorchoice" version = "1.0.0" @@ -946,18 +1020,61 @@ dependencies = [ "crossbeam-utils", ] +[[package]] +name = "config" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23738e11972c7643e4ec947840fc463b6a571afcd3e735bdfce7d03c7a784aca" +dependencies = [ + "async-trait", + "lazy_static", + "nom", + "pathdiff", + "serde", + "toml", +] + [[package]] name = "const-oid" version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" +[[package]] +name = "const_format" +version = "0.2.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3a214c7af3d04997541b18d432afaff4c455e79e2029079647e72fc2bd27673" +dependencies = [ + "const_format_proc_macros", +] + +[[package]] +name = "const_format_proc_macros" +version = "0.2.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7f6ff08fd20f4f299298a28e2dfa8a8ba1036e6cd2460ac1de7b425d76f2500" +dependencies = [ + "proc-macro2", + "quote", + "unicode-xid", +] + [[package]] name = "convert_case" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" +[[package]] +name = "convert_case" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec182b0ca2f35d8fc196cf3404988fd8b8c739a4d270ff118a398feb0cbec1ca" +dependencies = [ + "unicode-segmentation", +] + [[package]] name = "cookie" version = "0.16.2" @@ -969,6 +1086,17 @@ dependencies = [ "version_check", ] +[[package]] +name = "cookie" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3cd91cf61412820176e137621345ee43b3f4423e589e7ae4e50d601d93e35ef8" +dependencies = [ + "percent-encoding", + "time", + "version_check", +] + [[package]] name = "core-foundation" version = "0.9.4" @@ -1103,12 +1231,37 @@ dependencies = [ "syn 2.0.48", ] +[[package]] +name = "dashmap" +version = "5.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" +dependencies = [ + "cfg-if", + "hashbrown 0.14.3", + "lock_api", + "once_cell", + "parking_lot_core", +] + [[package]] name = "data-encoding" version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" +[[package]] +name = "default-struct-builder" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8fa90da96b8fd491f5754d1f7a731f73921e3b7aa0ce333c821a0e43666ac14" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "der" version = "0.7.8" @@ -1130,13 +1283,24 @@ dependencies = [ "serde", ] +[[package]] +name = "derive-where" +version = "1.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62d671cc41a825ebabc75757b62d3d168c577f9149b2d49ece1dad1f72119d25" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "derive_more" version = "0.99.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" dependencies = [ - "convert_case", + "convert_case 0.4.0", "proc-macro2", "quote", "rustc_version", @@ -1224,6 +1388,12 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" +[[package]] +name = "drain_filter_polyfill" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "669a445ee724c5c69b1b06fe0b63e70a1c84bc9bb7d9696cd4f4e3ec45050408" + [[package]] name = "dyn-clone" version = "1.0.16" @@ -1605,6 +1775,52 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" +[[package]] +name = "gloo-net" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43aaa242d1239a8822c15c645f02166398da4f8b5c4bae795c1f5b44e9eee173" +dependencies = [ + "futures-channel", + "futures-core", + "futures-sink", + "gloo-utils", + "http 0.2.11", + "js-sys", + "pin-project", + "serde", + "serde_json", + "thiserror", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "gloo-timers" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbb143cf96099802033e0d4f4963b19fd2e0b728bcf076cd9cf7f6634f092994" +dependencies = [ + "futures-channel", + "futures-core", + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "gloo-utils" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b5555354113b18c547c1d3a98fbf7fb32a9ff4f6fa112ce823a21641a0ba3aa" +dependencies = [ + "js-sys", + "serde", + "serde_json", + "wasm-bindgen", + "web-sys", +] + [[package]] name = "h2" version = "0.3.22" @@ -1616,7 +1832,7 @@ dependencies = [ "futures-core", "futures-sink", "futures-util", - "http", + "http 0.2.11", "indexmap 2.1.0", "slab", "tokio", @@ -1624,6 +1840,16 @@ dependencies = [ "tracing", ] +[[package]] +name = "half" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc52e53916c08643f1b56ec082790d1e86a32e58dc5268f897f313fbae7b4872" +dependencies = [ + "cfg-if", + "crunchy", +] + [[package]] name = "hash32" version = "0.2.1" @@ -1701,6 +1927,15 @@ dependencies = [ "digest", ] +[[package]] +name = "html-escape" +version = "0.2.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d1ad449764d627e22bfd7cd5e8868264fc9236e07c752972b4080cd351cb476" +dependencies = [ + "utf8-width", +] + [[package]] name = "http" version = "0.2.11" @@ -1712,6 +1947,17 @@ dependencies = [ "itoa", ] +[[package]] +name = "http" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b32afd38673a8016f7c9ae69e5af41a58f81b1d31689040f2f1959594ce194ea" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + [[package]] name = "http-body" version = "0.4.5" @@ -1719,7 +1965,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" dependencies = [ "bytes", - "http", + "http 0.2.11", "pin-project-lite", ] @@ -1767,7 +2013,7 @@ dependencies = [ "futures-core", "futures-util", "h2", - "http", + "http 0.2.11", "http-body", "httparse", "httpdate", @@ -1787,7 +2033,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ "futures-util", - "http", + "http 0.2.11", "hyper", "log", "rustls", @@ -1900,6 +2146,18 @@ version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8bb03732005da905c88227371639bf1ad885cc712789c011c31c5fb3ab3ccf02" +[[package]] +name = "interpolator" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71dd52191aae121e8611f1e8dc3e324dd0dd1dee1e6dd91d10ee07a3cfb4d9d8" + +[[package]] +name = "inventory" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f958d3d68f4167080a18141e10381e7634563984a537f2a49a30fd8e53ac5767" + [[package]] name = "ipnet" version = "2.9.0" @@ -1945,6 +2203,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.9" @@ -2037,6 +2304,204 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" +[[package]] +name = "leptos" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c115de7c6fca2164133e18328777d02c371434ace38049ac02886b5cffd22dc" +dependencies = [ + "cfg-if", + "leptos_config", + "leptos_dom", + "leptos_macro", + "leptos_reactive", + "leptos_server", + "server_fn", + "tracing", + "typed-builder", + "typed-builder-macro", + "web-sys", +] + +[[package]] +name = "leptos-struct-table" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "693906b6ed91978d359233466a361eb5548242101233283ca360bac16d27c568" +dependencies = [ + "async-trait", + "chrono", + "leptos", + "leptos-struct-table-macro", + "leptos-use", + "paste", + "serde", + "thiserror", + "uuid", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "leptos-struct-table-macro" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7a7b4657689f2ee349fd96c2991957fa278be4b1ba895b2ed9a5c93c9bdb58c" +dependencies = [ + "darling", + "heck", + "proc-macro2", + "quote", + "syn 2.0.48", +] + +[[package]] +name = "leptos-use" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "885ab55e844f9dda9f1394bce011b5ff5332e0a1782c165c78d53f3138cbbd38" +dependencies = [ + "async-trait", + "cfg-if", + "cookie 0.18.0", + "default-struct-builder", + "futures-util", + "gloo-timers", + "gloo-utils", + "js-sys", + "lazy_static", + "leptos", + "paste", + "thiserror", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "leptos_config" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "055262ff3660e95ec95cadd8a05a02070d624354e08e30b99c14a81023feb2dc" +dependencies = [ + "config", + "regex", + "serde", + "thiserror", + "typed-builder", +] + +[[package]] +name = "leptos_dom" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adfea7feb9c488448db466ca0673b691ec2a05efb0b2bc6626b7248ee04bb39c" +dependencies = [ + "async-recursion", + "cfg-if", + "drain_filter_polyfill", + "futures", + "getrandom", + "html-escape", + "indexmap 2.1.0", + "itertools 0.12.1", + "js-sys", + "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.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ba8f68f7c3135975eb34ed19210272ebef2d6f422d138ff87a726b8793fe105" +dependencies = [ + "anyhow", + "camino", + "indexmap 2.1.0", + "parking_lot", + "proc-macro2", + "quote", + "rstml", + "serde", + "syn 2.0.48", + "walkdir", +] + +[[package]] +name = "leptos_macro" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "039c510dafb7d9997e4b8accfcced5675fabc65720caf544592df32432d6d65a" +dependencies = [ + "attribute-derive", + "cfg-if", + "convert_case 0.6.0", + "html-escape", + "itertools 0.12.1", + "leptos_hot_reload", + "prettyplease", + "proc-macro-error", + "proc-macro2", + "quote", + "rstml", + "server_fn_macro", + "syn 2.0.48", + "tracing", + "uuid", +] + +[[package]] +name = "leptos_reactive" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b30c5bc7f3496d6ba399578171cf133c50d2172f9791fe292db4da2fd0d8cec4" +dependencies = [ + "base64", + "cfg-if", + "futures", + "indexmap 2.1.0", + "paste", + "pin-project", + "rkyv", + "rustc-hash", + "self_cell", + "serde", + "serde-wasm-bindgen", + "serde_json", + "slotmap", + "thiserror", + "tracing", + "wasm-bindgen-futures", +] + +[[package]] +name = "leptos_server" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f06b9b860479385991fad54cbee372382aee3c1e75ca78b5da6f8bda90c153e1" +dependencies = [ + "inventory", + "lazy_static", + "leptos_macro", + "leptos_reactive", + "serde", + "server_fn", + "thiserror", + "tracing", +] + [[package]] name = "lexicmp" version = "0.1.0" @@ -2164,6 +2629,29 @@ dependencies = [ "libc", ] +[[package]] +name = "manyhow" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "516b76546495d933baa165075b95c0a15e8f7ef75e53f56b19b7144d80fd52bd" +dependencies = [ + "manyhow-macros", + "proc-macro2", + "quote", + "syn 2.0.48", +] + +[[package]] +name = "manyhow-macros" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ba072c0eadade3160232e70893311f1f8903974488096e2eb8e48caba2f0cf1" +dependencies = [ + "proc-macro-utils", + "proc-macro2", + "quote", +] + [[package]] name = "matchers" version = "0.1.0" @@ -2437,7 +2925,7 @@ dependencies = [ "either", "futures", "futures-util", - "http", + "http 0.2.11", "http-body", "hyper", "hyper-rustls", @@ -2474,7 +2962,7 @@ dependencies = [ "either", "futures", "futures-util", - "http", + "http 0.2.11", "http-body", "hyper", "hyper-rustls", @@ -2601,6 +3089,12 @@ 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" @@ -2653,6 +3147,12 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17359afc20d7ab31fdb42bb844c8b3bb1dabd7dcf7e68428492da7f16966fcef" +[[package]] +name = "pathdiff" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" + [[package]] name = "pbkdf2" version = "0.12.2" @@ -2861,6 +3361,17 @@ dependencies = [ "version_check", ] +[[package]] +name = "proc-macro-utils" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f59e109e2f795a5070e69578c4dc101068139f74616778025ae1011d4cd41a8" +dependencies = [ + "proc-macro2", + "quote", + "smallvec", +] + [[package]] name = "proc-macro2" version = "1.0.78" @@ -2870,6 +3381,19 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "proc-macro2-diagnostics" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af066a9c399a26e020ada66a034357a868728e72cd426f3adcd35f80d88d88c8" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.48", + "version_check", + "yansi", +] + [[package]] name = "psl-types" version = "2.0.11" @@ -2914,6 +3438,29 @@ dependencies = [ "proc-macro2", ] +[[package]] +name = "quote-use" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7b5abe3fe82fdeeb93f44d66a7b444dedf2e4827defb0a8e69c437b2de2ef94" +dependencies = [ + "quote", + "quote-use-macros", + "syn 2.0.48", +] + +[[package]] +name = "quote-use-macros" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97ea44c7e20f16017a76a245bb42188517e13d16dcb1aa18044bc406cdc3f4af" +dependencies = [ + "derive-where", + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "radium" version = "0.7.0" @@ -3082,7 +3629,7 @@ dependencies = [ "futures-core", "futures-util", "h2", - "http", + "http 0.2.11", "http-body", "hyper", "hyper-rustls", @@ -3107,7 +3654,7 @@ dependencies = [ "url", "wasm-bindgen", "wasm-bindgen-futures", - "wasm-streams", + "wasm-streams 0.3.0", "web-sys", "webpki-roots", "winreg", @@ -3267,6 +3814,20 @@ dependencies = [ "smallvec", ] +[[package]] +name = "rstml" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe542870b8f59dd45ad11d382e5339c9a1047cde059be136a7016095bbdefa77" +dependencies = [ + "proc-macro2", + "proc-macro2-diagnostics", + "quote", + "syn 2.0.48", + "syn_derive", + "thiserror", +] + [[package]] name = "rust-embed" version = "8.1.0" @@ -3545,6 +4106,12 @@ dependencies = [ "libc", ] +[[package]] +name = "self_cell" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58bf37232d3bb9a2c4e641ca2a11d83b5062066f88df7fed36c28772046d65ba" + [[package]] name = "semver" version = "1.0.20" @@ -3559,6 +4126,9 @@ name = "send_wrapper" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" +dependencies = [ + "futures-core", +] [[package]] name = "serde" @@ -3569,6 +4139,17 @@ dependencies = [ "serde_derive", ] +[[package]] +name = "serde-wasm-bindgen" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9b713f70513ae1f8d92665bbbbda5c295c2cf1da5542881ae5eefe20c9af132" +dependencies = [ + "js-sys", + "serde", + "wasm-bindgen", +] + [[package]] name = "serde_derive" version = "1.0.196" @@ -3613,6 +4194,17 @@ dependencies = [ "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_urlencoded" version = "0.7.1" @@ -3667,6 +4259,59 @@ dependencies = [ "unsafe-libyaml", ] +[[package]] +name = "server_fn" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97fab54d9dd2d7e9eba4efccac41d2ec3e7c6e9973d14c0486d662a32662320c" +dependencies = [ + "bytes", + "ciborium", + "const_format", + "dashmap", + "futures", + "gloo-net", + "http 1.0.0", + "js-sys", + "once_cell", + "send_wrapper", + "serde", + "serde_json", + "serde_qs", + "server_fn_macro_default", + "thiserror", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-streams 0.4.0", + "web-sys", + "xxhash-rust", +] + +[[package]] +name = "server_fn_macro" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3be6011b586a0665546b7ced372b0be690d9e005d3f8524795da2843274d7720" +dependencies = [ + "const_format", + "convert_case 0.6.0", + "proc-macro2", + "quote", + "syn 2.0.48", + "xxhash-rust", +] + +[[package]] +name = "server_fn_macro_default" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "752ed78ec49132d154b922cf5ab6485680cab039a75740c48ea2db621ad481da" +dependencies = [ + "server_fn_macro", + "syn 2.0.48", +] + [[package]] name = "sha1" version = "0.10.6" @@ -3823,6 +4468,7 @@ name = "skootrs-model" version = "0.1.0" dependencies = [ "chrono", + "leptos-struct-table", "regress", "schemars", "serde", @@ -3871,6 +4517,16 @@ dependencies = [ "autocfg", ] +[[package]] +name = "slotmap" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbff4acf519f630b3a3ddcfaea6c06b42174d9a44bc70c620e9ed1649d58b82a" +dependencies = [ + "serde", + "version_check", +] + [[package]] name = "smallvec" version = "1.11.2" @@ -4399,6 +5055,15 @@ dependencies = [ "tracing", ] +[[package]] +name = "toml" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" +dependencies = [ + "serde", +] + [[package]] name = "toml_datetime" version = "0.6.5" @@ -4443,7 +5108,7 @@ dependencies = [ "bytes", "futures-core", "futures-util", - "http", + "http 0.2.11", "http-body", "http-range-header", "iri-string", @@ -4614,7 +5279,7 @@ dependencies = [ "byteorder", "bytes", "data-encoding", - "http", + "http 0.2.11", "httparse", "log", "rand", @@ -4625,6 +5290,26 @@ dependencies = [ "utf-8", ] +[[package]] +name = "typed-builder" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "444d8748011b93cb168770e8092458cb0f8854f931ff82fdf6ddfbd72a9c933e" +dependencies = [ + "typed-builder-macro", +] + +[[package]] +name = "typed-builder-macro" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "563b3b88238ec95680aef36bdece66896eaa7ce3c0f1b4f39d38fb2435261352" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "typenum" version = "1.17.0" @@ -4747,6 +5432,12 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" +[[package]] +name = "utf8-width" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86bd8d4e895da8537e5315b8254664e6b769c4ff3db18321b297a1e7004392e3" + [[package]] name = "utf8parse" version = "0.2.1" @@ -4952,6 +5643,19 @@ dependencies = [ "web-sys", ] +[[package]] +name = "wasm-streams" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b65dc4c90b63b118468cf747d8bf3566c1913ef60be765b5730ead9e0a3ba129" +dependencies = [ + "futures-util", + "js-sys", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + [[package]] name = "wasmtimer" version = "0.2.0" @@ -5210,6 +5914,18 @@ dependencies = [ "tap", ] +[[package]] +name = "xxhash-rust" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53be06678ed9e83edb1745eb72efc0bbcd7b5c3c35711a860906aed827a13d61" + +[[package]] +name = "yansi" +version = "1.0.0-rc.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1367295b8f788d371ce2dbc842c7b709c73ee1364d30351dd300ec2203b12377" + [[package]] name = "zerocopy" version = "0.7.32" diff --git a/skootrs-model/Cargo.toml b/skootrs-model/Cargo.toml index dbfd560..b4b9892 100644 --- a/skootrs-model/Cargo.toml +++ b/skootrs-model/Cargo.toml @@ -13,6 +13,10 @@ utoipa = { version = "4.1.0" } chrono = { version = "0.4.31", features = ["serde"] } schemars = { version = "0.8.16", features = ["chrono", "url"] } regress = "0.7.1" +leptos-struct-table = { version = "0.7.0", features = ["chrono", "uuid"] } [lints] workspace = true + +[features] +openapi = [] diff --git a/skootrs-model/src/skootrs/facet.rs b/skootrs-model/src/skootrs/facet.rs index a4594c2..2f09e9e 100644 --- a/skootrs-model/src/skootrs/facet.rs +++ b/skootrs-model/src/skootrs/facet.rs @@ -16,18 +16,21 @@ use std::fmt; use serde::{Serialize, Deserialize}; +#[cfg(feature = "openapi")] use utoipa::ToSchema; use super::{InitializedSource, InitializedRepo, InitializedEcosystem}; -#[derive(Serialize, Deserialize, Clone, Debug, ToSchema)] +#[derive(Serialize, Deserialize, Clone, Debug)] +#[cfg_attr(feature = "openapi", derive(ToSchema))] pub enum InitializedFacet { SourceFile(SourceFileFacet), SourceBundle(SourceBundleFacet), APIBundle(APIBundleFacet), } -#[derive(Serialize, Deserialize, Clone, Debug, ToSchema)] +#[derive(Serialize, Deserialize, Clone, Debug)] +#[cfg_attr(feature = "openapi", derive(ToSchema))] pub enum FacetParams { SourceFile(SourceFileFacetParams), SourceBundle(SourceBundleFacetParams), @@ -35,12 +38,14 @@ pub enum FacetParams { } /// This is required to create an ordering of what facets get applied -#[derive(Serialize, Deserialize, Clone, Debug, ToSchema)] +#[derive(Serialize, Deserialize, Clone, Debug)] +#[cfg_attr(feature = "openapi", derive(ToSchema))] pub struct FacetSetParams { pub facets_params: Vec, } -#[derive(Serialize, Deserialize, Clone, Debug, ToSchema)] +#[derive(Serialize, Deserialize, Clone, Debug)] +#[cfg_attr(feature = "openapi", derive(ToSchema))] pub struct CommonFacetParams { pub project_name: String, pub source: InitializedSource, @@ -48,14 +53,16 @@ pub struct CommonFacetParams { pub ecosystem: InitializedEcosystem, } -#[derive(Serialize, Deserialize, Clone, Debug, ToSchema)] +#[derive(Serialize, Deserialize, Clone, Debug)] +#[cfg_attr(feature = "openapi", derive(ToSchema))] pub struct SourceFileFacet { pub name: String, pub path: String, pub facet_type: SupportedFacetType, } -#[derive(Serialize, Deserialize, Clone, Debug, ToSchema)] +#[derive(Serialize, Deserialize, Clone, Debug)] +#[cfg_attr(feature = "openapi", derive(ToSchema))] pub struct SourceFileFacetParams { //pub name: String, //pub path: String, @@ -64,45 +71,52 @@ pub struct SourceFileFacetParams { pub facet_type: SupportedFacetType, } -#[derive(Serialize, Deserialize, Clone, Debug, ToSchema)] +#[derive(Serialize, Deserialize, Clone, Debug)] +#[cfg_attr(feature = "openapi", derive(ToSchema))] pub struct SourceFileContent { pub name: String, pub path: String, pub content: String, } -#[derive(Serialize, Deserialize, Clone, Debug, ToSchema)] +#[derive(Serialize, Deserialize, Clone, Debug)] +#[cfg_attr(feature = "openapi", derive(ToSchema))] pub struct SourceBundleFacet { pub source_files: Vec, pub facet_type: SupportedFacetType, } -#[derive(Serialize, Deserialize, Clone, Debug, ToSchema)] +#[derive(Serialize, Deserialize, Clone, Debug)] +#[cfg_attr(feature = "openapi", derive(ToSchema))] pub struct SourceBundleFacetParams { pub common: CommonFacetParams, pub facet_type: SupportedFacetType, } -#[derive(Serialize, Deserialize, Clone, Debug, ToSchema)] +#[derive(Serialize, Deserialize, Clone, Debug)] +#[cfg_attr(feature = "openapi", derive(ToSchema))] pub struct APIContent { pub name: String, pub url: String, pub response: String, } -#[derive(Serialize, Deserialize, Clone, Debug, ToSchema)] +#[derive(Serialize, Deserialize, Clone, Debug)] +#[cfg_attr(feature = "openapi", derive(ToSchema))] pub struct APIBundleFacet { pub apis: Vec, pub facet_type: SupportedFacetType, } -#[derive(Serialize, Deserialize, Clone, Debug, ToSchema)] +#[derive(Serialize, Deserialize, Clone, Debug)] +#[cfg_attr(feature = "openapi", derive(ToSchema))] pub struct APIBundleFacetParams { pub common: CommonFacetParams, pub facet_type: SupportedFacetType, } -#[derive(Serialize, Deserialize, Clone, Debug, ToSchema, PartialEq, Eq)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq)] +#[cfg_attr(feature = "openapi", derive(ToSchema))] pub enum SupportedFacetType { Readme, SecurityInsights, diff --git a/skootrs-model/src/skootrs/mod.rs b/skootrs-model/src/skootrs/mod.rs index 1a2fc92..f7fa76b 100644 --- a/skootrs-model/src/skootrs/mod.rs +++ b/skootrs-model/src/skootrs/mod.rs @@ -43,7 +43,8 @@ pub const SUPPORTED_ECOSYSTEMS: [&str; 2] = [ /// Represents a project that has been initialized. This is the data and state of a project that has been /// created. -#[derive(Serialize, Deserialize, ToSchema, Clone, Debug)] +#[derive(Serialize, Deserialize, Clone, Debug)] +#[cfg_attr(feature = "openapi", derive(ToSchema))] pub struct InitializedProject { pub repo: InitializedRepo, pub ecosystem: InitializedEcosystem, @@ -52,7 +53,8 @@ pub struct InitializedProject { } /// Represents the parameters for creating a project. -#[derive(Serialize, Deserialize, ToSchema, Clone, Debug)] +#[derive(Serialize, Deserialize, Clone, Debug)] +#[cfg_attr(feature = "openapi", derive(ToSchema))] pub struct ProjectParams { pub name: String, pub repo_params: RepoParams, @@ -61,7 +63,8 @@ pub struct ProjectParams { } /// Represents an initialized repository along with its host. -#[derive(Serialize, Deserialize, Clone, Debug, ToSchema)] +#[derive(Serialize, Deserialize, Clone, Debug)] +#[cfg_attr(feature = "openapi", derive(ToSchema))] pub enum InitializedRepo { Github(InitializedGithubRepo) } @@ -83,7 +86,8 @@ impl InitializedRepo { } /// Represents an initialized Github repository. -#[derive(Serialize, Deserialize, Clone, Debug, ToSchema)] +#[derive(Serialize, Deserialize, Clone, Debug)] +#[cfg_attr(feature = "openapi", derive(ToSchema))] pub struct InitializedGithubRepo { pub name: String, pub organization: GithubUser, @@ -108,20 +112,23 @@ impl InitializedGithubRepo { /// Represents an initialized ecosystem. The enum is used to represent the different types of ecosystems /// that are supported by Skootrs currently. -#[derive(Serialize, Deserialize, Clone, Debug, ToSchema)] +#[derive(Serialize, Deserialize, Clone, Debug)] +#[cfg_attr(feature = "openapi", derive(ToSchema))] pub enum InitializedEcosystem { Go(InitializedGo), Maven(InitializedMaven) } /// Represents the parameters for creating a repository. -#[derive(Serialize, Deserialize, Clone, Debug, ToSchema)] +#[derive(Serialize, Deserialize, Clone, Debug)] +#[cfg_attr(feature = "openapi", derive(ToSchema))] pub enum RepoParams { Github(GithubRepoParams) } /// Represents the parameters for initializing an ecosystem. -#[derive(Serialize, Deserialize, Clone, Debug, ToSchema)] +#[derive(Serialize, Deserialize, Clone, Debug)] +#[cfg_attr(feature = "openapi", derive(ToSchema))] pub enum EcosystemParams { Go(GoParams), Maven(MavenParams) @@ -130,7 +137,8 @@ pub enum EcosystemParams { /// Represents a Github user which is really just whether or not a repo belongs to a user or organization. /// This is used to create a repo in the Github API. The Github API has different calls for creating a repo /// that belongs to the current authorized user or an organization the user has access to. -#[derive(Serialize, Deserialize, Clone, Debug, ToSchema)] +#[derive(Serialize, Deserialize, Clone, Debug)] +#[cfg_attr(feature = "openapi", derive(ToSchema))] pub enum GithubUser { User(String), Organization(String), @@ -147,7 +155,8 @@ impl GithubUser { } /// Represents the parameters for creating a Github repository. -#[derive(Serialize, Deserialize, Clone, Debug, ToSchema)] +#[derive(Serialize, Deserialize, Clone, Debug)] +#[cfg_attr(feature = "openapi", derive(ToSchema))] pub struct GithubRepoParams { pub name: String, pub description: String, @@ -170,7 +179,8 @@ impl GithubRepoParams { } /// Represents the parameters for initializing a source code repository. -#[derive(Serialize, Deserialize, Clone, Debug, ToSchema)] +#[derive(Serialize, Deserialize, Clone, Debug)] +#[cfg_attr(feature = "openapi", derive(ToSchema))] pub struct SourceParams { pub parent_path: String, } @@ -189,7 +199,8 @@ pub struct InitializedSource { } /// Represents the Maven ecosystem. -#[derive(Serialize, Deserialize, Clone, Debug, ToSchema)] +#[derive(Serialize, Deserialize, Clone, Debug)] +#[cfg_attr(feature = "openapi", derive(ToSchema))] pub struct MavenParams { /// The group ID of the Maven project. pub group_id: String, @@ -198,7 +209,8 @@ pub struct MavenParams { } /// Represents the Go ecosystem. -#[derive(Serialize, Deserialize, Clone, Debug, ToSchema)] +#[derive(Serialize, Deserialize, Clone, Debug)] +#[cfg_attr(feature = "openapi", derive(ToSchema))] pub struct GoParams { /// The name of the Go module. pub name: String, @@ -207,7 +219,8 @@ pub struct GoParams { } /// Represents an initialized go module. -#[derive(Serialize, Deserialize, Clone, Debug, ToSchema)] +#[derive(Serialize, Deserialize, Clone, Debug)] +#[cfg_attr(feature = "openapi", derive(ToSchema))] pub struct InitializedGo { /// The name of the Go module. pub name: String, @@ -223,7 +236,8 @@ impl InitializedGo { } /// Represents an initialized Maven project. -#[derive(Serialize, Deserialize, Clone, Debug, ToSchema)] +#[derive(Serialize, Deserialize, Clone, Debug)] +#[cfg_attr(feature = "openapi", derive(ToSchema))] pub struct InitializedMaven { /// The group ID of the Maven project. pub group_id: String, diff --git a/skootrs-rest/Cargo.toml b/skootrs-rest/Cargo.toml index d0a1c24..62c4092 100644 --- a/skootrs-rest/Cargo.toml +++ b/skootrs-rest/Cargo.toml @@ -16,7 +16,7 @@ serde_json = "1.0.112" tokio = { version = "1.34.0", features = ["full", "tracing", "macros", "rt-multi-thread"] } serde = { version = "1.0.193", features = ["derive"] } skootrs-lib = { path = "../skootrs-lib" } -skootrs-model = { path = "../skootrs-model" } +skootrs-model = { path = "../skootrs-model", features = ["openapi"] } opentelemetry-jaeger = "0.20.0" opentelemetry = "0.21.0" tracing-subscriber = "0.3.18"