From e8f0cf49ad9e0716c0f735c0f7a112497a6460cc Mon Sep 17 00:00:00 2001 From: trisua Date: Wed, 20 Aug 2025 00:50:42 -0400 Subject: [PATCH] chore: clean up repo and rebrand --- .gitignore | 1 + Cargo.lock | 2677 +--------------------------------- Cargo.toml | 19 +- README.md | 6 +- app/.gitignore | 7 - app/docs/example.md | 1 - app/public/app.js | 208 --- app/public/reference | 1 - app/public/style.css | 702 --------- app/templates_src/error.lisp | 9 - app/templates_src/index.lisp | 10 - app/templates_src/root.lisp | 75 - src/config.rs | 75 - src/database/mod.rs | 29 - src/database/sql/mod.rs | 1 - src/main.rs | 95 +- src/markdown.rs | 1042 ------------- src/model.rs | 1 - src/routes.rs | 88 -- 19 files changed, 46 insertions(+), 5001 deletions(-) delete mode 100644 app/.gitignore delete mode 100644 app/docs/example.md delete mode 100644 app/public/app.js delete mode 120000 app/public/reference delete mode 100644 app/public/style.css delete mode 100644 app/templates_src/error.lisp delete mode 100644 app/templates_src/index.lisp delete mode 100644 app/templates_src/root.lisp delete mode 100644 src/config.rs delete mode 100644 src/database/mod.rs delete mode 100644 src/database/sql/mod.rs delete mode 100644 src/markdown.rs delete mode 100644 src/model.rs delete mode 100644 src/routes.rs diff --git a/.gitignore b/.gitignore index 2f7896d..147adbf 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ target/ +public/ diff --git a/Cargo.lock b/Cargo.lock index f624075..c799b56 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -26,68 +26,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "ammonia" -version = "4.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6b346764dd0814805de8abf899fe03065bcee69bb1a4771c785817e39f3978f" -dependencies = [ - "cssparser", - "html5ever", - "maplit", - "tendril", - "url", -] - -[[package]] -name = "android-tzdata" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" - -[[package]] -name = "android_system_properties" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" -dependencies = [ - "libc", -] - -[[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", -] - -[[package]] -name = "async-trait" -version = "0.1.88" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e539d3fca749fcee5236ab05e93a52867dd549cc157c8cb7f99595f3cedffdb5" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "atomic-waker" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" - -[[package]] -name = "autocfg" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" - [[package]] name = "axum" version = "0.8.4" @@ -146,29 +84,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "axum-extra" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45bf463831f5131b7d3c756525b305d40f1185b688565648a92e1392ca35713d" -dependencies = [ - "axum", - "axum-core", - "bytes", - "cookie", - "futures-util", - "http", - "http-body", - "http-body-util", - "mime", - "pin-project-lite", - "rustversion", - "serde", - "tower", - "tower-layer", - "tower-service", -] - [[package]] name = "axum-macros" version = "0.5.0" @@ -192,55 +107,15 @@ dependencies = [ "miniz_oxide", "object", "rustc-demangle", - "windows-targets 0.52.6", + "windows-targets", ] -[[package]] -name = "base16ct" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" - -[[package]] -name = "base32" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "022dfe9eb35f19ebbcb51e0b40a5ab759f46ad60cadf7297e0bd085afb50e076" - [[package]] name = "base64" version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" -[[package]] -name = "bb8" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "212d8b8e1a22743d9241575c6ba822cf9c8fef34771c86ab7e477a4fbfd254e5" -dependencies = [ - "futures-util", - "parking_lot", - "tokio", -] - -[[package]] -name = "bb8-postgres" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e570e6557cd0f88d28d32afa76644873271a70dc22656df565b2021c4036aa9c" -dependencies = [ - "bb8", - "tokio", - "tokio-postgres", -] - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - [[package]] name = "bitflags" version = "2.9.2" @@ -256,144 +131,18 @@ dependencies = [ "generic-array", ] -[[package]] -name = "bstr" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "234113d19d0d7d613b40e86fb654acf958910802bcceab913a4f9e7cda03b1a4" -dependencies = [ - "memchr", - "serde", -] - -[[package]] -name = "bumpalo" -version = "3.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" - -[[package]] -name = "bytemuck" -version = "1.23.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c76a5792e44e4abe34d3abf15636779261d45a7450612059293d1d2cfc63422" - -[[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" - -[[package]] -name = "byteorder-lite" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" - [[package]] name = "bytes" version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" -[[package]] -name = "cc" -version = "1.2.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "deec109607ca693028562ed836a5f1c4b8bd77755c4e132fc5ce11b0b6211ae7" -dependencies = [ - "shlex", -] - [[package]] name = "cfg-if" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9555578bc9e57714c812a1f84e4fc5b4d21fcb063490c624de019f7464c91268" -[[package]] -name = "chrono" -version = "0.4.41" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c469d952047f47f91b68d1cba3f10d63c11d73e4636f24f08daf0278abf01c4d" -dependencies = [ - "android-tzdata", - "iana-time-zone", - "js-sys", - "num-traits", - "wasm-bindgen", - "windows-link", -] - -[[package]] -name = "chrono-tz" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93698b29de5e97ad0ae26447b344c482a7284c737d9ddc5f9e52b74a336671bb" -dependencies = [ - "chrono", - "chrono-tz-build", - "phf 0.11.3", -] - -[[package]] -name = "chrono-tz-build" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c088aee841df9c3041febbb73934cfc39708749bf96dc827e3359cd39ef11b1" -dependencies = [ - "parse-zoneinfo", - "phf 0.11.3", - "phf_codegen", -] - -[[package]] -name = "combine" -version = "4.6.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" -dependencies = [ - "bytes", - "futures-core", - "memchr", - "pin-project-lite", - "tokio", - "tokio-util", -] - -[[package]] -name = "constant_time_eq" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" - -[[package]] -name = "cookie" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ddef33a339a91ea89fb53151bd0a4689cfce27055c291dfa69945475d22c747" -dependencies = [ - "percent-encoding", - "time", - "version_check", -] - -[[package]] -name = "core-foundation" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "core-foundation-sys" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" - [[package]] name = "cpufeatures" version = "0.2.17" @@ -403,40 +152,6 @@ dependencies = [ "libc", ] -[[package]] -name = "crc32fast" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "crossbeam-deque" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" -dependencies = [ - "crossbeam-epoch", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.9.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" - [[package]] name = "crypto-common" version = "0.1.6" @@ -447,29 +162,6 @@ dependencies = [ "typenum", ] -[[package]] -name = "cssparser" -version = "0.35.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e901edd733a1472f944a45116df3f846f54d37e67e68640ac8bb69689aca2aa" -dependencies = [ - "cssparser-macros", - "dtoa-short", - "itoa", - "phf 0.11.3", - "smallvec", -] - -[[package]] -name = "cssparser-macros" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331" -dependencies = [ - "quote", - "syn", -] - [[package]] name = "data-encoding" version = "2.9.0" @@ -477,20 +169,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a2330da5de22e8a3cb63252ce2abb30116bf5265e89c0e01bc17015ce30a476" [[package]] -name = "deranged" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c9e6a11ca8224451684bc0d7d5a7adbf8f2fd6887261a1cfc3c0432f9d4068e" +name = "delivery" +version = "1.0.0" dependencies = [ - "powerfmt", + "axum", + "dotenv", + "tokio", + "tower-http", + "tracing", + "tracing-subscriber", ] -[[package]] -name = "deunicode" -version = "1.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abd57806937c9cc163efc8ea3910e00a62e2aeb0b8119f1793a978088f8f6b04" - [[package]] name = "digest" version = "0.10.7" @@ -499,18 +188,6 @@ checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer", "crypto-common", - "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", ] [[package]] @@ -519,113 +196,12 @@ version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f" -[[package]] -name = "dtoa" -version = "1.0.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6add3b8cff394282be81f3fc1a0605db594ed69890078ca6e2cab1c408bcf04" - -[[package]] -name = "dtoa-short" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd1511a7b6a56299bd043a9c167a6d2bfb37bf84a6dfceaba651168adfb43c87" -dependencies = [ - "dtoa", -] - -[[package]] -name = "either" -version = "1.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" - -[[package]] -name = "emojis" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f52f3d011046a013bdefbc63a5523b06ad0c0f1e227941baf98475496229d634" -dependencies = [ - "phf 0.12.1", -] - -[[package]] -name = "encoding_rs" -version = "0.8.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "equivalent" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" - -[[package]] -name = "errno" -version = "0.3.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "778e2ac28f6c47af28e4907f13ffd1e1ddbd400980a9abd7c8df189bf578a5ad" -dependencies = [ - "libc", - "windows-sys 0.59.0", -] - -[[package]] -name = "fallible-iterator" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" - -[[package]] -name = "fastrand" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" - -[[package]] -name = "fdeflate" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e6853b52649d4ac5c0bd02320cddc5ba956bdb407c4b75a2c6b75bf51500f8c" -dependencies = [ - "simd-adler32", -] - -[[package]] -name = "flate2" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a3d7db9596fecd151c5f638c0ee5d5bd487b6e0ea232e5dc96d5250f6f94b1d" -dependencies = [ - "crc32fast", - "miniz_oxide", -] - [[package]] name = "fnv" version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" -[[package]] -name = "foreign-types" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -dependencies = [ - "foreign-types-shared", -] - -[[package]] -name = "foreign-types-shared" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" - [[package]] name = "form_urlencoded" version = "1.2.1" @@ -635,16 +211,6 @@ dependencies = [ "percent-encoding", ] -[[package]] -name = "futf" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df420e2e84819663797d1ec6544b13c5be84629e7bb00dc960d6917db2987843" -dependencies = [ - "mac", - "new_debug_unreachable", -] - [[package]] name = "futures-channel" version = "0.3.31" @@ -652,7 +218,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", - "futures-sink", ] [[package]] @@ -661,17 +226,6 @@ version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" -[[package]] -name = "futures-macro" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "futures-sink" version = "0.3.31" @@ -691,7 +245,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-core", - "futures-macro", "futures-sink", "futures-task", "pin-project-lite", @@ -699,19 +252,6 @@ dependencies = [ "slab", ] -[[package]] -name = "generator" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cc16584ff22b460a382b7feec54b23d2908d858152e5739a120b949293bd74e" -dependencies = [ - "cc", - "libc", - "log", - "rustversion", - "windows", -] - [[package]] name = "generic-array" version = "0.14.7" @@ -722,26 +262,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "getopts" -version = "0.2.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cba6ae63eb948698e300f645f87c70f76630d505f23b8907cf1e193ee85048c1" -dependencies = [ - "unicode-width", -] - -[[package]] -name = "getrandom" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" -dependencies = [ - "cfg-if", - "libc", - "wasi 0.11.1+wasi-snapshot-preview1", -] - [[package]] name = "getrandom" version = "0.3.3" @@ -760,87 +280,6 @@ version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" -[[package]] -name = "glob" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" - -[[package]] -name = "globset" -version = "0.4.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54a1028dfc5f5df5da8a56a73e6c153c9a9708ec57232470703592a3f18e49f5" -dependencies = [ - "aho-corasick", - "bstr", - "log", - "regex-automata 0.4.9", - "regex-syntax 0.8.5", -] - -[[package]] -name = "globwalk" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bf760ebf69878d9fd8f110c89703d90ce35095324d1f1edcb595c63945ee757" -dependencies = [ - "bitflags 2.9.2", - "ignore", - "walkdir", -] - -[[package]] -name = "h2" -version = "0.4.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17da50a276f1e01e0ba6c029e47b7100754904ee8a278f886546e98575380785" -dependencies = [ - "atomic-waker", - "bytes", - "fnv", - "futures-core", - "futures-sink", - "http", - "indexmap", - "slab", - "tokio", - "tokio-util", - "tracing", -] - -[[package]] -name = "hashbrown" -version = "0.15.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5971ac85611da7067dbfcabef3c70ebb5606018acd9e2a3903a0da507521e0d5" - -[[package]] -name = "hex_fmt" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b07f60793ff0a4d9cef0f18e63b5357e06209987153a64648c972c1e5aff336f" - -[[package]] -name = "hmac" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" -dependencies = [ - "digest", -] - -[[package]] -name = "html5ever" -version = "0.35.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55d958c2f74b664487a2035fe1dadb032c48718a03b63f3ab0b8537db8549ed4" -dependencies = [ - "log", - "markup5ever", - "match_token", -] - [[package]] name = "http" version = "1.3.1" @@ -893,15 +332,6 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" -[[package]] -name = "humansize" -version = "2.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6cb51c9a029ddc91b07a787f1d86b53ccfa49b0e86688c946ebe8d3555685dd7" -dependencies = [ - "libm", -] - [[package]] name = "hyper" version = "1.6.0" @@ -911,7 +341,6 @@ dependencies = [ "bytes", "futures-channel", "futures-util", - "h2", "http", "http-body", "httparse", @@ -920,39 +349,6 @@ dependencies = [ "pin-project-lite", "smallvec", "tokio", - "want", -] - -[[package]] -name = "hyper-rustls" -version = "0.27.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3c93eb611681b207e1fe55d5a71ecf91572ec8a6705cdb6857f7d8d5242cf58" -dependencies = [ - "http", - "hyper", - "hyper-util", - "rustls", - "rustls-pki-types", - "tokio", - "tokio-rustls", - "tower-service", -] - -[[package]] -name = "hyper-tls" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" -dependencies = [ - "bytes", - "http-body-util", - "hyper", - "hyper-util", - "native-tls", - "tokio", - "tokio-native-tls", - "tower-service", ] [[package]] @@ -961,194 +357,14 @@ version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f66d5bd4c6f02bf0542fad85d626775bab9258cf795a4256dcaf3161114d1df" dependencies = [ - "base64", "bytes", - "futures-channel", "futures-core", - "futures-util", "http", "http-body", "hyper", - "ipnet", - "libc", - "percent-encoding", "pin-project-lite", - "socket2 0.5.10", - "system-configuration", "tokio", "tower-service", - "tracing", - "windows-registry", -] - -[[package]] -name = "iana-time-zone" -version = "0.1.63" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0c919e5debc312ad217002b8048a17b7d83f80703865bbfcfebb0458b0b27d8" -dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "log", - "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 = "icu_collections" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "200072f5d0e3614556f94a9930d5dc3e0662a652823904c3a75dc3b0af7fee47" -dependencies = [ - "displaydoc", - "potential_utf", - "yoke", - "zerofrom", - "zerovec", -] - -[[package]] -name = "icu_locale_core" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cde2700ccaed3872079a65fb1a78f6c0a36c91570f28755dda67bc8f7d9f00a" -dependencies = [ - "displaydoc", - "litemap", - "tinystr", - "writeable", - "zerovec", -] - -[[package]] -name = "icu_normalizer" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "436880e8e18df4d7bbc06d58432329d6458cc84531f7ac5f024e93deadb37979" -dependencies = [ - "displaydoc", - "icu_collections", - "icu_normalizer_data", - "icu_properties", - "icu_provider", - "smallvec", - "zerovec", -] - -[[package]] -name = "icu_normalizer_data" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00210d6893afc98edb752b664b8890f0ef174c8adbb8d0be9710fa66fbbf72d3" - -[[package]] -name = "icu_properties" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "016c619c1eeb94efb86809b015c58f479963de65bdb6253345c1a1276f22e32b" -dependencies = [ - "displaydoc", - "icu_collections", - "icu_locale_core", - "icu_properties_data", - "icu_provider", - "potential_utf", - "zerotrie", - "zerovec", -] - -[[package]] -name = "icu_properties_data" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "298459143998310acd25ffe6810ed544932242d3f07083eee1084d83a71bd632" - -[[package]] -name = "icu_provider" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03c80da27b5f4187909049ee2d72f276f0d9f99a42c306bd0131ecfe04d8e5af" -dependencies = [ - "displaydoc", - "icu_locale_core", - "stable_deref_trait", - "tinystr", - "writeable", - "yoke", - "zerofrom", - "zerotrie", - "zerovec", -] - -[[package]] -name = "idna" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" -dependencies = [ - "idna_adapter", - "smallvec", - "utf8_iter", -] - -[[package]] -name = "idna_adapter" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" -dependencies = [ - "icu_normalizer", - "icu_properties", -] - -[[package]] -name = "ignore" -version = "0.4.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d89fd380afde86567dfba715db065673989d6253f42b88179abd3eae47bda4b" -dependencies = [ - "crossbeam-deque", - "globset", - "log", - "memchr", - "regex-automata 0.4.9", - "same-file", - "walkdir", - "winapi-util", -] - -[[package]] -name = "image" -version = "0.25.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db35664ce6b9810857a38a906215e75a9c879f0696556a39f59c62829710251a" -dependencies = [ - "bytemuck", - "byteorder-lite", - "num-traits", - "png", -] - -[[package]] -name = "indexmap" -version = "2.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe4cd85333e22411419a0bcae1297d25e58c9443848b11dc6a86fefe8c78a661" -dependencies = [ - "equivalent", - "hashbrown", - "serde", ] [[package]] @@ -1157,52 +373,17 @@ version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b86e202f00093dcba4275d4636b93ef9dd75d025ae560d2521b45ea28ab49013" dependencies = [ - "bitflags 2.9.2", + "bitflags", "cfg-if", "libc", ] -[[package]] -name = "ipnet" -version = "2.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" - -[[package]] -name = "iri-string" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbc5ebe9c3a1a7a5127f920a418f7585e9e758e911d0466ed004f393b0e380b2" -dependencies = [ - "memchr", - "serde", -] - -[[package]] -name = "itertools" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" -dependencies = [ - "either", -] - [[package]] name = "itoa" version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" -[[package]] -name = "js-sys" -version = "0.3.77" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" -dependencies = [ - "once_cell", - "wasm-bindgen", -] - [[package]] name = "lazy_static" version = "1.5.0" @@ -1215,112 +396,12 @@ version = "0.2.174" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776" -[[package]] -name = "libm" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" - -[[package]] -name = "linux-raw-sys" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12" - -[[package]] -name = "litemap" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "241eaef5fd12c88705a01fc1066c48c4b36e0dd4377dcdc7ec3942cea7a69956" - -[[package]] -name = "lock_api" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96936507f153605bddfcda068dd804796c84324ed2510809e5b2a624c81da765" -dependencies = [ - "autocfg", - "scopeguard", -] - [[package]] name = "log" version = "0.4.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" -[[package]] -name = "loom" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff50ecb28bb86013e935fb6683ab1f6d3a20016f123c76fd4c27470076ac30f5" -dependencies = [ - "cfg-if", - "generator", - "scoped-tls", - "tracing", - "tracing-subscriber", -] - -[[package]] -name = "mac" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4" - -[[package]] -name = "malachite" -version = "1.0.0" -dependencies = [ - "axum", - "axum-extra", - "dotenv", - "glob", - "nanoneo", - "oiseau", - "pathbufd", - "regex", - "serde", - "serde_json", - "serde_valid", - "tera", - "tetratto-core", - "tetratto-shared", - "tokio", - "toml 0.9.5", - "tower-http", - "tracing", - "tracing-subscriber", -] - -[[package]] -name = "maplit" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" - -[[package]] -name = "markup5ever" -version = "0.35.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "311fe69c934650f8f19652b3946075f0fc41ad8757dbb68f1ca14e7900ecc1c3" -dependencies = [ - "log", - "tendril", - "web_atoms", -] - -[[package]] -name = "match_token" -version = "0.35.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac84fd3f360fcc43dc5f5d186f02a94192761a080e8bc58621ad4d12296a58cf" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "matchers" version = "0.1.0" @@ -1336,16 +417,6 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3" -[[package]] -name = "md-5" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" -dependencies = [ - "cfg-if", - "digest", -] - [[package]] name = "memchr" version = "2.7.5" @@ -1375,7 +446,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" dependencies = [ "adler2", - "simd-adler32", ] [[package]] @@ -1386,38 +456,9 @@ checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c" dependencies = [ "libc", "wasi 0.11.1+wasi-snapshot-preview1", - "windows-sys 0.59.0", + "windows-sys", ] -[[package]] -name = "nanoneo" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1495d19c5bed5372c613d7b4a38e8093b357f4405ce38ba1de2d6586e5c892" - -[[package]] -name = "native-tls" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87de3442987e9dbec73158d5c715e7ad9072fda936bb03d19d7fa10e00520f0e" -dependencies = [ - "libc", - "log", - "openssl", - "openssl-probe", - "openssl-sys", - "schannel", - "security-framework", - "security-framework-sys", - "tempfile", -] - -[[package]] -name = "new_debug_unreachable" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" - [[package]] name = "nu-ansi-term" version = "0.46.0" @@ -1428,40 +469,6 @@ dependencies = [ "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-conv" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" - -[[package]] -name = "num-integer" -version = "0.1.46" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" -dependencies = [ - "num-traits", -] - -[[package]] -name = "num-traits" -version = "0.2.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" -dependencies = [ - "autocfg", -] - [[package]] name = "object" version = "0.36.7" @@ -1471,241 +478,24 @@ dependencies = [ "memchr", ] -[[package]] -name = "oiseau" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99b097052e28781d560587373845626a85460969a55d180fc418aecd58f6fef3" -dependencies = [ - "bb8-postgres", - "redis", - "serde", - "tokio-postgres", -] - [[package]] name = "once_cell" version = "1.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" -[[package]] -name = "openssl" -version = "0.10.73" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8505734d46c8ab1e19a1dce3aef597ad87dcb4c37e7188231769bd6bd51cebf8" -dependencies = [ - "bitflags 2.9.2", - "cfg-if", - "foreign-types", - "libc", - "once_cell", - "openssl-macros", - "openssl-sys", -] - -[[package]] -name = "openssl-macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "openssl-probe" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" - -[[package]] -name = "openssl-sys" -version = "0.9.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90096e2e47630d78b7d1c20952dc621f957103f8bc2c8359ec81290d75238571" -dependencies = [ - "cc", - "libc", - "pkg-config", - "vcpkg", -] - [[package]] name = "overload" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" -[[package]] -name = "parking_lot" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70d58bf43669b5795d1576d0641cfb6fbb2057bf629506267a92807158584a13" -dependencies = [ - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc838d2a56b5b1a6c25f55575dfc605fabb63bb2365f6c2353ef9159aa69e4a5" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "smallvec", - "windows-targets 0.52.6", -] - -[[package]] -name = "parse-zoneinfo" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f2a05b18d44e2957b88f96ba460715e295bc1d7510468a2f3d3b44535d26c24" -dependencies = [ - "regex", -] - -[[package]] -name = "paste" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" - -[[package]] -name = "pathbufd" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1093468017c416ee031afaecc90ae8a2ea3a9590c3331302fe89be4e43061d9d" -dependencies = [ - "serde", -] - [[package]] name = "percent-encoding" version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" -[[package]] -name = "pest" -version = "2.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1db05f56d34358a8b1066f67cbb203ee3e7ed2ba674a6263a1d5ec6db2204323" -dependencies = [ - "memchr", - "thiserror 2.0.12", - "ucd-trie", -] - -[[package]] -name = "pest_derive" -version = "2.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb056d9e8ea77922845ec74a1c4e8fb17e7c218cc4fc11a15c5d25e189aa40bc" -dependencies = [ - "pest", - "pest_generator", -] - -[[package]] -name = "pest_generator" -version = "2.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87e404e638f781eb3202dc82db6760c8ae8a1eeef7fb3fa8264b2ef280504966" -dependencies = [ - "pest", - "pest_meta", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "pest_meta" -version = "2.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edd1101f170f5903fde0914f899bb503d9ff5271d7ba76bbb70bea63690cc0d5" -dependencies = [ - "pest", - "sha2", -] - -[[package]] -name = "phf" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078" -dependencies = [ - "phf_macros", - "phf_shared 0.11.3", -] - -[[package]] -name = "phf" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "913273894cec178f401a31ec4b656318d95473527be05c0752cc41cdc32be8b7" -dependencies = [ - "phf_shared 0.12.1", -] - -[[package]] -name = "phf_codegen" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aef8048c789fa5e851558d709946d6d79a8ff88c0440c587967f8e94bfb1216a" -dependencies = [ - "phf_generator", - "phf_shared 0.11.3", -] - -[[package]] -name = "phf_generator" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d" -dependencies = [ - "phf_shared 0.11.3", - "rand 0.8.5", -] - -[[package]] -name = "phf_macros" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f84ac04429c13a7ff43785d75ad27569f2951ce0ffd30a3321230db2fc727216" -dependencies = [ - "phf_generator", - "phf_shared 0.11.3", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "phf_shared" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5" -dependencies = [ - "siphasher", -] - -[[package]] -name = "phf_shared" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06005508882fb681fd97892ecff4b7fd0fee13ef1aa569f8695dae7ab9099981" -dependencies = [ - "siphasher", -] - [[package]] name = "pin-project-lite" version = "0.2.16" @@ -1718,69 +508,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" -[[package]] -name = "pkg-config" -version = "0.3.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" - -[[package]] -name = "png" -version = "0.17.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82151a2fc869e011c153adc57cf2789ccb8d9906ce52c0b39a6b5697749d7526" -dependencies = [ - "bitflags 1.3.2", - "crc32fast", - "fdeflate", - "flate2", - "miniz_oxide", -] - -[[package]] -name = "postgres-protocol" -version = "0.6.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76ff0abab4a9b844b93ef7b81f1efc0a366062aaef2cd702c76256b5dc075c54" -dependencies = [ - "base64", - "byteorder", - "bytes", - "fallible-iterator", - "hmac", - "md-5", - "memchr", - "rand 0.9.1", - "sha2", - "stringprep", -] - -[[package]] -name = "postgres-types" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613283563cd90e1dfc3518d548caee47e0e725455ed619881f5cf21f36de4b48" -dependencies = [ - "bytes", - "fallible-iterator", - "postgres-protocol", -] - -[[package]] -name = "potential_utf" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5a7c30837279ca13e7c867e9e40053bc68740f988cb07f7ca6df43cc734b585" -dependencies = [ - "zerovec", -] - -[[package]] -name = "powerfmt" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" - [[package]] name = "ppv-lite86" version = "0.2.21" @@ -1790,33 +517,6 @@ dependencies = [ "zerocopy", ] -[[package]] -name = "precomputed-hash" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" - -[[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-macro2" version = "1.0.95" @@ -1826,42 +526,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "pulldown-cmark" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e8bbe1a966bd2f362681a44f6edce3c2310ac21e4d5067a6e7ec396297a6ea0" -dependencies = [ - "bitflags 2.9.2", - "getopts", - "memchr", - "pulldown-cmark-escape", - "unicase", -] - -[[package]] -name = "pulldown-cmark-escape" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "007d8adb5ddab6f8e3f491ac63566a7d5002cc7ed73901f72057943fa71ae1ae" - -[[package]] -name = "qrcodegen" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4339fc7a1021c9c1621d87f5e3505f2805c8c105420ba2f2a4df86814590c142" - -[[package]] -name = "qrcodegen-image" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "221b7eace1aef8c95d65dbe09fb7a1a43d006045394a89afba6997721fcb7708" -dependencies = [ - "base64", - "image", - "qrcodegen", -] - [[package]] name = "quote" version = "1.0.40" @@ -1877,35 +541,14 @@ version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha 0.3.1", - "rand_core 0.6.4", -] - [[package]] name = "rand" version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9fbfd9d094a40bf3ae768db9361049ace4c0e04a4fd6b359518bd7b73a73dd97" dependencies = [ - "rand_chacha 0.9.0", - "rand_core 0.9.3", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core 0.6.4", + "rand_chacha", + "rand_core", ] [[package]] @@ -1915,16 +558,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" dependencies = [ "ppv-lite86", - "rand_core 0.9.3", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom 0.2.16", + "rand_core", ] [[package]] @@ -1933,38 +567,7 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" dependencies = [ - "getrandom 0.3.3", -] - -[[package]] -name = "redis" -version = "0.31.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bc1ea653e0b2e097db3ebb5b7f678be339620b8041f66b30a308c1d45d36a7f" -dependencies = [ - "bytes", - "cfg-if", - "combine", - "futures-util", - "itoa", - "num-bigint", - "percent-encoding", - "pin-project-lite", - "ryu", - "sha1_smol", - "socket2 0.5.10", - "tokio", - "tokio-util", - "url", -] - -[[package]] -name = "redox_syscall" -version = "0.5.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d04b7d0ee6b4a0207a0a7adb104d23ecb0b47d6beae7152d0fa34b692b29fd6" -dependencies = [ - "bitflags 2.9.2", + "getrandom", ] [[package]] @@ -2011,114 +614,12 @@ version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" -[[package]] -name = "reqwest" -version = "0.12.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d429f34c8092b2d42c7c93cec323bb4adeb7c67698f70839adec842ec10c7ceb" -dependencies = [ - "base64", - "bytes", - "encoding_rs", - "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "http-body-util", - "hyper", - "hyper-rustls", - "hyper-tls", - "hyper-util", - "js-sys", - "log", - "mime", - "mime_guess", - "native-tls", - "percent-encoding", - "pin-project-lite", - "rustls-pki-types", - "serde", - "serde_json", - "serde_urlencoded", - "sync_wrapper", - "tokio", - "tokio-native-tls", - "tower", - "tower-http", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] - -[[package]] -name = "ring" -version = "0.17.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" -dependencies = [ - "cc", - "cfg-if", - "getrandom 0.2.16", - "libc", - "untrusted", - "windows-sys 0.52.0", -] - [[package]] name = "rustc-demangle" version = "0.1.25" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "989e6739f80c4ad5b13e0fd7fe89531180375b18520cc8c82080e4dc4035b84f" -[[package]] -name = "rustix" -version = "1.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11181fbabf243db407ef8df94a6ce0b2f9a733bd8be4ad02b4eda9602296cac8" -dependencies = [ - "bitflags 2.9.2", - "errno", - "libc", - "linux-raw-sys", - "windows-sys 0.59.0", -] - -[[package]] -name = "rustls" -version = "0.23.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2491382039b29b9b11ff08b76ff6c97cf287671dbb74f0be44bda389fffe9bd1" -dependencies = [ - "once_cell", - "rustls-pki-types", - "rustls-webpki", - "subtle", - "zeroize", -] - -[[package]] -name = "rustls-pki-types" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "229a4a4c221013e7e1f1a043678c5cc39fe5171437c88fb47151a21e6f5b5c79" -dependencies = [ - "zeroize", -] - -[[package]] -name = "rustls-webpki" -version = "0.103.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a17884ae0c1b773f1ccd2bd4a8c72f16da897310a98b0e84bf349ad5ead92fc" -dependencies = [ - "ring", - "rustls-pki-types", - "untrusted", -] - [[package]] name = "rustversion" version = "1.0.21" @@ -2131,59 +632,6 @@ version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" -[[package]] -name = "same-file" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "schannel" -version = "0.1.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" -dependencies = [ - "windows-sys 0.59.0", -] - -[[package]] -name = "scoped-tls" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" - -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - -[[package]] -name = "security-framework" -version = "2.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" -dependencies = [ - "bitflags 2.9.2", - "core-foundation", - "core-foundation-sys", - "libc", - "security-framework-sys", -] - -[[package]] -name = "security-framework-sys" -version = "2.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32" -dependencies = [ - "core-foundation-sys", - "libc", -] - [[package]] name = "serde" version = "1.0.219" @@ -2226,24 +674,6 @@ dependencies = [ "serde", ] -[[package]] -name = "serde_spanned" -version = "0.6.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3" -dependencies = [ - "serde", -] - -[[package]] -name = "serde_spanned" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40734c41988f7306bb04f0ecf60ec0f3f1caa34290e4e8ea471dcd3346483b83" -dependencies = [ - "serde", -] - [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -2256,52 +686,6 @@ dependencies = [ "serde", ] -[[package]] -name = "serde_valid" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b615bed66931a7a9809b273937adc8a402d038b1e509d027fcaf62f084d33d1" -dependencies = [ - "indexmap", - "itertools", - "num-traits", - "once_cell", - "paste", - "regex", - "serde", - "serde_json", - "serde_valid_derive", - "serde_valid_literal", - "thiserror 1.0.69", - "toml 0.8.23", - "unicode-segmentation", -] - -[[package]] -name = "serde_valid_derive" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fa1a5a21ea5aab06d2e6a6b59837d450fb2be9695be97735a711edfbe79ea07" -dependencies = [ - "itertools", - "paste", - "proc-macro-error2", - "proc-macro2", - "quote", - "strsim", - "syn", -] - -[[package]] -name = "serde_valid_literal" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd07331596ea967dccf9a35bde71ecd757490e09827b938a5c6226c648e3a25e" -dependencies = [ - "paste", - "regex", -] - [[package]] name = "sha1" version = "0.10.6" @@ -2313,23 +697,6 @@ dependencies = [ "digest", ] -[[package]] -name = "sha1_smol" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbfa15b3dddfee50a0fff136974b3e1bde555604ba463834a7eb7deb6417705d" - -[[package]] -name = "sha2" -version = "0.10.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", -] - [[package]] name = "sharded-slab" version = "0.1.7" @@ -2339,65 +706,18 @@ dependencies = [ "lazy_static", ] -[[package]] -name = "shlex" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" - -[[package]] -name = "simd-adler32" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" - -[[package]] -name = "siphasher" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d" - [[package]] name = "slab" version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04dc19736151f35336d325007ac991178d504a119863a2fcb3758cdb5e52c50d" -[[package]] -name = "slug" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "882a80f72ee45de3cc9a5afeb2da0331d58df69e4e7d8eeb5d3c7784ae67e724" -dependencies = [ - "deunicode", - "wasm-bindgen", -] - [[package]] name = "smallvec" version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" -[[package]] -name = "snowflaked" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "398d462c4c454399be452039b24b0aa0ecb4c7a57f6ae615f5d25de2b032f850" -dependencies = [ - "loom", -] - -[[package]] -name = "socket2" -version = "0.5.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - [[package]] name = "socket2" version = "0.6.0" @@ -2405,63 +725,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "233504af464074f9d066d7b5416c5f9b894a5862a6506e306f7b816cdd6f1807" dependencies = [ "libc", - "windows-sys 0.59.0", + "windows-sys", ] -[[package]] -name = "stable_deref_trait" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" - -[[package]] -name = "string_cache" -version = "0.8.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf776ba3fa74f83bf4b63c3dcbbf82173db2632ed8452cb2d891d33f459de70f" -dependencies = [ - "new_debug_unreachable", - "parking_lot", - "phf_shared 0.11.3", - "precomputed-hash", - "serde", -] - -[[package]] -name = "string_cache_codegen" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c711928715f1fe0fe509c53b43e993a9a557babc2d0a3567d0a3006f1ac931a0" -dependencies = [ - "phf_generator", - "phf_shared 0.11.3", - "proc-macro2", - "quote", -] - -[[package]] -name = "stringprep" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b4df3d392d81bd458a8a621b8bffbd2302a12ffe288a9d931670948749463b1" -dependencies = [ - "unicode-bidi", - "unicode-normalization", - "unicode-properties", -] - -[[package]] -name = "strsim" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" - -[[package]] -name = "subtle" -version = "2.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" - [[package]] name = "syn" version = "2.0.104" @@ -2478,151 +744,6 @@ name = "sync_wrapper" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" -dependencies = [ - "futures-core", -] - -[[package]] -name = "synstructure" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "system-configuration" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" -dependencies = [ - "bitflags 2.9.2", - "core-foundation", - "system-configuration-sys", -] - -[[package]] -name = "system-configuration-sys" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "tempfile" -version = "3.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8a64e3985349f2441a1a9ef0b853f869006c3855f2cda6862a94d26ebb9d6a1" -dependencies = [ - "fastrand", - "getrandom 0.3.3", - "once_cell", - "rustix", - "windows-sys 0.59.0", -] - -[[package]] -name = "tendril" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d24a120c5fc464a3458240ee02c299ebcb9d67b5249c8848b09d639dca8d7bb0" -dependencies = [ - "futf", - "mac", - "utf-8", -] - -[[package]] -name = "tera" -version = "1.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab9d851b45e865f178319da0abdbfe6acbc4328759ff18dafc3a41c16b4cd2ee" -dependencies = [ - "chrono", - "chrono-tz", - "globwalk", - "humansize", - "lazy_static", - "percent-encoding", - "pest", - "pest_derive", - "rand 0.8.5", - "regex", - "serde", - "serde_json", - "slug", - "unic-segment", -] - -[[package]] -name = "tetratto-core" -version = "15.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7aeb9dcc5631ec6188bb9438dc97015c6662b6f59e650e5afa865775f170c9c" -dependencies = [ - "async-recursion", - "base16ct", - "base64", - "bitflags 2.9.2", - "emojis", - "md-5", - "oiseau", - "paste", - "pathbufd", - "regex", - "reqwest", - "serde", - "serde_json", - "tetratto-l10n", - "tetratto-shared", - "tokio", - "toml 0.9.5", - "totp-rs", -] - -[[package]] -name = "tetratto-l10n" -version = "12.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d96f5e41633c757e3519efb47c9b85d00d14322c1961360e126d0ecc0ea79b86" -dependencies = [ - "pathbufd", - "serde", - "toml 0.9.5", -] - -[[package]] -name = "tetratto-shared" -version = "12.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "286290ad09be3c507f9a47d38e92b024e6fcde34dbb515113f5bdb6b926cbee3" -dependencies = [ - "ammonia", - "chrono", - "hex_fmt", - "pulldown-cmark", - "rand 0.9.1", - "regex", - "serde", - "sha2", - "snowflaked", - "uuid", -] - -[[package]] -name = "thiserror" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" -dependencies = [ - "thiserror-impl 1.0.69", -] [[package]] name = "thiserror" @@ -2630,18 +751,7 @@ version = "2.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" dependencies = [ - "thiserror-impl 2.0.12", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" -dependencies = [ - "proc-macro2", - "quote", - "syn", + "thiserror-impl", ] [[package]] @@ -2664,62 +774,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "time" -version = "0.3.41" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a7619e19bc266e0f9c5e6686659d394bc57973859340060a69221e57dbc0c40" -dependencies = [ - "deranged", - "itoa", - "num-conv", - "powerfmt", - "serde", - "time-core", - "time-macros", -] - -[[package]] -name = "time-core" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9e9a38711f559d9e3ce1cdb06dd7c5b8ea546bc90052da6d06bb76da74bb07c" - -[[package]] -name = "time-macros" -version = "0.2.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3526739392ec93fd8b359c8e98514cb3e8e021beb4e5f597b00a0221f8ed8a49" -dependencies = [ - "num-conv", - "time-core", -] - -[[package]] -name = "tinystr" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d4f6d1145dcb577acf783d4e601bc1d76a13337bb54e6233add580b07344c8b" -dependencies = [ - "displaydoc", - "zerovec", -] - -[[package]] -name = "tinyvec" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09b3661f17e86524eccd4371ab0429194e0d7c008abb45f7a7495b1719463c71" -dependencies = [ - "tinyvec_macros", -] - -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - [[package]] name = "tokio" version = "1.47.1" @@ -2731,12 +785,11 @@ dependencies = [ "io-uring", "libc", "mio", - "parking_lot", "pin-project-lite", "slab", - "socket2 0.6.0", + "socket2", "tokio-macros", - "windows-sys 0.59.0", + "windows-sys", ] [[package]] @@ -2750,52 +803,6 @@ dependencies = [ "syn", ] -[[package]] -name = "tokio-native-tls" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" -dependencies = [ - "native-tls", - "tokio", -] - -[[package]] -name = "tokio-postgres" -version = "0.7.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c95d533c83082bb6490e0189acaa0bbeef9084e60471b696ca6988cd0541fb0" -dependencies = [ - "async-trait", - "byteorder", - "bytes", - "fallible-iterator", - "futures-channel", - "futures-util", - "log", - "parking_lot", - "percent-encoding", - "phf 0.11.3", - "pin-project-lite", - "postgres-protocol", - "postgres-types", - "rand 0.9.1", - "socket2 0.5.10", - "tokio", - "tokio-util", - "whoami", -] - -[[package]] -name = "tokio-rustls" -version = "0.26.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e727b36a1a0e8b74c376ac2211e40c2c8af09fb4013c60d910495810f008e9b" -dependencies = [ - "rustls", - "tokio", -] - [[package]] name = "tokio-tungstenite" version = "0.26.2" @@ -2821,103 +828,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "toml" -version = "0.8.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362" -dependencies = [ - "serde", - "serde_spanned 0.6.9", - "toml_datetime 0.6.11", - "toml_edit", -] - -[[package]] -name = "toml" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75129e1dc5000bfbaa9fee9d1b21f974f9fbad9daec557a521ee6e080825f6e8" -dependencies = [ - "indexmap", - "serde", - "serde_spanned 1.0.0", - "toml_datetime 0.7.0", - "toml_parser", - "toml_writer", - "winnow", -] - -[[package]] -name = "toml_datetime" -version = "0.6.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" -dependencies = [ - "serde", -] - -[[package]] -name = "toml_datetime" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bade1c3e902f58d73d3f294cd7f20391c1cb2fbcb643b73566bc773971df91e3" -dependencies = [ - "serde", -] - -[[package]] -name = "toml_edit" -version = "0.22.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" -dependencies = [ - "indexmap", - "serde", - "serde_spanned 0.6.9", - "toml_datetime 0.6.11", - "toml_write", - "winnow", -] - -[[package]] -name = "toml_parser" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b551886f449aa90d4fe2bdaa9f4a2577ad2dde302c61ecf262d80b116db95c10" -dependencies = [ - "winnow", -] - -[[package]] -name = "toml_write" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801" - -[[package]] -name = "toml_writer" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcc842091f2def52017664b53082ecbbeb5c7731092bad69d2c63050401dfd64" - -[[package]] -name = "totp-rs" -version = "5.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f124352108f58ef88299e909f6e9470f1cdc8d2a1397963901b4a6366206bf72" -dependencies = [ - "base32", - "constant_time_eq", - "hmac", - "qrcodegen-image", - "rand 0.9.1", - "sha1", - "sha2", - "url", - "urlencoding", -] - [[package]] name = "tower" version = "0.5.2" @@ -2940,7 +850,7 @@ version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adc82fd73de2a9722ac5da747f12383d2bfdb93591ee6c58486e0097890f05f2" dependencies = [ - "bitflags 2.9.2", + "bitflags", "bytes", "futures-core", "futures-util", @@ -2949,14 +859,12 @@ dependencies = [ "http-body-util", "http-range-header", "httpdate", - "iri-string", "mime", "mime_guess", "percent-encoding", "pin-project-lite", "tokio", "tokio-util", - "tower", "tower-layer", "tower-service", "tracing", @@ -3036,12 +944,6 @@ dependencies = [ "tracing-log", ] -[[package]] -name = "try-lock" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" - [[package]] name = "tungstenite" version = "0.26.2" @@ -3053,9 +955,9 @@ dependencies = [ "http", "httparse", "log", - "rand 0.9.1", + "rand", "sha1", - "thiserror 2.0.12", + "thiserror", "utf-8", ] @@ -3065,190 +967,36 @@ version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f" -[[package]] -name = "ucd-trie" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" - -[[package]] -name = "unic-char-property" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8c57a407d9b6fa02b4795eb81c5b6652060a15a7903ea981f3d723e6c0be221" -dependencies = [ - "unic-char-range", -] - -[[package]] -name = "unic-char-range" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0398022d5f700414f6b899e10b8348231abf9173fa93144cbc1a43b9793c1fbc" - -[[package]] -name = "unic-common" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80d7ff825a6a654ee85a63e80f92f054f904f21e7d12da4e22f9834a4aaa35bc" - -[[package]] -name = "unic-segment" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4ed5d26be57f84f176157270c112ef57b86debac9cd21daaabbe56db0f88f23" -dependencies = [ - "unic-ucd-segment", -] - -[[package]] -name = "unic-ucd-segment" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2079c122a62205b421f499da10f3ee0f7697f012f55b675e002483c73ea34700" -dependencies = [ - "unic-char-property", - "unic-char-range", - "unic-ucd-version", -] - -[[package]] -name = "unic-ucd-version" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96bd2f2237fe450fcd0a1d2f5f4e91711124f7857ba2e964247776ebeeb7b0c4" -dependencies = [ - "unic-common", -] - [[package]] name = "unicase" version = "2.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539" -[[package]] -name = "unicode-bidi" -version = "0.3.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5" - [[package]] name = "unicode-ident" version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" -[[package]] -name = "unicode-normalization" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" -dependencies = [ - "tinyvec", -] - -[[package]] -name = "unicode-properties" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e70f2a8b45122e719eb623c01822704c4e0907e7e426a05927e1a1cfff5b75d0" - -[[package]] -name = "unicode-segmentation" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" - -[[package]] -name = "unicode-width" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a1a07cc7db3810833284e8d372ccdc6da29741639ecc70c9ec107df0fa6154c" - -[[package]] -name = "untrusted" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" - -[[package]] -name = "url" -version = "2.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" -dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", -] - -[[package]] -name = "urlencoding" -version = "2.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" - [[package]] name = "utf-8" version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" -[[package]] -name = "utf8_iter" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" - -[[package]] -name = "uuid" -version = "1.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cf4199d1e5d15ddd86a694e4d0dffa9c323ce759fea589f00fef9d81cc1931d" -dependencies = [ - "getrandom 0.3.3", - "js-sys", - "wasm-bindgen", -] - [[package]] name = "valuable" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" -[[package]] -name = "vcpkg" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" - [[package]] name = "version_check" version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" -[[package]] -name = "walkdir" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" -dependencies = [ - "same-file", - "winapi-util", -] - -[[package]] -name = "want" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" -dependencies = [ - "try-lock", -] - [[package]] name = "wasi" version = "0.11.1+wasi-snapshot-preview1" @@ -3264,116 +1012,6 @@ dependencies = [ "wit-bindgen-rt", ] -[[package]] -name = "wasite" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b" - -[[package]] -name = "wasm-bindgen" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" -dependencies = [ - "cfg-if", - "once_cell", - "rustversion", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" -dependencies = [ - "bumpalo", - "log", - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-futures" -version = "0.4.50" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61" -dependencies = [ - "cfg-if", - "js-sys", - "once_cell", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "web-sys" -version = "0.3.77" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "web_atoms" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57ffde1dc01240bdf9992e3205668b235e59421fd085e8a317ed98da0178d414" -dependencies = [ - "phf 0.11.3", - "phf_codegen", - "string_cache", - "string_cache_codegen", -] - -[[package]] -name = "whoami" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6994d13118ab492c3c80c1f81928718159254c53c472bf9ce36f8dae4add02a7" -dependencies = [ - "redox_syscall", - "wasite", - "web-sys", -] - [[package]] name = "winapi" version = "0.3.9" @@ -3390,131 +1028,19 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" -[[package]] -name = "winapi-util" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" -dependencies = [ - "windows-sys 0.59.0", -] - [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -[[package]] -name = "windows" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" -dependencies = [ - "windows-targets 0.48.5", -] - -[[package]] -name = "windows-core" -version = "0.61.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" -dependencies = [ - "windows-implement", - "windows-interface", - "windows-link", - "windows-result", - "windows-strings", -] - -[[package]] -name = "windows-implement" -version = "0.60.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "windows-interface" -version = "0.59.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "windows-link" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" - -[[package]] -name = "windows-registry" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a9ed28765efc97bbc954883f4e6796c33a06546ebafacbabee9696967499e" -dependencies = [ - "windows-link", - "windows-result", - "windows-strings", -] - -[[package]] -name = "windows-result" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" -dependencies = [ - "windows-link", -] - -[[package]] -name = "windows-strings" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" -dependencies = [ - "windows-link", -] - -[[package]] -name = "windows-sys" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" -dependencies = [ - "windows-targets 0.52.6", -] - [[package]] name = "windows-sys" version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" dependencies = [ - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", + "windows-targets", ] [[package]] @@ -3523,46 +1049,28 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.6", - "windows_aarch64_msvc 0.52.6", - "windows_i686_gnu 0.52.6", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", "windows_i686_gnullvm", - "windows_i686_msvc 0.52.6", - "windows_x86_64_gnu 0.52.6", - "windows_x86_64_gnullvm 0.52.6", - "windows_x86_64_msvc 0.52.6", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", ] -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - [[package]] name = "windows_aarch64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - [[package]] name = "windows_aarch64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - [[package]] name = "windows_i686_gnu" version = "0.52.6" @@ -3575,100 +1083,37 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - [[package]] name = "windows_i686_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - [[package]] name = "windows_x86_64_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - [[package]] name = "windows_x86_64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" -[[package]] -name = "winnow" -version = "0.7.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3edebf492c8125044983378ecb5766203ad3b4c2f7a922bd7dd207f6d443e95" -dependencies = [ - "memchr", -] - [[package]] name = "wit-bindgen-rt" version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" dependencies = [ - "bitflags 2.9.2", -] - -[[package]] -name = "writeable" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea2f10b9bb0928dfb1b42b65e1f9e36f7f54dbdf08457afefb38afcdec4fa2bb" - -[[package]] -name = "yoke" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f41bb01b8226ef4bfd589436a297c53d118f65921786300e427be8d487695cc" -dependencies = [ - "serde", - "stable_deref_trait", - "yoke-derive", - "zerofrom", -] - -[[package]] -name = "yoke-derive" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "synstructure", + "bitflags", ] [[package]] @@ -3690,63 +1135,3 @@ dependencies = [ "quote", "syn", ] - -[[package]] -name = "zerofrom" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" -dependencies = [ - "zerofrom-derive", -] - -[[package]] -name = "zerofrom-derive" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "synstructure", -] - -[[package]] -name = "zeroize" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" - -[[package]] -name = "zerotrie" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36f0bbd478583f79edad978b407914f61b2972f5af6fa089686016be8f9af595" -dependencies = [ - "displaydoc", - "yoke", - "zerofrom", -] - -[[package]] -name = "zerovec" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a05eb080e015ba39cc9e23bbe5e7fb04d5fb040350f99f34e338d5fdd294428" -dependencies = [ - "yoke", - "zerofrom", - "zerovec-derive", -] - -[[package]] -name = "zerovec-derive" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] diff --git a/Cargo.toml b/Cargo.toml index 1f204ef..5fbc100 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,19 +1,14 @@ [package] -name = "malachite" +name = "delivery" version = "1.0.0" edition = "2024" authors = ["trisuaso"] -repository = "https://trisua.com/t/malachite" +repository = "https://trisua.com/t/delivery" license = "AGPL-3.0-or-later" -homepage = "https://trisua.com" +homepage = "https://trisua.com/t/delivery" [dependencies] -tetratto-core = "15.0.1" -tetratto-shared = "12.0.6" tokio = { version = "1.47.1", features = ["macros", "rt-multi-thread"] } -pathbufd = "0.1.4" -serde = { version = "1.0.219", features = ["derive"] } -tera = "1.20.0" tracing = "0.1.41" tracing-subscriber = { version = "0.3.19", features = ["env-filter"] } tower-http = { version = "0.6.6", features = [ @@ -23,12 +18,4 @@ tower-http = { version = "0.6.6", features = [ "set-header", ] } axum = { version = "0.8.4", features = ["macros", "ws"] } -axum-extra = { version = "0.10.1", features = ["cookie"] } -nanoneo = "0.2.0" dotenv = "0.15.0" -glob = "0.3.2" -serde_json = "1.0.142" -toml = "0.9.4" -serde_valid = { version = "1.0.5", features = ["toml"] } -regex = "1.11.1" -oiseau = { version = "0.1.2", default-features = false, features = ["postgres", "redis",] } diff --git a/README.md b/README.md index 59180a5..88217f2 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ -# 🪨 malachite +# 📦 delivery -simple template for building backends with a structure similar to how the [tetratto](https://trisua.com/t/tetratto) repository is organized +static file server + +always serves the `./public` directory as the root path diff --git a/app/.gitignore b/app/.gitignore deleted file mode 100644 index 53bfc0b..0000000 --- a/app/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -docs/**/* -!docs/example.md -icons/ -templates_build/ -public/favicon.svg -.env -app.toml diff --git a/app/docs/example.md b/app/docs/example.md deleted file mode 100644 index 11a5345..0000000 --- a/app/docs/example.md +++ /dev/null @@ -1 +0,0 @@ -# hi :) diff --git a/app/public/app.js b/app/public/app.js deleted file mode 100644 index b74d6b2..0000000 --- a/app/public/app.js +++ /dev/null @@ -1,208 +0,0 @@ -// theme preference -function media_theme_pref() { - document.documentElement.removeAttribute("class"); - - if ( - window.matchMedia("(prefers-color-scheme: dark)").matches && - (!window.localStorage.getItem("malachite.app:theme") || - window.localStorage.getItem("malachite.app:theme") === "Auto") - ) { - document.documentElement.classList.add("dark"); - - document.getElementById("switch_light").classList.add("hidden"); - document.getElementById("switch_dark").classList.remove("hidden"); - } else if ( - window.matchMedia("(prefers-color-scheme: light)").matches && - (!window.localStorage.getItem("malachite.app:theme") || - window.localStorage.getItem("malachite.app:theme") === "Auto") - ) { - document.documentElement.classList.remove("dark"); - - document.getElementById("switch_light").classList.remove("hidden"); - document.getElementById("switch_dark").classList.add("hidden"); - } else if (window.localStorage.getItem("malachite.app:theme")) { - /* restore theme */ - const current = window.localStorage.getItem("malachite.app:theme"); - document.documentElement.className = current.toLowerCase(); - - if (current === "Light") { - document.getElementById("switch_light").classList.remove("hidden"); - document.getElementById("switch_dark").classList.add("hidden"); - } else { - document.getElementById("switch_light").classList.add("hidden"); - document.getElementById("switch_dark").classList.remove("hidden"); - } - } -} - -globalThis.temporary_set_theme = (theme) => { - document.documentElement.className = theme.toLowerCase(); - - if (theme === "Light") { - document.getElementById("switch_light").classList.remove("hidden"); - document.getElementById("switch_dark").classList.add("hidden"); - } else { - document.getElementById("switch_light").classList.add("hidden"); - document.getElementById("switch_dark").classList.remove("hidden"); - } -}; - -globalThis.set_theme = (theme) => { - window.localStorage.setItem("malachite.app:theme", theme); - document.documentElement.className = theme; - media_theme_pref(); -}; - -media_theme_pref(); - -// messages -function get_cookie(key) { - return (document.cookie.split(`${key}=`)[1] || "").split(";")[0]; -} - -function check_message() { - const element = document.getElementById("messages"); - - const message = get_cookie("App-Message"); - const message_good = get_cookie("App-Message-Good") === "true"; - - if (message) { - element.style.marginBottom = "1rem"; - element.style.paddingLeft = "1rem"; - element.innerHTML = `
  • ${message.replaceAll('"', "")}
  • `; - } - - // clear cookies - for (cookie of document.cookie.split(";")) { - // biome-ignore lint/suspicious/noDocumentCookie: cookie store is barely supported - document.cookie = `${cookie.split("=")[0]}=; expires=${new Date(0).toUTCString()}; path=/`; - } -} - -globalThis.show_message = (message, message_good = true) => { - const element = document.getElementById("messages"); - element.style.marginBottom = "1rem"; - element.style.paddingLeft = "1rem"; - element.innerHTML = `
  • ${message.replaceAll('"', "")}
  • `; -}; - -check_message(); - -// components -function close_dropdowns() { - for (const dropdown of Array.from( - document.querySelectorAll(".inner.open"), - )) { - dropdown.classList.remove("open"); - } -} - -globalThis.open_dropdown = (event) => { - event.stopImmediatePropagation(); - let target = event.target; - - while (!target.matches(".dropdown")) { - target = target.parentElement; - } - - // close all others - close_dropdowns(); - - // open - setTimeout(() => { - for (const dropdown of Array.from(target.querySelectorAll(".inner"))) { - // check y - const box = target.getBoundingClientRect(); - - let parent = dropdown.parentElement; - - while (!parent.matches("html, .window")) { - parent = parent.parentElement; - } - - let parent_height = parent.getBoundingClientRect().y; - - if (parent.nodeName === "HTML") { - parent_height = window.screen.height; - } - - const scroll = window.scrollY; - const height = parent_height; - const y = box.y + scroll; - - if (y > height - scroll - 375) { - dropdown.classList.add("top"); - } else { - dropdown.classList.remove("top"); - } - - // open - dropdown.classList.add("open"); - - if (dropdown.classList.contains("open")) { - dropdown.removeAttribute("aria-hidden"); - } else { - dropdown.setAttribute("aria-hidden", "true"); - } - } - }, 5); -}; - -globalThis.init_dropdowns = (bind_to) => { - for (const dropdown of Array.from(document.querySelectorAll(".inner"))) { - dropdown.setAttribute("aria-hidden", "true"); - } - - bind_to.addEventListener("click", (event) => { - if ( - event.target.matches(".dropdown") || - event.target.matches("[exclude=dropdown]") - ) { - return; - } - - for (const dropdown of Array.from( - document.querySelectorAll(".inner.open"), - )) { - dropdown.classList.remove("open"); - } - }); -}; - -globalThis.hash_check = (hash) => { - if (hash.startsWith("#/")) { - for (const x of Array.from(document.querySelectorAll(".subpage"))) { - x.classList.add("hidden"); - } - - document.getElementById(hash).classList.remove("hidden"); - } -}; - -window.addEventListener("hashchange", (_) => hash_check(window.location.hash)); - -setTimeout(() => { - // run initial hash check - hash_check(window.location.hash); -}, 150); - -globalThis.submitter_load = (submitter) => { - return { - load() { - submitter.querySelector("[ui_ident=text]").classList.add("hidden"); - submitter - .querySelector("[ui_ident=loader]") - .classList.remove("hidden"); - submitter.setAttribute("disabled", "true"); - }, - failed() { - submitter - .querySelector("[ui_ident=text]") - .classList.remove("hidden"); - submitter - .querySelector("[ui_ident=loader]") - .classList.add("hidden"); - submitter.removeAttribute("disabled"); - }, - }; -}; diff --git a/app/public/reference b/app/public/reference deleted file mode 120000 index bb0525b..0000000 --- a/app/public/reference +++ /dev/null @@ -1 +0,0 @@ -../../target/doc \ No newline at end of file diff --git a/app/public/style.css b/app/public/style.css deleted file mode 100644 index 1b39b76..0000000 --- a/app/public/style.css +++ /dev/null @@ -1,702 +0,0 @@ -:root { - color-scheme: light dark; - - --color-super-lowered: oklch(87.1% 0.006 286.286); - --color-lowered: oklch(96.7% 0.001 286.375); - --color-surface: oklch(92.9% 0.013 255.508); - --color-raised: oklch(98.4% 0.003 247.858); - --color-super-raised: oklch(96.8% 0.007 247.896); - --color-text: hsl(0, 0%, 5%); - - --color-link: #2949b2; - --color-shadow: rgba(0, 0, 0, 0.08); - --color-red: hsl(0, 84%, 40%); - --color-green: hsl(100, 84%, 20%); - --color-yellow: oklch(47% 0.157 37.304); - --color-purple: hsl(284, 84%, 20%); - --color-green-lowered: hsl(100, 84%, 15%); - --color-red-lowered: hsl(0, 84%, 35%); - - --shadow-x-offset: 0; - --shadow-y-offset: 0.125rem; - --shadow-size: var(--pad-1); - - --pad-1: 0.2rem; - --pad-2: 0.35rem; - --pad-3: 0.5rem; - --pad-4: 1rem; - - --radius: 0.2rem; - --nav-height: 36px; -} - -* { - margin: 0; - padding: 0; - box-sizing: border-box; - font-size: 16px; -} - -.dark, -.dark * { - --color-super-lowered: var(--color-super-raised); - --color-lowered: var(--color-raised); - --color-surface: oklch(21% 0.006 285.885); - --color-raised: oklch(27.4% 0.006 286.033); - --color-super-raised: oklch(37% 0.013 285.805); - --color-text: hsl(0, 0%, 95%); - - --color-link: #93c5fd; - --color-red: hsl(0, 94%, 82%); - --color-green: hsl(100, 94%, 82%); - --color-yellow: oklch(90.1% 0.076 70.697); - --color-purple: hsl(284, 94%, 82%); -} - -html, -body { - line-height: 1.5; - letter-spacing: 0.15px; - font-family: - "Inter", - "Poppins", - "Roboto", - ui-sans-serif, - -apple-system, - BlinkMacSystemFont, - system-ui, - sans-serif, - "Apple Color Emoji", - "Segoe UI Emoji", - "Segoe UI Symbol", - "Noto Color Emoji"; - color: var(--color-text); - background: var(--color-surface); - overflow: auto auto; - height: 100dvh; - scroll-behavior: smooth; - overflow-x: hidden; -} - -main { - width: 80ch; - margin: var(--pad-4) auto; - padding: var(--pad-3) var(--pad-4); -} - -article { - margin: var(--pad-2) 0; - height: calc(100dvh - var(--pad-4) - var(--nav-height) * 2); -} - -.tab { - flex: 1 0 auto; - overflow: auto; -} - -.tabs .tab { - height: 100%; -} - -.fadein { - animation: fadein ease-in-out 1 0.5s forwards running; -} - -nav { - /* background: var(--color-raised); */ - height: var(--nav-height); - /* position: sticky; - z-index: 2; - top: 2; */ -} - -@media screen and (max-width: 900px) { - main, - article, - nav, - header, - footer { - width: 100%; - } - - article { - margin-top: 0; - } - - main { - padding: 0; - } - - .flex_collapse_rev { - flex-direction: column-reverse !important; - } -} - -.container:not(#preview_tab):not(#tabs_group) { - margin: 10px auto 0; - width: 100%; -} - -.content_container { - margin: 0 auto var(--pad-2); - width: 100%; -} - -@media screen and (min-width: 500px) { - .content_container { - max-width: 540px; - } -} - -@media (min-width: 768px) { - .content_container { - max-width: 720px; - } -} - -@media (min-width: 900px) { - .content_container { - max-width: 960px; - } - - @media (min-width: 1200px) { - article { - padding: 0; - } - - .content_container { - max-width: 1100px; - } - } -} - -video { - max-width: 100%; - border-radius: var(--radius); -} - -/* card */ -.card { - padding: var(--pad-4); - background: var(--color-raised); - color: var(--color-text); -} - -.card_nest .card:nth-child(1) { - background: var(--color-super-raised); - padding: var(--pad-2) var(--pad-4); -} - -/* button */ -.button { - --h: 36px; - display: flex; - justify-content: center; - align-items: center; - gap: var(--pad-2); - padding: var(--pad-2) calc(var(--pad-3) * 1.5); - cursor: pointer; - background: var(--color-raised); - color: var(--color-text); - outline: none; - border: none; - width: max-content; - height: var(--h); - line-height: var(--h); - transition: background 0.15s; - text-decoration: none !important; - user-select: none; - appearance: none; -} - -.button:disabled { - opacity: 50%; - cursor: not-allowed; -} - -.button.small { - --h: 28px; -} - -.button:not(:has(.button:hover)):not(.camo):hover { - background: var(--color-super-raised); -} - -.button.camo { - background: transparent; - color: inherit; -} - -.bar .button:not(.simple).camo:hover { - color: var(--color-link); -} - -.button.simple { - --size: 18px; - font-weight: 600; - padding: var(--pad-2) !important; - border-radius: var(--radius); - width: var(--size); - height: var(--size); - aspect-ratio: 1 / 1; - font-size: 12px; -} - -.button.surface { - background: var(--color-surface); -} - -.button.surface.simple:is(.camo *) { - background: var(--color-super-raised); -} - -.button.green:not(.dark *) { - background: var(--color-green); - color: white !important; - - &:hover { - background: var(--color-green-lowered) !important; - } -} - -.button.red:not(.dark *) { - background: var(--color-red); - color: white !important; - - &:hover { - background: var(--color-red-lowered) !important; - } -} - -/* dropdown */ -.dropdown { - position: relative; -} - -.dropdown .inner { - display: none; - flex-direction: column; - box-shadow: var(--shadow-x-offset) var(--shadow-y-offset) var(--shadow-size) - var(--color-shadow); - background: var(--color-raised); - color: inherit; - position: absolute; - z-index: 2; - top: 100%; - right: 0; - width: max-content; - max-width: 15rem; -} - -.dropdown .inner.left { - right: unset; - left: 0; -} - -.dropdown .inner.open { - display: flex; -} - -.dropdown .inner .button, -.dropdown .inner .title { - padding: var(--pad-3) var(--pad-4); - justify-content: flex-start; - width: 100%; -} - -.dropdown .inner .title { - font-weight: 600; - font-size: 14px; -} - -.dropdown:has(.inner.open) .button:nth-child(1):not(.inner *) { - background: var(--color-raised); -} - -.dropdown .inner.top { - top: unset; - bottom: 100%; -} - -.dropdown .inner.left { - left: 0; - right: unset; -} - -/* input */ -input { - --h: 36px; - padding: var(--pad-2) calc(var(--pad-3) * 1.5); - background: var(--color-raised); - color: var(--color-text); - outline: none; - border: none; - width: max-content; - transition: - background 0.15s, - border 0.15s; - height: var(--h); - line-height: var(--h); - border-left: solid 0px transparent; -} - -input:not([type="checkbox"]):focus { - outline: solid 2px var(--color-primary); - box-shadow: 0 0 0 4px oklch(87% 0.065 274.039 / 25%); - background: var(--color-super-raised); -} - -input:user-invalid, -input[data-invalid] { - border-left: inset 5px var(--color-red); -} - -input.surface { - background: var(--color-surface); -} - -input[type="checkbox"] { - height: max-content; -} - -/* typo */ -p, -ul, -ol { - margin-bottom: var(--pad-4) !important; - - &:last-child { - margin-bottom: 0 !important; - } -} - -.post_right:not(.repost) { - max-width: calc(100% - 52px); -} - -.rhs { - width: 100% !important; -} - -.name { - max-width: 250px; - overflow: hidden; - /* overflow-wrap: break-word; */ - overflow-wrap: anywhere; - text-overflow: ellipsis; -} - -@media screen and (min-width: 901px) { - .name.shorter { - max-width: 200px; - } - - .name.lg\:long { - max-width: unset; - } - - .rhs { - width: calc(100% - 23rem) !important; - } -} - -ul, -ol { - margin: var(--pad-2) 0 var(--pad-2) var(--pad-4); -} - -pre { - padding: var(--pad-2) var(--pad-4); - border-left: solid 5px var(--color-primary); - background: var(--color-surface); - border-radius: var(--radius); - margin-bottom: var(--pad-4); -} - -code { - padding: 0; -} - -pre, -code { - font-family: "Jetbrains Mono", "Fire Code", monospace; - width: 100%; - max-width: 100%; - overflow: auto; - border-radius: var(--radius); - font-size: 0.8rem !important; - color: inherit; -} - -code * { - font-size: 0.8rem !important; -} - -code:not(pre *) { - padding: var(--pad-1) var(--pad-2); - background: oklch(98% 0.016 73.684 / 25%); - color: oklch(90.1% 0.076 70.697); - border-radius: var(--radius); - white-space: break-spaces; -} - -code:not(pre *):not(.dark *) { - background: oklch(83.7% 0.128 66.29 / 25%); - color: oklch(47% 0.157 37.304); -} - -svg.icon { - stroke: currentColor; - fill: currentColor; - width: 18px; - height: 1em; -} - -svg.icon.filled { - fill: currentColor; -} - -.no_fill svg.icon { - fill: transparent; -} - -button svg { - pointer-events: none; -} - -hr { - border-top: solid 1px var(--color-super-lowered) !important; - border-left: 0; - border-bottom: 0; - border-right: 0; -} - -hr.margin, -.container hr { - margin: var(--pad-4) 0; -} - -span.img_sizer { - display: inline-block; -} - -p, -li, -span, -code { - max-width: 100%; - overflow-wrap: normal; - text-wrap: stable; - word-wrap: break-word; -} - -h1 { - font-size: 2rem; -} - -h2 { - font-size: 1.75rem; -} - -h3 { - font-size: 1.5rem; -} - -h4 { - font-size: 1.25rem; -} - -h5 { - font-size: var(--pad-4); -} - -h6 { - font-size: var(--pad-3); -} - -h1, -h2, -h3, -h4, -h5, -h6 { - margin: var(--pad-4) 0; - font-weight: 700; - width: -moz-max-content; - position: relative; - max-width: 100%; -} - -h1 { - text-align: center; - margin: 2rem 0; - width: 100%; -} - -a { - text-decoration: none; - color: var(--color-link); -} - -.color_block a { - color: inherit; -} - -a.flush { - color: inherit; -} - -a:hover { - text-decoration: underline; -} - -img { - display: inline; - max-width: 100%; - vertical-align: middle; -} - -.img_sizer img { - width: 100%; - height: 100%; -} - -.avatar { - --size: 18px; - width: var(--size); - height: var(--size); - aspect-ratio: 1 / 1; -} - -blockquote { - padding-left: 1rem; - border-left: solid 5px var(--color-green); - color: var(--color-green); - opacity: 75%; -} - -p, -span { - font-size: inherit; -} - -/* extra */ -@keyframes fadein { - from { - opacity: 0%; - } - - to { - opacity: 100%; - } -} - -.loader { - animation: spin linear infinite 2s forwards running; - display: flex; - justify-content: center; - align-items: center; -} - -@keyframes spin { - from { - transform: rotateZ(0deg); - } - - to { - transform: rotateZ(360deg); - } -} - -.items-end { - align-items: flex-end; -} - -/* table */ -table { - width: 100%; - table-layout: auto; - margin: var(--pad-4) 0; - border-collapse: separate; - border-spacing: 0; - border: solid 1px var(--color-super-raised); -} - -table td, -table th { - padding: var(--pad-2) var(--pad-4); -} - -table tr:not(thead *):nth-child(odd) { - background: var(--color-super-raised); -} - -table thead th { - text-align: left; -} - -/* details */ -details { - width: 100%; - margin: var(--pad-4) 0; -} - -details summary { - background: var(--color-super-raised); - padding: var(--pad-2) var(--pad-4); - cursor: pointer; -} - -details .content { - padding: var(--pad-4); - background: var(--color-surface); -} - -/* dialog */ -dialog { - background: var(--color-surface); - color: var(--color-text); - box-shadow: var(--shadow-x-offset) var(--shadow-y-offset) var(--shadow-size) - var(--color-shadow); - animation: fadein ease-in-out 1 0.25s forwards running; - max-width: 95%; - width: 30rem; - margin: auto; - padding: var(--pad-4); - border: 0; -} - -dialog.inner { - display: flex; - flex-direction: column; - gap: var(--pad-2); -} - -dialog::backdrop { - background: hsla(0, 0%, 0%, 25%); - backdrop-filter: blur(2px); -} - -dialog:is(.dark *)::backdrop { - background: hsla(0, 0%, 100%, 15%); -} - -/* menus */ -menu { - display: flex; -} - -menu .button { - justify-content: flex-start; - width: 100%; -} - -menu .button.active { - background: var(--color-super-raised); -} - -menu.col { - flex-direction: column; - width: 25rem; - max-width: 100%; -} diff --git a/app/templates_src/error.lisp b/app/templates_src/error.lisp deleted file mode 100644 index 23b614a..0000000 --- a/app/templates_src/error.lisp +++ /dev/null @@ -1,9 +0,0 @@ -(text "{% extends \"root.lisp\" %} {% block head %}") -(title - (text "Error - {{ name }}")) -(link ("rel" "icon") ("href" "/public/favicon.svg")) -(text "{% endblock %} {% block body %}") -(div - ("class" "card") - (p (text "{{ error }}"))) -(text "{% endblock %}") diff --git a/app/templates_src/index.lisp b/app/templates_src/index.lisp deleted file mode 100644 index 7ade9be..0000000 --- a/app/templates_src/index.lisp +++ /dev/null @@ -1,10 +0,0 @@ -(text "{% extends \"root.lisp\" %} {% block head %}") -(title - (text "{{ name }}")) - -(meta ("property" "og:title") ("content" "{{ name }}")) -(meta ("property" "twitter:title") ("content" "{{ name }}")) -(link ("rel" "icon") ("href" "/public/favicon.svg")) -(text "{% endblock %} {% block body %}") -(h1 (text "{{ name }}")) -(text "{% endblock %}") diff --git a/app/templates_src/root.lisp b/app/templates_src/root.lisp deleted file mode 100644 index 6901e4c..0000000 --- a/app/templates_src/root.lisp +++ /dev/null @@ -1,75 +0,0 @@ -(text "") -(html - ("lang" "en") - (head - (meta ("charset" "UTF-8")) - (meta ("name" "viewport") ("content" "width=device-width, initial-scale=1.0")) - (meta ("http-equiv" "X-UA-Compatible") ("content" "ie=edge")) - - (link ("rel" "stylesheet") ("href" "https://repodelivery.trisua.com/tetratto/crates/app/src/public/css/utility.css")) - (link ("rel" "stylesheet") ("href" "/public/style.css?v={{ build_code }}")) - - (style (text ":root { --color-primary: {{ theme_color }}; }")) - - (meta ("name" "theme-color") ("content" "{{ theme_color }}")) - (meta ("property" "og:type") ("content" "website")) - (meta ("property" "og:site_name") ("content" "{{ name }}")) - - (script ("src" "/public/app.js?v={{ build_code }}") ("defer")) - - (text "{% block head %}{% endblock %}")) - - (body - ; nav - (nav - ("class" "flex w_full justify_between gap_2") - (div - ("class" "flex side") - (div - ("class" "dropdown") - (button - ("onclick" "open_dropdown(event)") - ("exclude" "dropdown") - ("class" "button camo fade") - (text "{{ icon \"menu\" }}")) - (div - ("class" "inner left") - (a - ("class" "button") - ("href" "/") - (text "home")) - (a - ("class" "button") - ("href" "https://trisua.com/t/malachite") - (text "source")) - (text "{% block dropdown %}{% endblock %}"))) - (a ("href" "/") (b (text "{{ name }}")))) - - (div - ("class" "side flex") - (text "{% block nav_extras %}{% endblock %}") - - ; theme switches - (button - ("class" "button camo fade") - ("id" "switch_light") - ("title" "Switch theme") - ("onclick" "set_theme('Dark')") - (text "{{ icon \"sun\" }}")) - - (button - ("class" "button camo fade hidden") - ("id" "switch_dark") - ("title" "Switch theme") - ("onclick" "set_theme('Light')") - (text "{{ icon \"moon\" }}")))) - - ; page - (article - ("class" "content_container flex flex_col") - ("id" "page") - (ul ("id" "messages")) - (text "{% block body %}{% endblock %}") - (div ("style" "min-height: 32px"))) - - (script (text "setTimeout(() => init_dropdowns(document.body), 150);")))) diff --git a/src/config.rs b/src/config.rs deleted file mode 100644 index 3866212..0000000 --- a/src/config.rs +++ /dev/null @@ -1,75 +0,0 @@ -use oiseau::config::{Configuration, DatabaseConfig}; -use pathbufd::PathBufD; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Debug, Serialize, Deserialize)] -pub struct Config { - /// The name of the site. Shown in the UI. - #[serde(default = "default_name")] - pub name: String, - /// The (CSS) theme color of the site. Shown in the UI. - #[serde(default = "default_theme_color")] - pub theme_color: String, - /// Real IP header (for reverse proxy). - #[serde(default = "default_real_ip_header")] - pub real_ip_header: String, - /// Database configuration. - #[serde(default = "default_database")] - pub database: DatabaseConfig, -} - -fn default_name() -> String { - "App".to_string() -} - -fn default_theme_color() -> String { - "#6ee7b7".to_string() -} - -fn default_real_ip_header() -> String { - "CF-Connecting-IP".to_string() -} - -fn default_database() -> DatabaseConfig { - DatabaseConfig::default() -} - -impl Configuration for Config { - fn db_config(&self) -> DatabaseConfig { - self.database.to_owned() - } -} - -impl Default for Config { - fn default() -> Self { - Self { - name: default_name(), - theme_color: default_theme_color(), - real_ip_header: default_real_ip_header(), - database: default_database(), - } - } -} - -impl Config { - /// Read the configuration file. - pub fn read() -> Self { - toml::from_str( - &match std::fs::read_to_string(PathBufD::current().join("app.toml")) { - Ok(x) => x, - Err(_) => { - let x = Config::default(); - - std::fs::write( - PathBufD::current().join("app.toml"), - &toml::to_string_pretty(&x).expect("failed to serialize config"), - ) - .expect("failed to write config"); - - return x; - } - }, - ) - .expect("failed to deserialize config") - } -} diff --git a/src/database/mod.rs b/src/database/mod.rs deleted file mode 100644 index 71ffaad..0000000 --- a/src/database/mod.rs +++ /dev/null @@ -1,29 +0,0 @@ -mod sql; - -use crate::config::Config; -use oiseau::{execute, postgres::DataManager as OiseauManager, postgres::Result as PgResult}; -use tetratto_core::model::{Error, Result}; - -pub const NAME_REGEX: &str = r"[^\w_\-\.,!]+"; - -#[derive(Clone)] -pub struct DataManager(pub OiseauManager); - -impl DataManager { - /// Create a new [`DataManager`]. - pub async fn new(config: Config) -> PgResult { - Ok(Self(OiseauManager::new(config).await?)) - } - - /// Initialize tables. - pub async fn init(&self) -> Result<()> { - let conn = match self.0.connect().await { - Ok(c) => c, - Err(e) => return Err(Error::DatabaseConnection(e.to_string())), - }; - - // execute!(&conn, sql::CREATE_TABLE_ENTRIES).unwrap(); - - Ok(()) - } -} diff --git a/src/database/sql/mod.rs b/src/database/sql/mod.rs deleted file mode 100644 index a02070e..0000000 --- a/src/database/sql/mod.rs +++ /dev/null @@ -1 +0,0 @@ -// pub const CREATE_TABLE_ENTRIES: &str = include_str!("./create_entries.sql"); diff --git a/src/main.rs b/src/main.rs index 04cdfe8..ea0beb4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,52 +1,12 @@ #![doc = include_str!("../README.md")] -mod config; -mod database; -mod markdown; -mod model; -mod routes; - -use crate::database::DataManager; -use axum::{Extension, Router}; -use config::Config; -use nanoneo::core::element::Render; -use std::{collections::HashMap, env::var, net::SocketAddr, process::exit, sync::Arc}; -use tera::{Tera, Value}; -use tetratto_core::html; -use tetratto_shared::hash::salt; -use tokio::sync::RwLock; +use axum::{Router, routing::get_service}; +use std::{env::var, net::SocketAddr}; use tower_http::{ catch_panic::CatchPanicLayer, trace::{self, TraceLayer}, }; use tracing::{Level, info}; -pub(crate) type InnerState = (DataManager, Tera, String); -pub(crate) type State = Arc>; - -fn render_markdown(value: &Value, _: &HashMap) -> tera::Result { - Ok(markdown::render_markdown(value.as_str().unwrap()) - .replace("\\@", "@") - .replace("%5C@", "@") - .into()) -} - -fn remove_script_tags(value: &Value, _: &HashMap) -> tera::Result { - Ok(value - .as_str() - .unwrap() - .replace("", "</script>") - .into()) -} - -#[macro_export] -macro_rules! create_dir_if_not_exists { - ($dir_path:expr) => { - if !std::fs::exists(&$dir_path).unwrap() { - std::fs::create_dir($dir_path).unwrap(); - } - }; -} - #[tokio::main(flavor = "multi_thread")] async fn main() { dotenv::dotenv().ok(); @@ -60,53 +20,12 @@ async fn main() { Err(_) => 8020, }; - // ... - let database = DataManager::new(Config::read()) - .await - .expect("failed to connect to database"); - database.init().await.expect("failed to init database"); - - // build lisp - create_dir_if_not_exists!("./templates_build"); - create_dir_if_not_exists!("./icons"); - - for x in glob::glob("./templates_src/**/*").expect("failed to read pattern") { - match x { - Ok(x) => std::fs::write( - x.to_str() - .unwrap() - .replace("templates_src/", "templates_build/"), - html::pull_icons( - nanoneo::parse(&std::fs::read_to_string(x).expect("failed to read template")) - .render(&mut HashMap::new()), - "./icons", - ) - .await, - ) - .expect("failed to write template"), - Err(e) => panic!("{e}"), - } - } - - // create docs dir - create_dir_if_not_exists!("./docs"); - - // ... - let mut tera = match Tera::new(&format!("./templates_build/**/*")) { - Ok(t) => t, - Err(e) => { - println!("{e}"); - exit(1); - } - }; - - tera.register_filter("markdown", render_markdown); - tera.register_filter("remove_script_tags", remove_script_tags); - // create app let app = Router::new() - .merge(routes::routes()) - .layer(Extension(Arc::new(RwLock::new((database, tera, salt()))))) + .nest_service( + "/", + get_service(tower_http::services::ServeDir::new("./public")), + ) .layer(axum::extract::DefaultBodyLimit::max( var("BODY_LIMIT") .unwrap_or("8388608".to_string()) @@ -125,7 +44,7 @@ async fn main() { .await .unwrap(); - info!("🪨 malachite."); + info!("📦 delivery."); info!("listening on http://0.0.0.0:{}", port); axum::serve( listener, diff --git a/src/markdown.rs b/src/markdown.rs deleted file mode 100644 index 0a48004..0000000 --- a/src/markdown.rs +++ /dev/null @@ -1,1042 +0,0 @@ -use std::collections::HashSet; - -pub fn render_markdown(input: &str) -> String { - let html = tetratto_shared::markdown::render_markdown_dirty(&parse_page(&parse_details( - &parse_text_color(&parse_highlight(&parse_link(&parse_image( - &parse_image_size(&parse_toc(&parse_underline(&parse_markdown_element( - &parse_comment(&input.replace("[/]", "
    ")), - )))), - )))), - ))) - .replace("$per", "%"); - - let mut allowed_attributes = HashSet::new(); - allowed_attributes.insert("id"); - allowed_attributes.insert("class"); - allowed_attributes.insert("ref"); - allowed_attributes.insert("aria-label"); - allowed_attributes.insert("lang"); - allowed_attributes.insert("title"); - allowed_attributes.insert("align"); - allowed_attributes.insert("src"); - allowed_attributes.insert("style"); - allowed_attributes.insert("controls"); - allowed_attributes.insert("autoplay"); - allowed_attributes.insert("loop"); - - tetratto_shared::markdown::clean_html( - html.replace("", ":temp_style") - .replace("", ":temp_audio"), - allowed_attributes, - ) - .replace(":temp_style", "") - .replace(":temp_audio:temp_audio", "") -} - -pub(crate) fn is_numeric(value: &str) -> bool { - let mut is_numeric = false; - - for char in value.chars() { - is_numeric = char.is_numeric(); - } - - is_numeric -} - -pub(crate) fn slice(x: &str, range: core::ops::RangeFrom) -> String { - (&x.chars().collect::>()[range]) - .iter() - .collect::() -} - -fn parse_text_color_line(output: &mut String, buffer: &mut String, line: &str) { - let mut in_color_buffer = false; - let mut in_main_buffer = false; - let mut color_buffer = String::new(); - let mut close_1 = false; - - for (i, char) in line.chars().enumerate() { - if close_1 && char != '%' { - // we expected to see another percentage to close the main buffer, - // not getting that means this wasn't meant to be a color - buffer.push('%'); - in_main_buffer = false; - close_1 = false; - } - - match char { - '%' => { - if in_color_buffer { - in_color_buffer = false; - in_main_buffer = true; - continue; - } - - if in_main_buffer { - // ending - if !close_1 { - close_1 = true; - continue; - } - - // by this point, we have: ! - // %color_buffer%main_buffer%% - output.push_str(&format!( - "{buffer}" - )); - - color_buffer.clear(); - buffer.clear(); - - // ... - in_main_buffer = false; - close_1 = false; - continue; - } - - // start - // scan ahead - let ahead = slice(line, i..); - if !ahead.contains("%%") { - // no closing sequence, we're done - buffer.push(char); - continue; - } - - // flush buffer - output.push_str(&buffer); - buffer.clear(); - - // toggle open - in_color_buffer = true; - } - ' ' => { - if in_color_buffer == true { - buffer.push_str(&color_buffer); - color_buffer.clear(); - } - - buffer.push(char); - } - _ => { - if in_color_buffer { - color_buffer.push(char) - } else { - buffer.push(char) - } - } - } - } -} - -fn parse_highlight_line(output: &mut String, buffer: &mut String, line: &str) { - let mut open_1 = false; - let mut open_2 = false; - let mut close_1 = false; - let mut is_open = false; - - for char in line.chars() { - if close_1 && char != '=' { - buffer.push('='); - close_1 = false; - } - - if open_1 && char != '=' { - buffer.push('='); - open_1 = false; - is_open = false; - } - - match char { - '=' => { - if !is_open { - // flush buffer - output.push_str(&buffer); - buffer.clear(); - - // toggle open - open_1 = true; - is_open = true; - } else { - if open_1 { - // this is the second open we've recieved - open_2 = true; - open_1 = false; - continue; - } - - if close_1 { - // this is the second close we've received - output.push_str(&format!("{buffer}\n")); - buffer.clear(); - open_1 = false; - open_2 = false; - close_1 = false; - is_open = false; - continue; - } - - close_1 = true; - } - } - _ => { - if open_1 { - open_1 = false; - buffer.push('='); - } - - if open_2 && is_open { - open_2 = false; - } - - buffer.push(char); - } - } - } -} - -fn parse_underline_line(output: &mut String, buffer: &mut String, line: &str) { - let mut open_1 = false; - let mut is_open = false; - let mut close_1 = false; - - for char in line.chars() { - if open_1 && char != '~' { - is_open = false; - open_1 = false; - - if char == '[' { - // image - buffer.push('!'); - } else { - buffer.push_str("!"); - } - } - - if close_1 && char != '!' { - is_open = false; - close_1 = false; - buffer.push('~'); - } - - match char { - '~' => { - if open_1 { - open_1 = false; - is_open = true; - } else if is_open { - // open close - close_1 = true; - } - } - '!' => { - if close_1 { - // close - let mut s: Vec<&str> = buffer.split(";").collect(); - let text = s.pop().unwrap_or(&"").trim(); - let mut style = String::new(); - - for (i, mut x) in s.iter().enumerate() { - if i == 0 { - // color - if x == &"default" { - x = &"currentColor"; - } - - style.push_str(&format!("text-decoration-color: {x};")); - } else if i == 1 { - // style - if x == &"default" { - x = &"solid"; - } - - style.push_str(&format!("text-decoration-style: {x};")); - } else if i == 2 { - // line - if x == &"default" { - x = &"underline"; - } - - style.push_str(&format!("text-decoration-line: {x};")); - } else if i == 3 { - // thickness - if x == &"default" { - x = &"1px"; - } - - style.push_str(&format!("text-decoration-thickness: {x}px;")); - } - } - - // defaults - if s.get(1).is_none() { - style.push_str(&format!("text-decoration-style: solid;")); - } - - if s.get(2).is_none() { - style.push_str(&format!("text-decoration-line: underline;")); - } - - if s.get(3).is_none() { - style.push_str(&format!("text-decoration-thickness: 1px;")); - } - - // ... - output.push_str(&format!("{text}")); - buffer.clear(); - - open_1 = false; - is_open = false; - close_1 = false; - continue; - } else if is_open { - buffer.push(char); - continue; - } - - // open - open_1 = true; - - // flush buffer - output.push_str(&buffer); - buffer.clear(); - } - _ => buffer.push(char), - } - } -} - -fn parse_comment_line(output: &mut String, _: &mut String, line: &str) { - if line.contains("]:") && line.starts_with("[") { - return; - } - - if line == "[..]" { - output.push_str(" "); - return; - } - - output.push_str(line); -} - -fn parse_image_size_line(output: &mut String, buffer: &mut String, line: &str) { - let mut image_possible = false; - let mut in_image = false; - let mut in_size = false; - let mut in_size_rhs = false; - - let mut size_lhs = String::new(); - let mut size_rhs = String::new(); - - if !line.contains("{") { - output.push_str(line); - return; - } - - for char in line.chars() { - if image_possible && char != '[' { - image_possible = false; - output.push('!'); - } - - match char { - '[' => { - if image_possible { - in_image = true; - image_possible = false; - continue; - } - - if in_image { - buffer.push(char); - } else { - output.push(char); - } - } - '{' => { - if in_image { - in_size = true; - continue; - } - - if in_image { - buffer.push(char); - } else { - output.push(char); - } - } - ':' => { - if in_size { - in_size_rhs = true; - continue; - } - - if in_image { - buffer.push(char); - } else { - output.push(char); - } - } - '}' => { - if in_size && in_size_rhs { - // end - output.push_str(&format!( - "![{buffer}", - if is_numeric(&size_lhs) { - format!("{size_lhs}px") - } else { - size_lhs - }, - if is_numeric(&size_rhs) { - format!("{size_rhs}px") - } else { - size_rhs - }, - if buffer.ends_with("#left)") { - "left" - } else if buffer.ends_with("#right)") { - "right" - } else { - "unset" - } - )); - - size_lhs = String::new(); - size_rhs = String::new(); - in_image = false; - in_size = false; - in_size_rhs = false; - image_possible = false; - - buffer.clear(); - continue; - } - - if in_image { - buffer.push(char); - } else { - output.push(char); - } - } - '!' => { - // flush buffer - output.push_str(&buffer); - buffer.clear(); - - // ... - image_possible = true - } - _ => { - if in_image { - if in_size { - if in_size_rhs { - size_rhs.push(char); - } else { - size_lhs.push(char); - } - } else { - buffer.push(char); - } - } else { - output.push(char) - } - } - } - } -} - -fn parse_image_line(output: &mut String, buffer: &mut String, line: &str) { - let mut image_possible = false; - let mut in_image = false; - let mut in_alt = false; - let mut in_src = false; - let mut alt = String::new(); - - for char in line.chars() { - if image_possible && char != '[' { - image_possible = false; - output.push('!'); - } - - match char { - '[' => { - if image_possible { - in_image = true; - image_possible = false; - in_alt = true; - continue; - } - - if in_image { - buffer.push(char); - } else { - output.push(char); - } - } - ']' => { - if in_alt { - in_alt = false; - in_src = true; - continue; - } - - output.push(char); - } - '(' => { - if in_src { - continue; - } - - if in_image { - buffer.push(char); - } else { - output.push(char); - } - } - ')' => { - if in_image { - // end - output.push_str(&format!( - "\"{alt}\"", - buffer.replace(" ", "$per20"), - if buffer.ends_with("#left") { - "left" - } else if buffer.ends_with("#right") { - "right" - } else { - "unset" - } - )); - - alt = String::new(); - in_alt = false; - in_src = false; - in_image = false; - image_possible = false; - - buffer.clear(); - continue; - } - - output.push(char); - } - '!' => { - // flush buffer - output.push_str(&buffer); - buffer.clear(); - - // ... - image_possible = true; - } - _ => { - if in_image { - if in_alt { - alt.push(char) - } else { - buffer.push(char); - } - } else { - output.push(char) - } - } - } - } -} - -fn parse_link_line(output: &mut String, buffer: &mut String, line: &str) { - let mut in_link = false; - let mut in_text = false; - let mut in_src = false; - let mut text = String::new(); - - for (i, char) in line.chars().enumerate() { - match char { - '[' => { - // flush buffer - output.push_str(&buffer); - buffer.clear(); - - // scan for closing, otherwise quit - let haystack = slice(line, i..); - if !haystack.contains("]") { - output.push('['); - continue; - } - - // ... - in_link = true; - in_text = true; - } - ']' => { - if in_text { - in_text = false; - in_src = true; - continue; - } - - output.push(char); - } - '(' => { - if in_src { - continue; - } - - if in_link { - buffer.push(char); - } else { - output.push(char); - } - } - ')' => { - if in_link { - // end - output.push_str(&format!( - "{text}" - )); - - text = String::new(); - in_text = false; - in_src = false; - in_link = false; - - buffer.clear(); - continue; - } - - output.push(char); - } - _ => { - if in_link { - if in_text { - text.push(char) - } else { - buffer.push(char); - } - } else { - output.push(char) - } - } - } - } -} - -/// Helper macro to quickly allow parsers to ignore fenced code blocks. -macro_rules! parser_ignores_pre { - ($body:ident, $input:ident) => {{ - let mut in_pre_block = false; - let mut output = String::new(); - let mut buffer = String::new(); - - for line in $input.split("\n") { - if line.starts_with("```") | (line == "") { - in_pre_block = !in_pre_block; - output.push_str(&format!("{line}\n")); - continue; - } - - if in_pre_block { - output.push_str(&format!("{line}\n")); - continue; - } - - $body(&mut output, &mut buffer, line); - output.push_str(&format!("{buffer}\n")); - buffer.clear(); - } - - output - }}; - - ($body:ident, $input:ident, $id:literal, ..) => {{ - let mut in_pre_block = false; - let mut output = String::new(); - let mut buffer = String::new(); - let mut proc_str = String::new(); - let mut pre_blocks = Vec::new(); - let mut pre_idx = 0; - - for line in $input.split("\n") { - if line.starts_with("```") { - in_pre_block = !in_pre_block; - - pre_idx += 1; - pre_blocks.push(String::new()); - pre_blocks[pre_idx - 1] += &(line.to_string() + "\n"); - - proc_str += &format!("$pre:{}.{pre_idx}\n", $id); - continue; - } - - if in_pre_block { - pre_blocks[pre_idx - 1] += &(line.to_string() + "\n"); - continue; - } - - proc_str += &(line.to_string() + "\n"); - } - - $body(&mut output, &mut buffer, &proc_str); - output.push_str(&format!("{buffer}\n")); - buffer.clear(); - - for (mut i, block) in pre_blocks.iter().enumerate() { - i += 1; - - if block == "```\n" { - output = output.replacen(&format!("$pre:{}.{i}", $id), "", 1); - continue; - } - - output = output.replacen(&format!("$pre:{}.{i}", $id), &format!("{block}```\n"), 1); - } - - output - }}; -} - -pub fn parse_text_color(input: &str) -> String { - parser_ignores_pre!(parse_text_color_line, input, 0, ..) -} - -pub fn parse_highlight(input: &str) -> String { - parser_ignores_pre!(parse_highlight_line, input, 1, ..) -} - -pub fn parse_underline(input: &str) -> String { - parser_ignores_pre!(parse_underline_line, input, 2, ..) -} - -pub fn parse_comment(input: &str) -> String { - parser_ignores_pre!(parse_comment_line, input) -} - -pub fn parse_image_size(input: &str) -> String { - parser_ignores_pre!(parse_image_size_line, input) -} - -pub fn parse_image(input: &str) -> String { - parser_ignores_pre!(parse_image_line, input) -} - -pub fn parse_link(input: &str) -> String { - parser_ignores_pre!(parse_link_line, input) -} - -/// Match page definitions. -/// -/// Each page is denoted with two at symbols, followed by the name of the page. -/// The page can also have an optional second argument (separated by a semicolon) -/// which accepts the "visible" value; marking the page as visible by default. -/// -/// To close a page (after you're done with the page's content), just put two -/// at symbols with nothing else on the line. -/// -/// You're able to put content AFTER the page closing line. This allows you to have -/// persistant content which is shared between every page. Only content within pages -/// is hidden when navigating to another page. This means everything in the entry -/// that isn't part of a page will remian throughout navigations. -/// -/// # Example -/// ```md -/// @@ home; visible -/// this is the homepage which is shown by default! -/// @@ -/// -/// @@ about -/// this is the about page which is NOT shown by default! a link with an href of "#/about" will open this page -/// @@ -/// ``` -pub fn parse_page(input: &str) -> String { - let mut output = String::new(); - let mut buffer = String::new(); - let mut page_id = String::new(); - - let mut start_shown = false; - let mut in_page = false; - let mut in_pre = false; - - for line in input.split("\n") { - if line.starts_with("```") || line.starts_with("") { - in_pre = !in_pre; - - if in_page { - buffer.push_str(&format!("{line}\n")); - } else { - output.push_str(&format!("{line}\n")); - } - - continue; - } - - if in_pre { - if in_page { - buffer.push_str(&format!("{line}\n")); - } else { - output.push_str(&format!("{line}\n")); - } - - continue; - } - - // not in pre - if line == "@@" { - // ending block - if in_page { - output.push_str(&format!( - "
    \n{}\n
    ", - if !start_shown { "hidden " } else { "" }, - render_markdown(&buffer) // recurse to render markdown since the renderer is ignoring the div content :/ - )); - - start_shown = false; - in_page = false; - - buffer.clear(); - continue; - } - } else if line.starts_with("@@") { - if !in_page { - in_page = true; - - let x = line.replace("@@", "").trim().to_string(); - let id_parts: Vec<&str> = x.split(";").map(|x| x.trim()).collect(); - page_id = id_parts[0].to_string(); - - if let Some(x) = id_parts.get(1) { - if *x == "visible" { - start_shown = true; - } - } - - continue; - } - } - - // otherwise - if in_page { - buffer.push_str(&format!("{line}\n")); - } else { - output.push_str(&format!("{line}\n")); - } - } - - output -} - -/// Parse the markdown syntax for the expandable `
    ` element. -/// -/// Similar to the [`parse_page`] page definitions, details elements are denoted -/// with two ampersand symbols. The opening line should look like `&& [summary]`. -/// -/// The block is closed with a line of exactly two ampersand symbols. -/// -/// # Example -/// ```md -/// && other summary -/// this element starts closed, but can be expanded -/// && -/// ``` -pub fn parse_details(input: &str) -> String { - let mut output = String::new(); - let mut buffer = String::new(); - let mut summary = String::new(); - - let mut in_details = false; - let mut in_pre = false; - - for line in input.split("\n") { - if line.starts_with("```") || line.starts_with("") { - in_pre = !in_pre; - - if in_details { - buffer.push_str(&format!("{line}\n")); - } else { - output.push_str(&format!("{line}\n")); - } - - continue; - } - - if in_pre { - if in_details { - buffer.push_str(&format!("{line}\n")); - } else { - output.push_str(&format!("{line}\n")); - } - - continue; - } - - // not in pre - if line == "&&" { - // ending block - if in_details { - output.push_str(&format!( - "
    {summary}
    {}
    ", - render_markdown(&buffer), - )); - - in_details = false; - buffer.clear(); - continue; - } - } else if line.starts_with("&&") { - if !in_details { - in_details = true; - summary = line.replace("&&", "").trim().to_string(); - continue; - } - } - - // otherwise - if in_details { - buffer.push_str(&format!("{line}\n")); - } else { - output.push_str(&format!("{line}\n")); - } - } - - output -} - -fn underscore_chars(mut x: String, chars: &[&str]) -> String { - for y in chars { - x = x.replace(y, "_"); - } - - x -} - -/// Get the list of headers needed for [`parse_toc`]. -pub fn get_toc_list(input: &str) -> (String, String) { - let mut output = String::new(); - let mut toc = String::new(); - let mut in_pre = false; - let mut hc_offset: Option = None; - - for line in input.split("\n") { - if line.starts_with("```") || line.starts_with("") { - in_pre = !in_pre; - output.push_str(&format!("{line}\n")); - continue; - } - - if in_pre { - output.push_str(&format!("{line}\n")); - continue; - } - - // not in pre - if line.starts_with("#") { - // get heading count - let mut hc = 0; - let real_hc; - - for x in line.chars() { - if x != '#' { - break; - } - - hc += 1; - } - - real_hc = hc.clone(); - if hc_offset.is_none() { - if hc > 1 { - // offset this count to 1 so the list renders properly - hc_offset = Some(hc - 1); - hc = 1; - } else { - hc_offset = Some(0); - } - } else if let Some(offset) = hc_offset { - hc -= offset; - } - - // add heading with id - let x = line.replacen(&"#".repeat(real_hc), "", 1); - let htext = x.trim(); - - let id = underscore_chars( - htext.to_lowercase(), - &[" ", "(", ")", "[", "]", "{", "}", ":", "?", "#", "&"], - ); - - output.push_str(&format!( - "{}\n\n", - render_markdown(&htext) - )); - - // add heading to toc - toc += &format!("{}- {htext}\n", " ".repeat(hc)); - - // ... - continue; - } - - // otherwise - output.push_str(&format!("{line}\n")); - } - - (toc, output) -} - -/// Parse the `[toc]` table-of-contents syntax. -pub fn parse_toc(input: &str) -> String { - let (toc_list, new_input) = get_toc_list(input); - - let mut output = String::new(); - let mut in_pre = false; - - for line in new_input.split("\n") { - if line.starts_with("```") || line.starts_with("") { - in_pre = !in_pre; - output.push_str(&format!("{line}\n")); - continue; - } - - if in_pre { - output.push_str(&format!("{line}\n")); - continue; - } - - // not in pre - if line.len() == 5 && line.to_lowercase() == "[toc]" { - // add toc - output.push_str(&format!("\n{toc_list}")); - continue; - } - - // otherwise - output.push_str(&format!("{line}\n")); - } - - output -} - -/// Handle the `` HTML element. -fn parse_markdown_element_line(output: &mut String, buffer: &mut String, line: &str) { - let mut in_markdown = false; - - for char in line.chars() { - if buffer.ends_with("") { - in_markdown = true; - output.push_str(&buffer.replace("", "")); - buffer.clear(); - } else if in_markdown && buffer.ends_with("") { - in_markdown = false; - output.push_str(&render_markdown(&buffer.replace("", ""))); - buffer.clear(); - } - - buffer.push(char); - } -} - -pub fn parse_markdown_element(input: &str) -> String { - parser_ignores_pre!(parse_markdown_element_line, input) -} diff --git a/src/model.rs b/src/model.rs deleted file mode 100644 index 83af5d7..0000000 --- a/src/model.rs +++ /dev/null @@ -1 +0,0 @@ -//! Base types matching SQL table structures. diff --git a/src/routes.rs b/src/routes.rs deleted file mode 100644 index 8c3efeb..0000000 --- a/src/routes.rs +++ /dev/null @@ -1,88 +0,0 @@ -use crate::{State, config::Config}; -use axum::{ - Extension, Router, - extract::Path, - response::{Html, IntoResponse}, - routing::{get, get_service}, -}; -use pathbufd::PathBufD; -use tera::Context; -use tetratto_core::model::Error; - -pub fn routes() -> Router { - Router::new() - .nest_service( - "/public", - get_service(tower_http::services::ServeDir::new("./public")), - ) - .fallback(not_found_request) - .route("/docs/{name}", get(view_doc_request)) - // pages - .route("/", get(index_request)) - // api - // ... -} - -fn default_context(config: &Config, build_code: &str) -> Context { - let mut ctx = Context::new(); - ctx.insert("name", &config.name); - ctx.insert("theme_color", &config.theme_color); - ctx.insert("build_code", &build_code); - ctx -} - -// pages -async fn not_found_request(Extension(data): Extension) -> impl IntoResponse { - let (ref data, ref tera, ref build_code) = *data.read().await; - - let mut ctx = default_context(&data.0.0, &build_code); - ctx.insert( - "error", - &Error::GeneralNotFound("page".to_string()).to_string(), - ); - return Html(tera.render("error.lisp", &ctx).unwrap()); -} - -async fn index_request(Extension(data): Extension) -> impl IntoResponse { - let (ref data, ref tera, ref build_code) = *data.read().await; - Html( - tera.render("index.lisp", &default_context(&data.0.0, &build_code)) - .unwrap(), - ) -} - -async fn view_doc_request( - Extension(data): Extension, - Path(name): Path, -) -> impl IntoResponse { - let (ref data, ref tera, ref build_code) = *data.read().await; - let path = PathBufD::current().extend(&["docs", &format!("{name}.md")]); - - if !std::fs::exists(&path).unwrap_or(false) { - let mut ctx = default_context(&data.0.0, &build_code); - ctx.insert( - "error", - &Error::GeneralNotFound("entry".to_string()).to_string(), - ); - return Html(tera.render("error.lisp", &ctx).unwrap()); - } - - let text = match std::fs::read_to_string(&path) { - Ok(t) => t, - Err(e) => { - let mut ctx = default_context(&data.0.0, &build_code); - ctx.insert("error", &Error::MiscError(e.to_string()).to_string()); - return Html(tera.render("error.lisp", &ctx).unwrap()); - } - }; - - let mut ctx = default_context(&data.0.0, &build_code); - - ctx.insert("text", &text); - ctx.insert("file_name", &name); - - return Html(tera.render("doc.lisp", &ctx).unwrap()); -} - -// api -// ...