diff --git a/Makefile b/Makefile deleted file mode 100644 index 49718c4..0000000 --- a/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -run: - cd site && cargo run diff --git a/README.md b/README.md index 9434e95..fbddbc6 100644 --- a/README.md +++ b/README.md @@ -4,51 +4,42 @@ Pure rust. Built with actix, diesel, tera, serde and sqlite3. ## Run instructions using docker -**TODO REWRITE, OUTDATED** - 1. Clone the repository - ```bash git clone https://github.com/mtrx1337/crablog cd crablog/site ``` - 2. Install diesel and create a database - ```bash cargo install diesel_cli --no-default-features --features "sqlite" diesel setup --database-url ../content/db.sqlite3 diesel migration run --database-url ../content/db.sqlite3 ``` - 3. Set up your configuration file (see below) 4. Pull the image (or build from source) and run the docker container - ```bash docker-compose up -d ``` ## Configuration environment file -All configuration options are defined in .env which should be placed in the path -where crablog is run. An example configuration is provided: - -`.env` +All configuration options are defined in crablog.env, an example configuration is provided. +When not using Docker you may have to add crablog.env to your startup script or define the variables there. +`crablog.env` ``` -CL_USERNAME=yourusername -CL_EMAIL=me@mydomain.tld # optional -CL_BIND_PORT=8000 # optional -CL_SUBMIT_TOKEN=Submit!123 # required, token needed for submitting / "login password" -CL_SESSION_SECRET= # required, session key encryption secret -CL_GITHUB_ACCOUNT=yourusername # optional -CL_TWITTER_ACCOUNT=yourusername # optional -CL_MASTODON_ACCOUNT=yourusername@mastodon.social # optional -CL_REDDIT_ACCOUNT=yourusername # optional -CL_DISCORD_ACCOUNT=yourusername # optional +USERNAME=yourusername +EMAIL=me@mydomain.tld +BIND_PORT=8000 +SUBMIT_TOKEN=Submit!123 # token needed for submitting +GITHUB_ACCOUNT=usernam3 +TWITTER_ACCOUNT=usernam3 +MASTODON_ACCOUNT=usernam3@mastodon.social +REDDIT_ACCOUNT=usernam3 +DISCORD_ACCOUNT=usernam3 # only needed when not using a docker container -CL_ROOT_PATH=/path/to/template/directory/and/sqliteDB +ROOT_PATH=/path/to/template/directory/and/sqliteDB ``` ## Routes @@ -61,13 +52,9 @@ CL_ROOT_PATH=/path/to/template/directory/and/sqliteDB | `/submit` | set your submit token and create posts | | `/edit/` | edit, delete or hide posts | | `/about` | information about this blog, social media accounts | - + **API Routes** | Route | Description | | ---------------- | ------------------------- | | `api/blog/posts` | returns all posts as json | - -## Regenerate Migrations from Schema: - -`diesel migration generate --diff-schema=./src/db/schema.rs create_posts` diff --git a/site/content/static/css/blog.css b/content/static/css/blog.css similarity index 53% rename from site/content/static/css/blog.css rename to content/static/css/blog.css index a32a425..090eab9 100644 --- a/site/content/static/css/blog.css +++ b/content/static/css/blog.css @@ -10,33 +10,18 @@ html { padding-left: 20%; } -.side-nav { - text-align: right; -} - -.social-icon { - height: 1rem; - width: 1rem; -} - -.post-img { +img { width: 50%; padding: 20px 0px 20px 0px; } -.blog-article { - padding-top: 2rem; +article { + padding-top: 2em; display: flex; } -.hidden-link { - text-decoration: none; - color: black; -} - .post-link { - text-decoration: none; - color: black; + padding-right: 20px; } .post-title { @@ -44,27 +29,20 @@ html { } .post-publish-date { - font-size: 0.7rem; + font-size: 0.7em; } .post-body { - padding-top: 1rem; - margin-left: 2rem; -} - -.submit-box { - display: flex; - justify-content: space-between; + padding-top: 1em; } #submit-form { - padding-top: 2rem; + padding-top: 2em; } -#submit-body, -#submit-title { +#submit-body, #submit-title { width: 100%; - margin-bottom: 2rem; + margin-bottom: 2em; resize: none; } @@ -82,4 +60,4 @@ html { width: 90%; padding-left: 5%; } -} \ No newline at end of file +} diff --git a/content/static/css/index.css b/content/static/css/index.css new file mode 100644 index 0000000..beb14fc --- /dev/null +++ b/content/static/css/index.css @@ -0,0 +1,24 @@ +* { + margin: 0; + padding: 0; +} + +html { + font-family: sans-serif; + padding: 20px; + width: 60%; + padding-left: 20%; +} + +.social-icon { + height: 1em; + width: 1em; +} + +@media (max-width:1080px) { + html { + font-family: sans-serif; + padding: 20px; + width: 90%; + padding-left: 5%; +} diff --git a/site/content/static/favicon.ico b/content/static/favicon.ico similarity index 100% rename from site/content/static/favicon.ico rename to content/static/favicon.ico diff --git a/content/static/js/blog.js b/content/static/js/blog.js new file mode 100644 index 0000000..1d01900 --- /dev/null +++ b/content/static/js/blog.js @@ -0,0 +1,35 @@ +function setTokenCookie() { + let token = document.getElementById('set-token').value; + let tokenCookie = 'token=' + token + "; SameSite=None; secure"; + document.cookie = tokenCookie; + setFormTokens(token); + document.getElementById("cookie-block").hidden = true; +} + +function clearTokenCookie() { + document.cookie = "token=; expires=Thu, 01 Jan 1970 00:00:00 UTC; SameSite=None; secure"; + document.getElementById("cookie-block").hidden = false; +} + +function setFormTokens(token) { + let tokenFields = document.querySelectorAll(".token"); + for (t of tokenFields) { + t.value = token; + } +} + +// if cookie is set, use it to pass the token +let c_pairs = document.cookie.split(";"); +let cookie_set = false; +for (c of c_pairs) { + if (c.trim().split("=")[0].startsWith("token")){ + // stick token into all the form input fields + let token = c.split("=")[1]; + setFormTokens(token); + cookie_set = true; + } +} + +if (!cookie_set) { + document.getElementById("cookie-block").hidden = false; +} diff --git a/site/content/static/social-icons/discord.ico b/content/static/social-icons/discord.ico similarity index 100% rename from site/content/static/social-icons/discord.ico rename to content/static/social-icons/discord.ico diff --git a/site/content/static/social-icons/github.ico b/content/static/social-icons/github.ico similarity index 100% rename from site/content/static/social-icons/github.ico rename to content/static/social-icons/github.ico diff --git a/site/content/static/social-icons/mastodon.ico b/content/static/social-icons/mastodon.ico similarity index 100% rename from site/content/static/social-icons/mastodon.ico rename to content/static/social-icons/mastodon.ico diff --git a/site/content/static/social-icons/reddit.ico b/content/static/social-icons/reddit.ico similarity index 100% rename from site/content/static/social-icons/reddit.ico rename to content/static/social-icons/reddit.ico diff --git a/site/content/static/social-icons/twitter.ico b/content/static/social-icons/twitter.ico similarity index 100% rename from site/content/static/social-icons/twitter.ico rename to content/static/social-icons/twitter.ico diff --git a/content/templates/about.html b/content/templates/about.html new file mode 100644 index 0000000..b52bc53 --- /dev/null +++ b/content/templates/about.html @@ -0,0 +1,43 @@ + + + + + + + + + {{ username }}' site + + + + + +

Hi, I'm {{ username }}

+

+ Back to the blog +

+

+ This is my blog. If you have questions or input for me please send me an E-Mail to {{ email }} +

+
+

+

+

+ + diff --git a/content/templates/blog-all-posts.html b/content/templates/blog-all-posts.html new file mode 100644 index 0000000..7f9eeaf --- /dev/null +++ b/content/templates/blog-all-posts.html @@ -0,0 +1,35 @@ + + + + + + + + + + All posts + + + + + +

{{ username }}' blog

+

+ About + Last 5 posts +

+ + + diff --git a/content/templates/blog-by-id.html b/content/templates/blog-by-id.html new file mode 100644 index 0000000..89f4ec4 --- /dev/null +++ b/content/templates/blog-by-id.html @@ -0,0 +1,35 @@ + + + + + + + + + + {{ post.title }} | {{ username }}' blog + + + + + +

{{ username }}' blog

+

+ Home + About + All Posts +

+ + + diff --git a/content/templates/blog.html b/content/templates/blog.html new file mode 100644 index 0000000..c5a13ee --- /dev/null +++ b/content/templates/blog.html @@ -0,0 +1,35 @@ + + + + + + + + + + {{ username }}' blog + + + + + +

{{ username }}' blog

+

+ About + All Posts

+ + + diff --git a/content/templates/edit-form.html b/content/templates/edit-form.html new file mode 100644 index 0000000..5215c94 --- /dev/null +++ b/content/templates/edit-form.html @@ -0,0 +1,42 @@ + + + + + + + + + Edit '{{ title }}' + + + + + + + +
+ + + +
+ + +
+ +
+ +
+ + +
+
+ + +
+ + + diff --git a/content/templates/edit.html b/content/templates/edit.html new file mode 100644 index 0000000..e6a1643 --- /dev/null +++ b/content/templates/edit.html @@ -0,0 +1,22 @@ + + + + + + + + + Edit posts... + + + + +

{{ username }}' blog

+

Edit posts

+ + + diff --git a/content/templates/submit.html b/content/templates/submit.html new file mode 100644 index 0000000..449c02e --- /dev/null +++ b/content/templates/submit.html @@ -0,0 +1,33 @@ + + + + + + + + + Submit post + + + + + + + +
+ + + +
+ + +
+ +
+ + + diff --git a/crablog.env b/crablog.env new file mode 100644 index 0000000..0342b21 --- /dev/null +++ b/crablog.env @@ -0,0 +1,9 @@ +USERNAME=yourusername +EMAIL=me@mydomain.tld +BIND_PORT=8000 +SUBMIT_TOKEN=Submit!123 # token needed for submitting +GITHUB_ACCOUNT=usernam3 +TWITTER_ACCOUNT=usernam3 +MASTODON_ACCOUNT=usernam3@mastodon.social +REDDIT_ACCOUNT=usernam3 +DISCORD_ACCOUNT=usernam3 \ No newline at end of file diff --git a/site/Cargo.lock b/site/Cargo.lock index c6edb6b..536511d 100644 --- a/site/Cargo.lock +++ b/site/Cargo.lock @@ -1,197 +1,241 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 - [[package]] name = "actix-codec" -version = "0.5.2" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f7b0a21988c1bf877cf4759ef5ddaac04c1c9fe808c9142ecb78ba97d97a28a" +checksum = "78d1833b3838dbe990df0f1f87baf640cf6146e898166afe401839d1b001e570" dependencies = [ "bitflags", "bytes", "futures-core", "futures-sink", - "memchr", - "pin-project-lite", + "log", + "pin-project 0.4.27", "tokio", "tokio-util", - "tracing", ] [[package]] -name = "actix-files" -version = "0.6.6" +name = "actix-connect" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0773d59061dedb49a8aed04c67291b9d8cf2fe0b60130a381aab53c6dd86e9be" -dependencies = [ - "actix-http", - "actix-service", - "actix-utils", - "actix-web", - "bitflags", - "bytes", - "derive_more 0.99.18", - "futures-core", - "http-range", - "log", - "mime", - "mime_guess", - "percent-encoding", - "pin-project-lite", - "v_htmlescape", -] - -[[package]] -name = "actix-http" -version = "3.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d48f96fc3003717aeb9856ca3d02a8c7de502667ad76eeacd830b48d2e91fac4" +checksum = "177837a10863f15ba8d3ae3ec12fac1099099529ed20083a27fdfe247381d0dc" dependencies = [ "actix-codec", "actix-rt", "actix-service", "actix-utils", - "ahash", - "base64 0.22.1", - "bitflags", - "brotli", - "bytes", - "bytestring", - "derive_more 0.99.18", - "encoding_rs", - "flate2", - "futures-core", - "h2", + "derive_more", + "either", + "futures-util", "http", - "httparse", - "httpdate", - "itoa", - "language-tags", - "local-channel", - "mime", - "percent-encoding", - "pin-project-lite", - "rand", - "sha1", - "smallvec", - "tokio", - "tokio-util", - "tracing", - "zstd", + "log", + "trust-dns-proto", + "trust-dns-resolver", ] [[package]] -name = "actix-identity" -version = "0.8.0" +name = "actix-files" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b8ddc6f6a8b19c4016aaa13519968da9969bc3bc1c1c883cdb0f25dd6c8cf7" +checksum = "5fc0a9181e93c91dc7eb401a0debaed5c8294e12019c307c72fd7a1731b672fc" dependencies = [ "actix-service", - "actix-session", - "actix-utils", "actix-web", - "derive_more 1.0.0", + "bitflags", + "bytes", + "derive_more", "futures-core", + "futures-util", + "log", + "mime", + "mime_guess", + "percent-encoding", + "v_htmlescape", +] + +[[package]] +name = "actix-http" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "452299e87817ae5673910e53c243484ca38be3828db819b6011736fc6982e874" +dependencies = [ + "actix-codec", + "actix-connect", + "actix-rt", + "actix-service", + "actix-threadpool", + "actix-utils", + "base64", + "bitflags", + "brotli2", + "bytes", + "cookie", + "copyless", + "derive_more", + "either", + "encoding_rs", + "flate2", + "futures-channel", + "futures-core", + "futures-util", + "fxhash", + "h2", + "http", + "httparse", + "indexmap", + "itoa", + "language-tags", + "lazy_static", + "log", + "mime", + "percent-encoding", + "pin-project 1.0.1", + "rand 0.7.3", + "regex", "serde", - "tracing", + "serde_json", + "serde_urlencoded", + "sha-1 0.9.2", + "slab", + "time 0.2.22", ] [[package]] name = "actix-macros" -version = "0.2.4" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e01ed3140b2f8d422c68afa1ed2e85d996ea619c988ac834d255db32138655cb" +checksum = "a60f9ba7c4e6df97f3aacb14bb5c0cd7d98a49dcbaed0d7f292912ad9a6a3ed2" dependencies = [ - "quote", - "syn", + "quote 1.0.7", + "syn 1.0.71", ] [[package]] name = "actix-router" -version = "0.5.3" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13d324164c51f63867b57e73ba5936ea151b8a41a1d23d1031eeb9f70d0236f8" +checksum = "bbd1f7dbda1645bf7da33554db60891755f6c01c1b2169e2f4c492098d30c235" dependencies = [ "bytestring", - "cfg-if", "http", + "log", "regex", - "regex-lite", "serde", - "tracing", ] [[package]] name = "actix-rt" -version = "2.10.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24eda4e2a6e042aa4e55ac438a2ae052d3b5da0ecf83d7411e1a368946925208" +checksum = "143fcc2912e0d1de2bcf4e2f720d2a60c28652ab4179685a1ee159e0fb3db227" dependencies = [ - "futures-core", + "actix-macros", + "actix-threadpool", + "copyless", + "futures-channel", + "futures-util", + "smallvec", "tokio", ] [[package]] name = "actix-server" -version = "2.5.0" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ca2549781d8dd6d75c40cf6b6051260a2cc2f3c62343d761a969a0640646894" +checksum = "45407e6e672ca24784baa667c5d32ef109ccdd8d5e0b5ebb9ef8a67f4dfb708e" dependencies = [ + "actix-codec", "actix-rt", "actix-service", "actix-utils", - "futures-core", + "futures-channel", "futures-util", + "log", "mio", + "mio-uds", + "num_cpus", + "slab", "socket2", - "tokio", - "tracing", ] [[package]] name = "actix-service" -version = "2.0.2" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b894941f818cfdc7ccc4b9e60fa7e53b5042a2e8567270f9147d5591893373a" +checksum = "0052435d581b5be835d11f4eb3bce417c8af18d87ddf8ace99f8e67e595882bb" dependencies = [ - "futures-core", - "paste", - "pin-project-lite", + "futures-util", + "pin-project 0.4.27", ] [[package]] -name = "actix-session" -version = "0.10.1" +name = "actix-testing" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efe6976a74f34f1b6d07a6c05aadc0ed0359304a7781c367fa5b4029418db08f" +checksum = "47239ca38799ab74ee6a8a94d1ce857014b2ac36f242f70f3f75a66f691e791c" dependencies = [ + "actix-macros", + "actix-rt", + "actix-server", + "actix-service", + "log", + "socket2", +] + +[[package]] +name = "actix-threadpool" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d209f04d002854b9afd3743032a27b066158817965bf5d036824d19ac2cc0e30" +dependencies = [ + "derive_more", + "futures-channel", + "lazy_static", + "log", + "num_cpus", + "parking_lot", + "threadpool", +] + +[[package]] +name = "actix-tls" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24789b7d7361cf5503a504ebe1c10806896f61e96eca9a7350e23001aca715fb" +dependencies = [ + "actix-codec", "actix-service", "actix-utils", - "actix-web", - "anyhow", - "derive_more 1.0.0", - "rand", - "serde", - "serde_json", - "tracing", + "futures-util", ] [[package]] name = "actix-utils" -version = "3.0.1" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88a1dcdff1466e3c2488e1cb5c36a71822750ad43839937f85d2f4d9f8b705d8" +checksum = "2e9022dec56632d1d7979e59af14f0597a28a830a9c1c7fec8b2327eb9f16b5a" dependencies = [ - "local-waker", - "pin-project-lite", + "actix-codec", + "actix-rt", + "actix-service", + "bitflags", + "bytes", + "either", + "futures-channel", + "futures-sink", + "futures-util", + "log", + "pin-project 0.4.27", + "slab", ] [[package]] name = "actix-web" -version = "4.9.0" +version = "3.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9180d76e5cc7ccbc4d60a506f2c727730b154010262df5b910eb17dbe4b8cb38" +checksum = "e641d4a172e7faa0862241a20ff4f1f5ab0ab7c279f00c2d4587b77483477b86" dependencies = [ "actix-codec", "actix-http", @@ -200,320 +244,263 @@ dependencies = [ "actix-rt", "actix-server", "actix-service", + "actix-testing", + "actix-threadpool", + "actix-tls", "actix-utils", "actix-web-codegen", - "ahash", + "awc", "bytes", - "bytestring", - "cfg-if", - "cookie", - "derive_more 0.99.18", + "derive_more", "encoding_rs", + "futures-channel", "futures-core", "futures-util", - "impl-more", - "itoa", - "language-tags", + "fxhash", "log", "mime", - "once_cell", - "pin-project-lite", + "pin-project 1.0.1", "regex", - "regex-lite", "serde", "serde_json", "serde_urlencoded", - "smallvec", "socket2", - "time", + "time 0.2.22", + "tinyvec", "url", ] [[package]] name = "actix-web-codegen" -version = "4.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f591380e2e68490b5dfaf1dd1aa0ebe78d84ba7067078512b4ea6e4492d622b8" +checksum = "ad26f77093333e0e7c6ffe54ebe3582d908a104e448723eec6d43d08b07143fb" dependencies = [ - "actix-router", "proc-macro2", - "quote", - "syn", + "quote 1.0.7", + "syn 1.0.71", ] [[package]] name = "addr2line" -version = "0.24.2" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" +checksum = "7c0929d69e78dd9bf5408269919fcbcaeb2e35e5d43e5815517cdc6a8e11a423" dependencies = [ "gimli", ] [[package]] -name = "adler2" -version = "2.0.0" +name = "adler" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" - -[[package]] -name = "aead" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" -dependencies = [ - "crypto-common", - "generic-array", -] - -[[package]] -name = "aes" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" -dependencies = [ - "cfg-if", - "cipher", - "cpufeatures", -] - -[[package]] -name = "aes-gcm" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1" -dependencies = [ - "aead", - "aes", - "cipher", - "ctr", - "ghash", - "subtle", -] - -[[package]] -name = "ahash" -version = "0.8.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" -dependencies = [ - "cfg-if", - "getrandom", - "once_cell", - "version_check", - "zerocopy", -] +checksum = "ee2a4ec343196209d6594e19543ae87a39f96d5534d7174822a3ad825dd6ed7e" [[package]] name = "aho-corasick" -version = "1.1.3" +version = "0.7.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +checksum = "7404febffaa47dac81aa44dba71523c9d069b1bdc50a77db41195149e17f68e5" dependencies = [ "memchr", ] [[package]] -name = "alloc-no-stdlib" -version = "2.0.4" +name = "async-trait" +version = "0.1.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" - -[[package]] -name = "alloc-stdlib" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece" +checksum = "b246867b8b3b6ae56035f1eb1ed557c1d8eae97f0d53696138a50fa0e3a3b8c0" dependencies = [ - "alloc-no-stdlib", + "proc-macro2", + "quote 1.0.7", + "syn 1.0.71", ] [[package]] -name = "android-tzdata" -version = "0.1.1" +name = "atty" +version = "0.2.14" 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" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ + "hermit-abi", "libc", + "winapi 0.3.9", ] -[[package]] -name = "anstream" -version = "0.6.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b" -dependencies = [ - "anstyle", - "anstyle-parse", - "anstyle-query", - "anstyle-wincon", - "colorchoice", - "is_terminal_polyfill", - "utf8parse", -] - -[[package]] -name = "anstyle" -version = "1.0.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" - -[[package]] -name = "anstyle-parse" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" -dependencies = [ - "utf8parse", -] - -[[package]] -name = "anstyle-query" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" -dependencies = [ - "windows-sys 0.59.0", -] - -[[package]] -name = "anstyle-wincon" -version = "3.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2109dbce0e72be3ec00bed26e6a7479ca384ad226efdd66db8fa2e3a38c83125" -dependencies = [ - "anstyle", - "windows-sys 0.59.0", -] - -[[package]] -name = "anyhow" -version = "1.0.95" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34ac096ce696dc2fcabef30516bb13c0a68a11d30131d3df6f04711467681b04" - [[package]] name = "autocfg" -version = "1.4.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" +checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" + +[[package]] +name = "awc" +version = "2.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b381e490e7b0cfc37ebc54079b0413d8093ef43d14a4e4747083f7fa47a9e691" +dependencies = [ + "actix-codec", + "actix-http", + "actix-rt", + "actix-service", + "base64", + "bytes", + "cfg-if 1.0.0", + "derive_more", + "futures-core", + "log", + "mime", + "percent-encoding", + "rand 0.7.3", + "serde", + "serde_json", + "serde_urlencoded", +] [[package]] name = "backtrace" -version = "0.3.74" +version = "0.3.54" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" +checksum = "2baad346b2d4e94a24347adeee9c7a93f412ee94b9cc26e5b59dea23848e9f28" dependencies = [ "addr2line", - "cfg-if", + "cfg-if 1.0.0", "libc", "miniz_oxide", "object", "rustc-demangle", - "windows-targets", ] [[package]] -name = "base64" -version = "0.20.0" +name = "base-x" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ea22880d78093b0cbe17c89f64a7d457941e65759157ec6cb31a31d652b05e5" +checksum = "a4521f3e3d031370679b3b140beb36dfe4801b09ac77e30c61941f97df3ef28b" [[package]] name = "base64" -version = "0.22.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" +checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" [[package]] name = "bitflags" -version = "2.6.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" [[package]] name = "block-buffer" -version = "0.10.4" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" dependencies = [ - "generic-array", + "block-padding", + "byte-tools", + "byteorder", + "generic-array 0.12.3", ] [[package]] -name = "brotli" -version = "6.0.0" +name = "block-buffer" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74f7971dbd9326d58187408ab83117d8ac1bb9c17b085fdacd1cf2f598719b6b" +checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" dependencies = [ - "alloc-no-stdlib", - "alloc-stdlib", - "brotli-decompressor", + "generic-array 0.14.4", ] [[package]] -name = "brotli-decompressor" -version = "4.0.1" +name = "block-padding" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a45bd2e4095a8b518033b128020dd4a55aab1c0a381ba4404a472630f4bc362" +checksum = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" dependencies = [ - "alloc-no-stdlib", - "alloc-stdlib", + "byte-tools", +] + +[[package]] +name = "brotli-sys" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4445dea95f4c2b41cde57cc9fee236ae4dbae88d8fcbdb4750fc1bb5d86aaecd" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "brotli2" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cb036c3eade309815c15ddbacec5b22c4d1f3983a774ab2eac2e3e9ea85568e" +dependencies = [ + "brotli-sys", + "libc", ] [[package]] name = "bstr" -version = "1.11.1" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "786a307d683a5bf92e6fd5fd69a7eb613751668d1d8d67d802846dfe367c62c8" +checksum = "473fc6b38233f9af7baa94fb5852dca389e3d95b8e21c8e3719301462c5d9faf" dependencies = [ "memchr", - "serde", +] + +[[package]] +name = "buf-min" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6ae7069aad07c7cdefe6a22a671f00650728bd2331a4cc62e1e5d0becdf9ca4" +dependencies = [ + "bytes", ] [[package]] name = "bumpalo" -version = "3.16.0" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" +checksum = "2e8c087f005730276d1096a652e92a8bacee2e2472bcc9715a74d2bec38b5820" + +[[package]] +name = "byte-tools" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" [[package]] name = "byteorder" -version = "1.5.0" +version = "1.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" +checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" [[package]] name = "bytes" -version = "1.9.0" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b" +checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" [[package]] name = "bytestring" -version = "1.4.0" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e465647ae23b2823b0753f50decb2d5a86d2bb2cac04788fafd1f80e45378e5f" +checksum = "fc7c05fa5172da78a62d9949d662d2ac89d4cc7355d7b49adee5163f1fb3f363" dependencies = [ "bytes", ] [[package]] name = "cc" -version = "1.2.6" +version = "1.0.62" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d6dbb628b8f8555f86d0323c2eb39e3ec81901f4b83e091db8a6a76d316a333" -dependencies = [ - "jobserver", - "libc", - "shlex", -] +checksum = "f1770ced377336a88a67c473594ccc14eca6f4559217c34f64aac8f83d641b40" + +[[package]] +name = "cfg-if" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" [[package]] name = "cfg-if" @@ -523,107 +510,75 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.39" +version = "0.4.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825" +checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73" dependencies = [ - "android-tzdata", - "iana-time-zone", - "js-sys", + "libc", + "num-integer", "num-traits", "serde", - "wasm-bindgen", - "windows-targets", + "time 0.1.44", + "winapi 0.3.9", ] [[package]] name = "chrono-tz" -version = "0.9.0" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93698b29de5e97ad0ae26447b344c482a7284c737d9ddc5f9e52b74a336671bb" +checksum = "2554a3155fec064362507487171dcc4edc3df60cb10f3a1fb10ed8094822b120" dependencies = [ "chrono", - "chrono-tz-build", - "phf", -] - -[[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", - "phf_codegen", ] [[package]] -name = "cipher" -version = "0.4.4" +name = "cloudabi" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" +checksum = "4344512281c643ae7638bbabc3af17a11307803ec8f0fcad9fae512a8bf36467" dependencies = [ - "crypto-common", - "inout", + "bitflags", ] [[package]] -name = "colorchoice" -version = "1.0.3" +name = "const_fn" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" - -[[package]] -name = "convert_case" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" +checksum = "c478836e029dcef17fb47c89023448c64f781a046e0300e257ad8225ae59afab" [[package]] name = "cookie" -version = "0.16.2" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e859cd57d0710d9e06c381b550c06e76992472a8c6d527aecd2fc673dcc231fb" +checksum = "784ad0fbab4f3e9cef09f20e0aea6000ae08d2cb98ac4c0abc53df18803d702f" dependencies = [ - "aes-gcm", - "base64 0.20.0", - "hkdf", - "hmac", "percent-encoding", - "rand", - "sha2", - "subtle", - "time", - "version_check", + "time 0.2.22", + "version_check 0.9.2", ] [[package]] -name = "core-foundation-sys" -version = "0.8.7" +name = "copyless" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" +checksum = "a2df960f5d869b2dd8532793fde43eb5427cceb126c929747a26823ab0eeb536" [[package]] -name = "cpufeatures" -version = "0.2.16" +name = "cpuid-bool" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b80225097f2e5ae4e7179dd2266824648f3e2f49d9134d584b76389d31c4c3" -dependencies = [ - "libc", -] +checksum = "8aebca1129a03dc6dc2b127edd729435bbc4a37e1d5f4d7513165089ceb02634" [[package]] name = "crablog" -version = "0.4.0" +version = "0.3.1" dependencies = [ "actix-files", - "actix-identity", - "actix-session", "actix-web", "chrono", - "diesel", - "dotenvy", + "diesel 1.4.6", + "diesel_codegen", "env_logger", "once_cell", "serde", @@ -635,269 +590,165 @@ dependencies = [ [[package]] name = "crc32fast" -version = "1.4.2" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" +checksum = "81156fece84ab6a9f2afdb109ce3ae577e42b1228441eded99bd77f627953b1a" 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", + "cfg-if 1.0.0", ] [[package]] name = "crossbeam-utils" -version = "0.8.21" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" - -[[package]] -name = "crypto-common" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" dependencies = [ - "generic-array", - "rand_core", - "typenum", -] - -[[package]] -name = "ctr" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" -dependencies = [ - "cipher", -] - -[[package]] -name = "darling" -version = "0.20.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" -dependencies = [ - "darling_core", - "darling_macro", -] - -[[package]] -name = "darling_core" -version = "0.20.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim", - "syn", -] - -[[package]] -name = "darling_macro" -version = "0.20.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" -dependencies = [ - "darling_core", - "quote", - "syn", -] - -[[package]] -name = "deranged" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" -dependencies = [ - "powerfmt", + "autocfg", + "cfg-if 0.1.10", + "lazy_static", ] [[package]] name = "derive_more" -version = "0.99.18" +version = "0.99.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce" -dependencies = [ - "convert_case", - "proc-macro2", - "quote", - "rustc_version", - "syn", -] - -[[package]] -name = "derive_more" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a9b99b9cbbe49445b21764dc0625032a89b145a2642e67603e1c936f5458d05" -dependencies = [ - "derive_more-impl", -] - -[[package]] -name = "derive_more-impl" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" +checksum = "41cb0e6161ad61ed084a36ba71fbba9e3ac5aee3606fb607fe08da6acbcf3d8c" dependencies = [ "proc-macro2", - "quote", - "syn", - "unicode-xid", + "quote 1.0.7", + "syn 1.0.71", ] [[package]] name = "deunicode" -version = "1.6.0" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "339544cc9e2c4dc3fc7149fd630c5f22263a4fdf18a98afd0075784968b5cf00" +checksum = "850878694b7933ca4c9569d30a34b55031b9b139ee1fc7b94a527c4ef960d690" [[package]] name = "diesel" -version = "2.2.6" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccf1bedf64cdb9643204a36dd15b19a6ce8e7aa7f7b105868e9f1fad5ffa7d12" +checksum = "304226fa7a3982b0405f6bb95dd9c10c3e2000709f194038a60ec2c277150951" dependencies = [ + "byteorder", +] + +[[package]] +name = "diesel" +version = "1.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "047bfc4d5c3bd2ef6ca6f981941046113524b9a9f9a7cbdfdd7ff40f58e6f542" +dependencies = [ + "byteorder", "chrono", "diesel_derives", "libsqlite3-sys", - "time", +] + +[[package]] +name = "diesel_codegen" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22006237aee4465b49fb3a0248310a0aaefa6f165fc63c5f6e67810c63521c31" +dependencies = [ + "diesel 0.16.0", + "quote 0.3.15", + "serde", + "serde_json", + "syn 0.11.11", ] [[package]] name = "diesel_derives" -version = "2.2.3" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7f2c3de51e2ba6bf2a648285696137aaf0f5f487bcbea93972fe8a364e131a4" +checksum = "45f5098f628d02a7a0f68ddba586fb61e80edec3bdc1be3b921f4ceec60858d3" dependencies = [ - "diesel_table_macro_syntax", - "dsl_auto_type", "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "diesel_table_macro_syntax" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "209c735641a413bc68c4923a9d6ad4bcb3ca306b794edaa7eb0b3228a99ffb25" -dependencies = [ - "syn", + "quote 1.0.7", + "syn 1.0.71", ] [[package]] name = "digest" -version = "0.10.7" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" dependencies = [ - "block-buffer", - "crypto-common", - "subtle", + "generic-array 0.12.3", ] [[package]] -name = "displaydoc" -version = "0.2.5" +name = "digest" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" dependencies = [ - "proc-macro2", - "quote", - "syn", + "generic-array 0.14.4", ] [[package]] -name = "dotenvy" -version = "0.15.7" +name = "discard" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" - -[[package]] -name = "dsl_auto_type" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5d9abe6314103864cc2d8901b7ae224e0ab1a103a0a416661b4097b0779b607" -dependencies = [ - "darling", - "either", - "heck", - "proc-macro2", - "quote", - "syn", -] +checksum = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0" [[package]] name = "either" -version = "1.13.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" +checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" [[package]] name = "encoding_rs" -version = "0.8.35" +version = "0.8.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" +checksum = "801bbab217d7f79c0062f4f7205b5d4427c6d1a7bd7aafdd1475f7c59d62b283" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", ] [[package]] -name = "env_filter" -version = "0.1.3" +name = "enum-as-inner" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "186e05a59d4c50738528153b83b0b0194d3a29507dfec16eccd4b342903397d0" +checksum = "7c5f0096a91d210159eceb2ff5e1c4da18388a170e1e3ce948aac9c8fdbbf595" dependencies = [ - "log", - "regex", + "heck", + "proc-macro2", + "quote 1.0.7", + "syn 1.0.71", ] [[package]] name = "env_logger" -version = "0.11.6" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcaee3d8e3cfc3fd92428d477bc97fc29ec8716d180c0d74c643bb26166660e0" +checksum = "17392a012ea30ef05a610aa97dfb49496e71c9f676b27879922ea5bdf60d9d3f" dependencies = [ - "anstream", - "anstyle", - "env_filter", + "atty", "humantime", "log", + "regex", + "termcolor", ] [[package]] -name = "equivalent" -version = "1.0.1" +name = "fake-simd" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" [[package]] name = "flate2" -version = "1.0.35" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c" +checksum = "7411863d55df97a419aa64cb4d2f167103ea9d767e2c54a1868b7ac3f6b47129" dependencies = [ + "cfg-if 1.0.0", "crc32fast", + "libc", "miniz_oxide", ] @@ -909,98 +760,187 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "form_urlencoded" -version = "1.2.1" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +checksum = "ece68d15c92e84fa4f19d3780f1294e5ca82a78a6d515f1efaabcc144688be00" dependencies = [ + "matches", "percent-encoding", ] [[package]] -name = "futures-core" -version = "0.3.31" +name = "fuchsia-zircon" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" +checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" +dependencies = [ + "bitflags", + "fuchsia-zircon-sys", +] + +[[package]] +name = "fuchsia-zircon-sys" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" + +[[package]] +name = "futures" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b3b0c040a1fe6529d30b3c5944b280c7f0dcb2930d2c3062bca967b602583d0" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b7109687aa4e177ef6fe84553af6280ef2778bdb7783ba44c9dc3399110fe64" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "847ce131b72ffb13b6109a221da9ad97a64cbe48feb1028356b836b47b8f1748" + +[[package]] +name = "futures-io" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "611834ce18aaa1bd13c4b374f5d653e1027cf99b6b502584ff8c9a64413b30bb" + +[[package]] +name = "futures-macro" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77408a692f1f97bcc61dc001d752e00643408fbc922e4d634c655df50d595556" +dependencies = [ + "proc-macro-hack", + "proc-macro2", + "quote 1.0.7", + "syn 1.0.71", +] [[package]] name = "futures-sink" -version = "0.3.31" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" +checksum = "f878195a49cee50e006b02b93cf7e0a95a38ac7b776b4c4d9cc1207cd20fcb3d" [[package]] name = "futures-task" -version = "0.3.31" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" +checksum = "7c554eb5bf48b2426c4771ab68c6b14468b6e76cc90996f528c3338d761a4d0d" +dependencies = [ + "once_cell", +] [[package]] name = "futures-util" -version = "0.3.31" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +checksum = "d304cff4a7b99cfb7986f7d43fbe93d175e72e704a8860787cc95e9ffd85cbd2" dependencies = [ + "futures-channel", "futures-core", + "futures-io", + "futures-macro", + "futures-sink", "futures-task", - "pin-project-lite", + "memchr", + "pin-project 1.0.1", "pin-utils", + "proc-macro-hack", + "proc-macro-nested", + "slab", +] + +[[package]] +name = "fxhash" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" +dependencies = [ + "byteorder", ] [[package]] name = "generic-array" -version = "0.14.7" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +checksum = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec" dependencies = [ "typenum", - "version_check", +] + +[[package]] +name = "generic-array" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" +dependencies = [ + "typenum", + "version_check 0.9.2", ] [[package]] name = "getrandom" -version = "0.2.15" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +checksum = "fc587bc0ec293155d5bfa6b9891ec18a1e330c234f896ea47fbada4cadbe47e6" dependencies = [ - "cfg-if", + "cfg-if 0.1.10", "libc", - "wasi", + "wasi 0.9.0+wasi-snapshot-preview1", ] [[package]] -name = "ghash" -version = "0.5.1" +name = "getrandom" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0d8a4362ccb29cb0b265253fb0a2728f592895ee6854fd9bc13f2ffda266ff1" +checksum = "c9495705279e7140bf035dde1f6e750c162df8b625267cd52cc44e0b156732c8" dependencies = [ - "opaque-debug", - "polyval", + "cfg-if 1.0.0", + "libc", + "wasi 0.10.0+wasi-snapshot-preview1", ] [[package]] name = "gimli" -version = "0.31.1" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" +checksum = "f6503fe142514ca4799d4c26297c4248239fe8838d827db6bd6065c6ed29a6ce" [[package]] name = "globset" -version = "0.4.15" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15f1ce686646e7f1e19bf7d5533fe443a45dbfb990e00629110797578b42fb19" +checksum = "c152169ef1e421390738366d2f796655fec62621dabbd0fd476f905934061e4a" dependencies = [ "aho-corasick", "bstr", + "fnv", "log", - "regex-automata", - "regex-syntax", + "regex", ] [[package]] name = "globwalk" -version = "0.9.1" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bf760ebf69878d9fd8f110c89703d90ce35095324d1f1edcb595c63945ee757" +checksum = "93e3af942408868f6934a7b85134a3230832b9977cf66125df2f9edcfce4ddcc" dependencies = [ "bitflags", "ignore", @@ -1009,9 +949,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.26" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" +checksum = "5e4728fd124914ad25e99e3d15a9361a879f6620f63cb56bbb08f95abb97a535" dependencies = [ "bytes", "fnv", @@ -1024,412 +964,254 @@ dependencies = [ "tokio", "tokio-util", "tracing", + "tracing-futures", ] [[package]] name = "hashbrown" -version = "0.15.2" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" +checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04" [[package]] name = "heck" -version = "0.5.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" - -[[package]] -name = "hkdf" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" +checksum = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" dependencies = [ - "hmac", + "unicode-segmentation", ] [[package]] -name = "hmac" -version = "0.12.1" +name = "hermit-abi" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +checksum = "5aca5565f760fb5b220e499d72710ed156fdb74e631659e99377d9ebfbd13ae8" dependencies = [ - "digest", + "libc", +] + +[[package]] +name = "hostname" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c731c3e10504cc8ed35cfe2f1db4c9274c3d35fa486e3b31df46f068ef3e867" +dependencies = [ + "libc", + "match_cfg", + "winapi 0.3.9", ] [[package]] name = "http" -version = "0.2.12" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" +checksum = "28d569972648b2c512421b5f2a405ad6ac9666547189d0c5477a3f200f3e02f9" dependencies = [ "bytes", "fnv", "itoa", ] -[[package]] -name = "http-range" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21dec9db110f5f872ed9699c3ecf50cf16f423502706ba5c72462e28d3157573" - [[package]] name = "httparse" -version = "1.9.5" +version = "1.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" - -[[package]] -name = "httpdate" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" +checksum = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9" [[package]] name = "humansize" -version = "2.1.3" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6cb51c9a029ddc91b07a787f1d86b53ccfa49b0e86688c946ebe8d3555685dd7" -dependencies = [ - "libm", -] +checksum = "b6cab2627acfc432780848602f3f558f7e9dd427352224b0d9324025796d2a5e" [[package]] name = "humantime" -version = "2.1.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" - -[[package]] -name = "iana-time-zone" -version = "0.1.61" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" -dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "wasm-bindgen", - "windows-core", -] - -[[package]] -name = "iana-time-zone-haiku" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" -dependencies = [ - "cc", -] - -[[package]] -name = "icu_collections" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" -dependencies = [ - "displaydoc", - "yoke", - "zerofrom", - "zerovec", -] - -[[package]] -name = "icu_locid" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" -dependencies = [ - "displaydoc", - "litemap", - "tinystr", - "writeable", - "zerovec", -] - -[[package]] -name = "icu_locid_transform" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" -dependencies = [ - "displaydoc", - "icu_locid", - "icu_locid_transform_data", - "icu_provider", - "tinystr", - "zerovec", -] - -[[package]] -name = "icu_locid_transform_data" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" - -[[package]] -name = "icu_normalizer" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" -dependencies = [ - "displaydoc", - "icu_collections", - "icu_normalizer_data", - "icu_properties", - "icu_provider", - "smallvec", - "utf16_iter", - "utf8_iter", - "write16", - "zerovec", -] - -[[package]] -name = "icu_normalizer_data" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" - -[[package]] -name = "icu_properties" -version = "1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" -dependencies = [ - "displaydoc", - "icu_collections", - "icu_locid_transform", - "icu_properties_data", - "icu_provider", - "tinystr", - "zerovec", -] - -[[package]] -name = "icu_properties_data" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" - -[[package]] -name = "icu_provider" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" -dependencies = [ - "displaydoc", - "icu_locid", - "icu_provider_macros", - "stable_deref_trait", - "tinystr", - "writeable", - "yoke", - "zerofrom", - "zerovec", -] - -[[package]] -name = "icu_provider_macros" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "ident_case" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" +checksum = "3c1ad908cc71012b7bea4d0c53ba96a8cba9962f048fa68d143376143d863b7a" [[package]] name = "idna" -version = "1.0.3" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" +checksum = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9" dependencies = [ - "idna_adapter", - "smallvec", - "utf8_iter", -] - -[[package]] -name = "idna_adapter" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" -dependencies = [ - "icu_normalizer", - "icu_properties", + "matches", + "unicode-bidi", + "unicode-normalization", ] [[package]] name = "ignore" -version = "0.4.23" +version = "0.4.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d89fd380afde86567dfba715db065673989d6253f42b88179abd3eae47bda4b" +checksum = "22dcbf2a4a289528dbef21686354904e1c694ac642610a9bff9e7df730d9ec72" dependencies = [ - "crossbeam-deque", + "crossbeam-utils", "globset", + "lazy_static", "log", "memchr", - "regex-automata", + "regex", "same-file", + "thread_local", "walkdir", "winapi-util", ] -[[package]] -name = "impl-more" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8a5a9a0ff0086c7a148acb942baaabeadf9504d10400b5a05645853729b9cd2" - [[package]] name = "indexmap" -version = "2.7.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62f822373a4fe84d4bb149bf54e584a7f4abec90e072ed49cda0edea5b95471f" +checksum = "55e2e4c765aa53a0424761bf9f41aa7a6ac1efa87238f59560640e27fca028f2" dependencies = [ - "equivalent", + "autocfg", "hashbrown", ] [[package]] -name = "inout" -version = "0.1.3" +name = "instant" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" +checksum = "cb1fc4429a33e1f80d41dc9fea4d108a88bec1de8053878898ae448a0b52f613" dependencies = [ - "generic-array", + "cfg-if 1.0.0", ] [[package]] -name = "is_terminal_polyfill" -version = "1.70.1" +name = "iovec" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" - -[[package]] -name = "itoa" -version = "1.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" - -[[package]] -name = "jobserver" -version = "0.1.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" +checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" dependencies = [ "libc", ] [[package]] -name = "js-sys" -version = "0.3.76" +name = "ipconfig" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6717b6b5b077764fb5966237269cb3c64edddde4b14ce42647430a78ced9e7b7" +checksum = "f7e2f18aece9709094573a9f24f483c4f65caa4298e2f7ae1b71cc65d853fad7" dependencies = [ - "once_cell", - "wasm-bindgen", + "socket2", + "widestring", + "winapi 0.3.9", + "winreg", +] + +[[package]] +name = "itoa" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc6f3ad7b9d11a0c00842ff8de1b60ee58661048eb8049ed33c73594f359d7e6" + +[[package]] +name = "kernel32-sys" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" +dependencies = [ + "winapi 0.2.8", + "winapi-build", ] [[package]] name = "language-tags" -version = "0.3.2" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4345964bb142484797b161f473a503a434de77149dd8c7427788c6e13379388" +checksum = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" [[package]] name = "lazy_static" -version = "1.5.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.169" +version = "0.2.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" - -[[package]] -name = "libm" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa" +checksum = "4d58d1b70b004888f764dfbf6a26a3b0342a1632d33968e4a179d8011c760614" [[package]] name = "libsqlite3-sys" -version = "0.30.1" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e99fb7a497b1e3339bc746195567ed8d3e24945ecd636e3619d20b9de9e9149" +checksum = "1e704a02bcaecd4a08b93a23f6be59d0bd79cd161e0963e9499165a0a35df7bd" dependencies = [ "pkg-config", "vcpkg", ] [[package]] -name = "litemap" -version = "0.7.4" +name = "linked-hash-map" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104" - -[[package]] -name = "local-channel" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6cbc85e69b8df4b8bb8b89ec634e7189099cea8927a276b7384ce5488e53ec8" -dependencies = [ - "futures-core", - "futures-sink", - "local-waker", -] - -[[package]] -name = "local-waker" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d873d7c67ce09b42110d801813efbc9364414e356be9935700d368351657487" +checksum = "8dd5a6d5999d9907cda8ed67bbd137d3af8085216c2ac62de5be860bd41f304a" [[package]] name = "lock_api" -version = "0.4.12" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" +checksum = "28247cc5a5be2f05fbcd76dd0cf2c7d3b5400cb978a28042abcd4fa0b3f8261c" dependencies = [ - "autocfg", "scopeguard", ] [[package]] name = "log" -version = "0.4.22" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" +checksum = "4fabed175da42fed1fa0746b0ea71f412aa9d35e76e95e59b192c64b9dc2bf8b" +dependencies = [ + "cfg-if 0.1.10", +] + +[[package]] +name = "lru-cache" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31e24f1ad8321ca0e8a1e0ac13f23cb668e6f5466c2c57319f6a5cf1cc8e3b1c" +dependencies = [ + "linked-hash-map", +] + +[[package]] +name = "maplit" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" + +[[package]] +name = "match_cfg" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4" + +[[package]] +name = "matches" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" [[package]] name = "memchr" -version = "2.7.4" +version = "2.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" +checksum = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525" [[package]] name = "mime" -version = "0.3.17" +version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" +checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" [[package]] name = "mime_guess" -version = "2.0.5" +version = "2.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" +checksum = "2684d4c2e97d99848d30b324b00c8fcc7e5c897b7cbb5819b09e7c90e8baf212" dependencies = [ "mime", "unicase", @@ -1437,121 +1219,185 @@ dependencies = [ [[package]] name = "miniz_oxide" -version = "0.8.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ffbe83022cedc1d264172192511ae958937694cd57ce297164951b8b3568394" +checksum = "0f2d26ec3309788e423cfbf68ad1800f061638098d76a83681af979dc4eda19d" dependencies = [ - "adler2", + "adler", + "autocfg", ] [[package]] name = "mio" -version = "1.0.3" +version = "0.6.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" +checksum = "fce347092656428bc8eaf6201042cb551b8d67855af7374542a92a0fbfcac430" dependencies = [ + "cfg-if 0.1.10", + "fuchsia-zircon", + "fuchsia-zircon-sys", + "iovec", + "kernel32-sys", "libc", "log", - "wasi", - "windows-sys 0.52.0", + "miow", + "net2", + "slab", + "winapi 0.2.8", ] [[package]] -name = "num-conv" -version = "0.1.0" +name = "mio-uds" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" +checksum = "afcb699eb26d4332647cc848492bbc15eafb26f08d0304550d5aa1f612e066f0" +dependencies = [ + "iovec", + "libc", + "mio", +] + +[[package]] +name = "miow" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" +dependencies = [ + "kernel32-sys", + "net2", + "winapi 0.2.8", + "ws2_32-sys", +] + +[[package]] +name = "net2" +version = "0.2.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ebc3ec692ed7c9a255596c67808dee269f64655d8baf7b4f0638e51ba1d6853" +dependencies = [ + "cfg-if 0.1.10", + "libc", + "winapi 0.3.9", +] + +[[package]] +name = "nom" +version = "4.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ad2a91a8e869eeb30b9cb3119ae87773a8f4ae617f41b1eb9c154b2905f7bd6" +dependencies = [ + "memchr", + "version_check 0.1.5", +] + +[[package]] +name = "num-integer" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" +dependencies = [ + "autocfg", + "num-traits", +] [[package]] name = "num-traits" -version = "0.2.19" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" dependencies = [ "autocfg", ] [[package]] -name = "object" -version = "0.36.7" +name = "num_cpus" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" +checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" dependencies = [ - "memchr", + "hermit-abi", + "libc", ] [[package]] -name = "once_cell" -version = "1.20.2" +name = "object" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" +checksum = "8d3b63360ec3cb337817c2dbd47ab4a0f170d285d8e5a2064600f3def1402397" + +[[package]] +name = "once_cell" +version = "1.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af8b08b04175473088b46763e51ee54da5f9a164bc162f615b91bc179dbf15a3" [[package]] name = "opaque-debug" -version = "0.3.1" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" +checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" + +[[package]] +name = "opaque-debug" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "parking_lot" -version = "0.12.3" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" +checksum = "a4893845fa2ca272e647da5d0e46660a314ead9c2fdd9a883aabc32e481a8733" dependencies = [ + "instant", "lock_api", "parking_lot_core", ] [[package]] name = "parking_lot_core" -version = "0.9.10" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" +checksum = "c361aa727dd08437f2f1447be8b59a33b0edd15e0fcee698f935613d9efbca9b" dependencies = [ - "cfg-if", + "cfg-if 0.1.10", + "cloudabi", + "instant", "libc", "redox_syscall", "smallvec", - "windows-targets", + "winapi 0.3.9", ] [[package]] name = "parse-zoneinfo" -version = "0.3.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f2a05b18d44e2957b88f96ba460715e295bc1d7510468a2f3d3b44535d26c24" +checksum = "c705f256449c60da65e11ff6626e0c16a0a0b96aaa348de61376b249bc340f41" dependencies = [ "regex", ] -[[package]] -name = "paste" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" - [[package]] name = "percent-encoding" -version = "2.3.1" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" +checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" [[package]] name = "pest" -version = "2.7.15" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b7cafe60d6cf8e62e1b9b2ea516a089c008945bb5a275416789e7db0bc199dc" +checksum = "10f4872ae94d7b90ae48754df22fd42ad52ce740b8f370b03da4835417403e53" dependencies = [ - "memchr", - "thiserror", "ucd-trie", ] [[package]] name = "pest_derive" -version = "2.7.15" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "816518421cfc6887a0d62bf441b6ffb4536fcc926395a69e1a85852d4363f57e" +checksum = "833d1ae558dc601e9a60366421196a8d94bc0ac980476d0b67e1d0988d72b2d0" dependencies = [ "pest", "pest_generator", @@ -1559,71 +1405,73 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.15" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d1396fd3a870fc7838768d171b4616d5c91f6cc25e377b673d714567d99377b" +checksum = "99b8db626e31e5b81787b9783425769681b347011cc59471e33ea46d2ea0cf55" dependencies = [ "pest", "pest_meta", "proc-macro2", - "quote", - "syn", + "quote 1.0.7", + "syn 1.0.71", ] [[package]] name = "pest_meta" -version = "2.7.15" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1e58089ea25d717bfd31fb534e4f3afcc2cc569c70de3e239778991ea3b7dea" +checksum = "54be6e404f5317079812fc8f9f5279de376d8856929e21c184ecf6bbd692a11d" dependencies = [ - "once_cell", + "maplit", "pest", - "sha2", + "sha-1 0.8.2", ] [[package]] -name = "phf" -version = "0.11.2" +name = "pin-project" +version = "0.4.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" +checksum = "2ffbc8e94b38ea3d2d8ba92aea2983b503cd75d0888d75b86bb37970b5698e15" dependencies = [ - "phf_shared", + "pin-project-internal 0.4.27", ] [[package]] -name = "phf_codegen" -version = "0.11.2" +name = "pin-project" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8d39688d359e6b34654d328e262234662d16cc0f60ec8dcbe5e718709342a5a" +checksum = "ee41d838744f60d959d7074e3afb6b35c7456d0f61cad38a24e35e6553f73841" dependencies = [ - "phf_generator", - "phf_shared", + "pin-project-internal 1.0.1", ] [[package]] -name = "phf_generator" -version = "0.11.2" +name = "pin-project-internal" +version = "0.4.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" +checksum = "65ad2ae56b6abe3a1ee25f15ee605bacadb9a764edaba9c2bf4103800d4a1895" dependencies = [ - "phf_shared", - "rand", + "proc-macro2", + "quote 1.0.7", + "syn 1.0.71", ] [[package]] -name = "phf_shared" -version = "0.11.2" +name = "pin-project-internal" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" +checksum = "81a4ffa594b66bff340084d4081df649a7dc049ac8d7fc458d8e628bfbbb2f86" dependencies = [ - "siphasher", + "proc-macro2", + "quote 1.0.7", + "syn 1.0.71", ] [[package]] name = "pin-project-lite" -version = "0.2.15" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" +checksum = "c917123afa01924fc84bb20c4c03f004d9c38e5127e3c039bbf7f4b9c76a2f6b" [[package]] name = "pin-utils" @@ -1633,149 +1481,193 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" -version = "0.3.31" +version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" - -[[package]] -name = "polyval" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25" -dependencies = [ - "cfg-if", - "cpufeatures", - "opaque-debug", - "universal-hash", -] - -[[package]] -name = "powerfmt" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" +checksum = "3831453b3449ceb48b6d9c7ad7c96d5ea673e9b470a1dc578c2ce6521230884c" [[package]] name = "ppv-lite86" -version = "0.2.20" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" -dependencies = [ - "zerocopy", -] +checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" + +[[package]] +name = "proc-macro-hack" +version = "0.5.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" + +[[package]] +name = "proc-macro-nested" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eba180dafb9038b050a4c280019bbedf9f2467b61e5d892dcad585bb57aadc5a" [[package]] name = "proc-macro2" -version = "1.0.92" +version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" +checksum = "a152013215dca273577e18d2bf00fa862b89b24169fb78c4c95aeb07992c9cec" dependencies = [ - "unicode-ident", + "unicode-xid 0.2.1", ] [[package]] -name = "quote" -version = "1.0.38" +name = "quick-error" +version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc" +checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" + +[[package]] +name = "quote" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a6e920b65c65f10b2ae65c831a81a073a89edd28c7cce89475bff467ab4167a" + +[[package]] +name = "quote" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37" dependencies = [ "proc-macro2", ] [[package]] name = "rand" -version = "0.8.5" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +dependencies = [ + "getrandom 0.1.15", + "libc", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc 0.2.0", +] + +[[package]] +name = "rand" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ef9e7e66b4468674bfcb0c81af8b7fa0bb154fa9f28eb840da5c447baeb8d7e" dependencies = [ "libc", - "rand_chacha", - "rand_core", + "rand_chacha 0.3.0", + "rand_core 0.6.2", + "rand_hc 0.3.0", ] [[package]] name = "rand_chacha" -version = "0.3.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" dependencies = [ "ppv-lite86", - "rand_core", + "rand_core 0.5.1", +] + +[[package]] +name = "rand_chacha" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e12735cf05c9e10bf21534da50a147b924d555dc7a547c42e6bb2d5b6017ae0d" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.2", ] [[package]] name = "rand_core" -version = "0.6.4" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" dependencies = [ - "getrandom", + "getrandom 0.1.15", +] + +[[package]] +name = "rand_core" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34cf66eb183df1c5876e2dcf6b13d57340741e8dc255b48e40a26de954d06ae7" +dependencies = [ + "getrandom 0.2.2", +] + +[[package]] +name = "rand_hc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +dependencies = [ + "rand_core 0.5.1", +] + +[[package]] +name = "rand_hc" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3190ef7066a446f2e7f42e239d161e905420ccab01eb967c9eb27d21b2322a73" +dependencies = [ + "rand_core 0.6.2", ] [[package]] name = "redox_syscall" -version = "0.5.8" +version = "0.1.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834" -dependencies = [ - "bitflags", -] +checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" [[package]] name = "regex" -version = "1.11.1" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata", - "regex-syntax", -] - -[[package]] -name = "regex-automata" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" +checksum = "38cf2c13ed4745de91a5eb834e11c00bcc3709e773173b2ce4c56c9fbde04b9c" dependencies = [ "aho-corasick", "memchr", "regex-syntax", + "thread_local", ] -[[package]] -name = "regex-lite" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53a49587ad06b26609c52e423de037e7f57f20d53535d66e08c695f347df952a" - [[package]] name = "regex-syntax" -version = "0.8.5" +version = "0.6.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" +checksum = "3b181ba2dcf07aaccad5448e8ead58db5b742cf85dfe035e2227f137a539a189" + +[[package]] +name = "resolv-conf" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52e44394d2086d010551b14b53b1f24e31647570cd1deb0379e2c21b329aba00" +dependencies = [ + "hostname", + "quick-error", +] [[package]] name = "rustc-demangle" -version = "0.1.24" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" +checksum = "6e3bad0ee36814ca07d7968269dd4b7ec89ec2da10c4bb613928d3077083c232" [[package]] name = "rustc_version" -version = "0.4.1" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" dependencies = [ "semver", ] [[package]] name = "ryu" -version = "1.0.18" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" +checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" [[package]] name = "same-file" @@ -1788,53 +1680,61 @@ dependencies = [ [[package]] name = "scopeguard" -version = "1.2.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" +checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "semver" -version = "1.0.24" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cb6eb87a131f756572d7fb904f6e7b68633f09cca868c5df1c4b8d1a694bbba" +checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" +dependencies = [ + "semver-parser", +] + +[[package]] +name = "semver-parser" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.217" +version = "1.0.125" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70" +checksum = "558dc50e1a5a5fa7112ca2ce4effcb321b0300c0d4ccf0776a9f60cd89031171" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.217" +version = "1.0.125" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" +checksum = "b093b7a2bb58203b5da3056c05b4ec1fed827dcfdb37347a8841695263b3d06d" dependencies = [ "proc-macro2", - "quote", - "syn", + "quote 1.0.7", + "syn 1.0.71", ] [[package]] name = "serde_json" -version = "1.0.134" +version = "1.0.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d00f4175c42ee48b15416f6193a959ba3a0d67fc699a0db9ad12df9f83991c7d" +checksum = "dcac07dbffa1c65e7f816ab9eba78eb142c6d44410f4eeba1e26e4f5dfa56b95" dependencies = [ "itoa", - "memchr", "ryu", "serde", ] [[package]] name = "serde_urlencoded" -version = "0.7.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +checksum = "edfa57a7f8d9c1d260a549e7224100f6c43d43f9103e06dd8b4095a9b2b43ce9" dependencies = [ "form_urlencoded", "itoa", @@ -1842,135 +1742,173 @@ dependencies = [ "serde", ] +[[package]] +name = "sha-1" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7d94d0bede923b3cea61f3f1ff57ff8cdfd77b400fb8f9998949e0cf04163df" +dependencies = [ + "block-buffer 0.7.3", + "digest 0.8.1", + "fake-simd", + "opaque-debug 0.2.3", +] + +[[package]] +name = "sha-1" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce3cdf1b5e620a498ee6f2a171885ac7e22f0e12089ec4b3d22b84921792507c" +dependencies = [ + "block-buffer 0.9.0", + "cfg-if 1.0.0", + "cpuid-bool", + "digest 0.9.0", + "opaque-debug 0.3.0", +] + [[package]] name = "sha1" -version = "0.10.6" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" -dependencies = [ - "cfg-if", - "cpufeatures", - "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.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", -] - -[[package]] -name = "shlex" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" +checksum = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d" [[package]] name = "signal-hook-registry" -version = "1.4.2" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" +checksum = "ce32ea0c6c56d5eacaeb814fbed9960547021d3edd010ded1425f180536b20ab" dependencies = [ "libc", ] -[[package]] -name = "siphasher" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" - [[package]] name = "slab" -version = "0.4.9" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" -dependencies = [ - "autocfg", -] +checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" [[package]] name = "slug" -version = "0.1.6" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "882a80f72ee45de3cc9a5afeb2da0331d58df69e4e7d8eeb5d3c7784ae67e724" +checksum = "b3bc762e6a4b6c6fcaade73e77f9ebc6991b676f88bb2358bddb56560f073373" dependencies = [ "deunicode", - "wasm-bindgen", ] [[package]] name = "smallvec" -version = "1.13.2" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" +checksum = "fbee7696b84bbf3d89a1c2eccff0850e3047ed46bfcd2e92c29a2d074d57e252" [[package]] name = "socket2" -version = "0.5.8" +version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c970269d99b64e60ec3bd6ad27270092a5394c4e309314b18ae3fe575695fbe8" +checksum = "7fd8b795c389288baa5f355489c65e71fd48a02104600d15c4cfbc561e9e429d" dependencies = [ + "cfg-if 0.1.10", "libc", - "windows-sys 0.52.0", + "redox_syscall", + "winapi 0.3.9", ] [[package]] -name = "stable_deref_trait" -version = "1.2.0" +name = "standback" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" +checksum = "f4e0831040d2cf2bdfd51b844be71885783d489898a192f254ae25d57cce725c" +dependencies = [ + "version_check 0.9.2", +] [[package]] -name = "strsim" -version = "0.11.1" +name = "stdweb" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" +checksum = "d022496b16281348b52d0e30ae99e01a73d737b2f45d38fed4edf79f9325a1d5" +dependencies = [ + "discard", + "rustc_version", + "stdweb-derive", + "stdweb-internal-macros", + "stdweb-internal-runtime", + "wasm-bindgen", +] [[package]] -name = "subtle" -version = "2.6.1" +name = "stdweb-derive" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" +checksum = "c87a60a40fccc84bef0652345bbbbbe20a605bf5d0ce81719fc476f5c03b50ef" +dependencies = [ + "proc-macro2", + "quote 1.0.7", + "serde", + "serde_derive", + "syn 1.0.71", +] + +[[package]] +name = "stdweb-internal-macros" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58fa5ff6ad0d98d1ffa8cb115892b6e69d67799f6763e162a1c9db421dc22e11" +dependencies = [ + "base-x", + "proc-macro2", + "quote 1.0.7", + "serde", + "serde_derive", + "serde_json", + "sha1", + "syn 1.0.71", +] + +[[package]] +name = "stdweb-internal-runtime" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "213701ba3370744dcd1a12960caa4843b3d68b4d1c0a5d575e0d65b2ee9d16c0" [[package]] name = "syn" -version = "2.0.92" +version = "0.11.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ae51629bf965c5c098cc9e87908a3df5301051a9e087d6f9bef5c9771ed126" +checksum = "d3b891b9015c88c576343b9b3e41c2c11a51c219ef067b264bd9c8aa9b441dad" dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", + "quote 0.3.15", + "synom", + "unicode-xid 0.0.4", ] [[package]] -name = "synstructure" -version = "0.13.1" +name = "syn" +version = "1.0.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +checksum = "ad184cc9470f9117b2ac6817bfe297307418819ba40552f9b3846f05c33d5373" dependencies = [ "proc-macro2", - "quote", - "syn", + "quote 1.0.7", + "unicode-xid 0.2.1", +] + +[[package]] +name = "synom" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a393066ed9010ebaed60b9eafa373d4b1baac186dd7e008555b0f702b51945b6" +dependencies = [ + "unicode-xid 0.0.4", ] [[package]] name = "tera" -version = "1.20.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab9d851b45e865f178319da0abdbfe6acbc4328759ff18dafc3a41c16b4cd2ee" +checksum = "b64b021b8d3ab1f59ceae9e6cd1c26c8e7ce0322a9ebfff6c0e22b3b66938935" dependencies = [ "chrono", "chrono-tz", @@ -1980,7 +1918,7 @@ dependencies = [ "percent-encoding", "pest", "pest_derive", - "rand", + "rand 0.8.3", "regex", "serde", "serde_json", @@ -1989,102 +1927,157 @@ dependencies = [ ] [[package]] -name = "thiserror" -version = "2.0.9" +name = "termcolor" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f072643fd0190df67a8bab670c20ef5d8737177d6ac6b2e9a236cb096206b2cc" +checksum = "2dfed899f0eb03f32ee8c6a0aabdb8a7949659e3466561fc0adf54e26d88c5f4" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "thiserror" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e9ae34b84616eedaaf1e9dd6026dbe00dcafa92aa0c8077cb69df1fcfe5e53e" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "2.0.9" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b50fa271071aae2e6ee85f842e2e28ba8cd2c5fb67f11fcb1fd70b276f9e7d4" +checksum = "9ba20f23e85b10754cd195504aebf6a27e2e6cbe28c17778a0c930724628dd56" dependencies = [ "proc-macro2", - "quote", - "syn", + "quote 1.0.7", + "syn 1.0.71", +] + +[[package]] +name = "thread_local" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "threadpool" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d050e60b33d41c19108b32cea32164033a9013fe3b46cbd4457559bfbf77afaa" +dependencies = [ + "num_cpus", ] [[package]] name = "time" -version = "0.3.37" +version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35e7868883861bd0e56d9ac6efcaaca0d6d5d82a2a7ec8209ff492c07cf37b21" +checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" dependencies = [ - "deranged", - "itoa", - "num-conv", - "powerfmt", - "serde", - "time-core", - "time-macros", + "libc", + "wasi 0.10.0+wasi-snapshot-preview1", + "winapi 0.3.9", ] [[package]] -name = "time-core" -version = "0.1.2" +name = "time" +version = "0.2.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" +checksum = "55b7151c9065e80917fbf285d9a5d1432f60db41d170ccafc749a136b41a93af" +dependencies = [ + "const_fn", + "libc", + "standback", + "stdweb", + "time-macros", + "version_check 0.9.2", + "winapi 0.3.9", +] [[package]] name = "time-macros" -version = "0.2.19" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2834e6017e3e5e4b9834939793b282bc03b37a3336245fa820e35e233e2a85de" +checksum = "957e9c6e26f12cb6d0dd7fc776bb67a706312e7299aed74c8dd5b17ebb27e2f1" dependencies = [ - "num-conv", - "time-core", + "proc-macro-hack", + "time-macros-impl", ] [[package]] -name = "tinystr" -version = "0.7.6" +name = "time-macros-impl" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +checksum = "e5c3be1edfad6027c69f5491cf4cb310d1a71ecd6af742788c6ff8bced86b8fa" dependencies = [ - "displaydoc", - "zerovec", + "proc-macro-hack", + "proc-macro2", + "quote 1.0.7", + "standback", + "syn 1.0.71", ] +[[package]] +name = "tinyvec" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b78a366903f506d2ad52ca8dc552102ffdd3e937ba8a227f024dc1d1eae28575" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" + [[package]] name = "tokio" -version = "1.42.0" +version = "0.2.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cec9b21b0450273377fc97bd4c33a8acffc8c996c987a7c5b319a0083707551" +checksum = "a6d7ad61edd59bfcc7e80dababf0f4aed2e6d5e0ba1659356ae889752dfc12ff" dependencies = [ - "backtrace", "bytes", + "futures-core", + "iovec", + "lazy_static", "libc", + "memchr", "mio", - "parking_lot", + "mio-uds", "pin-project-lite", "signal-hook-registry", - "socket2", - "windows-sys 0.52.0", + "slab", + "winapi 0.3.9", ] [[package]] name = "tokio-util" -version = "0.7.13" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7fcaa8d55a2bdd6b83ace262b016eca0d79ee02818c5c1bcdf0305114081078" +checksum = "be8242891f2b6cbef26a2d7e8605133c2c554cd35b3e4948ea892d6d68436499" dependencies = [ "bytes", "futures-core", "futures-sink", + "log", "pin-project-lite", "tokio", ] [[package]] name = "tracing" -version = "0.1.41" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" +checksum = "b0987850db3733619253fe60e17cb59b82d37c7e6c0236bb81e4d6b87c879f27" dependencies = [ + "cfg-if 0.1.10", "log", "pin-project-lite", "tracing-core", @@ -2092,24 +2085,74 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.33" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" +checksum = "f50de3927f93d202783f4513cda820ab47ef17f624b03c096e86ef00c67e6b5f" dependencies = [ - "once_cell", + "lazy_static", +] + +[[package]] +name = "tracing-futures" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab7bb6f14721aa00656086e9335d363c5c8747bae02ebe32ea2c7dece5689b4c" +dependencies = [ + "pin-project 0.4.27", + "tracing", +] + +[[package]] +name = "trust-dns-proto" +version = "0.19.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53861fcb288a166aae4c508ae558ed18b53838db728d4d310aad08270a7d4c2b" +dependencies = [ + "async-trait", + "backtrace", + "enum-as-inner", + "futures", + "idna", + "lazy_static", + "log", + "rand 0.7.3", + "smallvec", + "thiserror", + "tokio", + "url", +] + +[[package]] +name = "trust-dns-resolver" +version = "0.19.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6759e8efc40465547b0dfce9500d733c65f969a4cbbfbe3ccf68daaa46ef179e" +dependencies = [ + "backtrace", + "cfg-if 0.1.10", + "futures", + "ipconfig", + "lazy_static", + "log", + "lru-cache", + "resolv-conf", + "smallvec", + "thiserror", + "tokio", + "trust-dns-proto", ] [[package]] name = "typenum" -version = "1.17.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" +checksum = "373c8a200f9e67a0c95e62a4f52fbf80c23b4381c05a17845531982fa99e6b33" [[package]] name = "ucd-trie" -version = "0.1.7" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" +checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c" [[package]] name = "unic-char-property" @@ -2163,383 +2206,262 @@ dependencies = [ [[package]] name = "unicase" -version = "2.8.1" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539" - -[[package]] -name = "unicode-ident" -version = "1.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" - -[[package]] -name = "unicode-xid" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" - -[[package]] -name = "universal-hash" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" +checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" dependencies = [ - "crypto-common", - "subtle", + "version_check 0.9.2", ] [[package]] -name = "url" -version = "2.5.4" +name = "unicode-bidi" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" +checksum = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" +dependencies = [ + "matches", +] + +[[package]] +name = "unicode-normalization" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7f98e67a4d84f730d343392f9bfff7d21e3fca562b9cb7a43b768350beeddc6" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unicode-segmentation" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db8716a166f290ff49dabc18b44aa407cb7c6dbe1aa0971b44b8a24b0ca35aae" + +[[package]] +name = "unicode-xid" +version = "0.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c1f860d7d29cf02cb2f3f359fd35991af3d30bac52c57d265a3c461074cb4dc" + +[[package]] +name = "unicode-xid" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564" + +[[package]] +name = "url" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5909f2b0817350449ed73e8bcd81c8c3c8d9a7a5d8acba4b27db277f1868976e" dependencies = [ "form_urlencoded", "idna", + "matches", "percent-encoding", ] -[[package]] -name = "utf16_iter" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" - -[[package]] -name = "utf8_iter" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" - -[[package]] -name = "utf8parse" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" - [[package]] name = "uuid" -version = "1.11.0" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" +checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" dependencies = [ "serde", - "sha1_smol", + "sha1", +] + +[[package]] +name = "v_escape" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "039a44473286eb84e4e74f90165feff67c802dbeced7ee4c5b00d719b0d0475e" +dependencies = [ + "buf-min", + "v_escape_derive", +] + +[[package]] +name = "v_escape_derive" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c860ad1273f4eee7006cee05db20c9e60e5d24cba024a32e1094aa8e574f3668" +dependencies = [ + "nom", + "proc-macro2", + "quote 1.0.7", + "syn 1.0.71", ] [[package]] name = "v_htmlescape" -version = "0.15.8" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e8257fbc510f0a46eb602c10215901938b5c2a7d5e70fc11483b1d3c9b5b18c" +checksum = "11d7c2a33ed7cf0dc1b42bcf39e01b6512f9df08f09e1cd8a49d9dc49a6a9482" +dependencies = [ + "cfg-if 1.0.0", + "v_escape", +] [[package]] name = "vcpkg" -version = "0.2.15" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" +checksum = "6454029bf181f092ad1b853286f23e2c507d8e8194d01d92da4a55c274a5508c" [[package]] name = "version_check" -version = "0.9.5" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" +checksum = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" + +[[package]] +name = "version_check" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed" [[package]] name = "walkdir" -version = "2.5.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +checksum = "777182bc735b6424e1a57516d35ed72cb8019d85c8c9bf536dccb3445c1a2f7d" dependencies = [ "same-file", + "winapi 0.3.9", "winapi-util", ] [[package]] name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" +version = "0.9.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" + +[[package]] +name = "wasi" +version = "0.10.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" [[package]] name = "wasm-bindgen" -version = "0.2.99" +version = "0.2.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a474f6281d1d70c17ae7aa6a613c87fce69a127e2624002df63dcb39d6cf6396" +checksum = "1ac64ead5ea5f05873d7c12b545865ca2b8d28adfc50a49b84770a3a97265d42" dependencies = [ - "cfg-if", - "once_cell", + "cfg-if 0.1.10", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.99" +version = "0.2.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f89bb38646b4f81674e8f5c3fb81b562be1fd936d84320f3264486418519c79" +checksum = "f22b422e2a757c35a73774860af8e112bff612ce6cb604224e8e47641a9e4f68" dependencies = [ "bumpalo", + "lazy_static", "log", "proc-macro2", - "quote", - "syn", + "quote 1.0.7", + "syn 1.0.71", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.99" +version = "0.2.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cc6181fd9a7492eef6fef1f33961e3695e4579b9872a6f7c83aee556666d4fe" +checksum = "6b13312a745c08c469f0b292dd2fcd6411dba5f7160f593da6ef69b64e407038" dependencies = [ - "quote", + "quote 1.0.7", "wasm-bindgen-macro-support", ] [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.99" +version = "0.2.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30d7a95b763d3c45903ed6c81f156801839e5ee968bb07e534c44df0fcd330c2" +checksum = "f249f06ef7ee334cc3b8ff031bfc11ec99d00f34d86da7498396dc1e3b1498fe" dependencies = [ "proc-macro2", - "quote", - "syn", + "quote 1.0.7", + "syn 1.0.71", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.99" +version = "0.2.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "943aab3fdaaa029a6e0271b35ea10b72b943135afe9bffca82384098ad0e06a6" +checksum = "1d649a3145108d7d3fbcde896a468d1bd636791823c9921135218ad89be08307" + +[[package]] +name = "widestring" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c168940144dd21fd8046987c16a46a33d5fc84eec29ef9dcddc2ac9e31526b7c" + +[[package]] +name = "winapi" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-build" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" + +[[package]] +name = "winapi-i686-pc-windows-gnu" +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 = "windows-core" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" -dependencies = [ - "windows-targets", -] - -[[package]] -name = "windows-sys" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" -dependencies = [ - "windows-targets", -] - -[[package]] -name = "windows-sys" -version = "0.59.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" -dependencies = [ - "windows-targets", -] - -[[package]] -name = "windows-targets" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" -dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_gnullvm", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", -] - -[[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.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" - -[[package]] -name = "windows_i686_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" - -[[package]] -name = "windows_i686_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" - -[[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.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" - -[[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.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" - -[[package]] -name = "write16" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" - -[[package]] -name = "writeable" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" - -[[package]] -name = "yoke" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" -dependencies = [ - "serde", - "stable_deref_trait", - "yoke-derive", - "zerofrom", -] - -[[package]] -name = "yoke-derive" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "synstructure", -] - -[[package]] -name = "zerocopy" -version = "0.7.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" -dependencies = [ - "byteorder", - "zerocopy-derive", -] - -[[package]] -name = "zerocopy-derive" -version = "0.7.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "zerofrom" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e" +checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" dependencies = [ - "zerofrom-derive", + "winapi 0.3.9", ] [[package]] -name = "zerofrom-derive" -version = "0.1.5" +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "winreg" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2986deb581c4fe11b621998a5e53361efe6b48a151178d0cd9eeffa4dc6acc9" dependencies = [ - "proc-macro2", - "quote", - "syn", - "synstructure", + "winapi 0.3.9", ] [[package]] -name = "zerovec" -version = "0.10.4" +name = "ws2_32-sys" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +checksum = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" dependencies = [ - "yoke", - "zerofrom", - "zerovec-derive", -] - -[[package]] -name = "zerovec-derive" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "zstd" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcf2b778a664581e31e389454a7072dab1647606d44f7feea22cd5abb9c9f3f9" -dependencies = [ - "zstd-safe", -] - -[[package]] -name = "zstd-safe" -version = "7.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54a3ab4db68cea366acc5c897c7b4d4d1b8994a9cd6e6f841f8964566a419059" -dependencies = [ - "zstd-sys", -] - -[[package]] -name = "zstd-sys" -version = "2.0.13+zstd.1.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38ff0f21cfee8f97d94cef41359e0c89aa6113028ab0291aa8ca0038995a95aa" -dependencies = [ - "cc", - "pkg-config", + "winapi 0.2.8", + "winapi-build", ] diff --git a/site/Cargo.toml b/site/Cargo.toml index 87c629e..35dd93d 100644 --- a/site/Cargo.toml +++ b/site/Cargo.toml @@ -1,29 +1,27 @@ [package] name = "crablog" -version = "0.4.0" -authors = ["mtrx "] -edition = "2021" +version = "0.3.1" +authors = ["Leonard Lorenz "] +edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -chrono = { version = "0.4", features = ["serde"] } -actix-web = "4.5.1" -actix-files = "0.6.5" +chrono = { version = "*", features = ["serde"] } +actix-web = "3.3.2" +actix-files = "0.4.0" -serde = { version = "1.0.201", features = ["derive"] } +serde = { version = "1.0.125", features = ["derive"] } serde_json = "*" serde_derive = "*" -diesel = { version = "2.1.0", default-features = false, features = ["sqlite", "chrono"] } -dotenvy = "0.15" +diesel = { version = "1.4.6", default-features = false, features = ["sqlite", "chrono"] } +diesel_codegen = { version = "0.16.1", default-features = false } -uuid = { version = "1.8.0", features = ["serde", "v5"] } +uuid = { version = "0.8.2", features = ["serde", "v5"] } -tera = "1.18.1" +tera = "1.8.0" once_cell = "1.7.2" -env_logger = "0.11.3" -actix-identity = "0.8.0" -actix-session = {version = "0.10.1", default-features = false, features = ["cookie-session"]} +env_logger = "0.8.3" diff --git a/site/content/templates/about.html b/site/content/templates/about.html deleted file mode 100644 index 6e6ec58..0000000 --- a/site/content/templates/about.html +++ /dev/null @@ -1,47 +0,0 @@ -{% extends "base.html" %} - -{% block head %} -{{ super() }} -Submit post - -{% endblock head %} - -{% block content %} -

Hi, I'm {{ username }}

-

- Back to the blog -

-

- This is my blog. - - {% if email %} - If you have questions or input for me please send me an E-Mail to {{ email }} - {% endif %} -

-
-

-

-

-{% endblock content %} \ No newline at end of file diff --git a/site/content/templates/article.html.macro b/site/content/templates/article.html.macro deleted file mode 100644 index bd24fe7..0000000 --- a/site/content/templates/article.html.macro +++ /dev/null @@ -1,11 +0,0 @@ -{% macro article(id, title, body, publish_date) %} -
-
- -

{{ title }}

-
- {{ publish_date | date(format="%Y-%m-%d at %H:%M") }} -

{{ body }}

-
-
-{% endmacro article %} \ No newline at end of file diff --git a/site/content/templates/base.html b/site/content/templates/base.html deleted file mode 100644 index 8217b2e..0000000 --- a/site/content/templates/base.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - {% block head %} - - - - - - {% endblock head %} - - - -
- {% block content %} - {% endblock content %} -
- - - \ No newline at end of file diff --git a/site/content/templates/blog-all-posts.html b/site/content/templates/blog-all-posts.html deleted file mode 100644 index b40a86a..0000000 --- a/site/content/templates/blog-all-posts.html +++ /dev/null @@ -1,25 +0,0 @@ -{% extends "base.html" %} -{% import "article.html.macro" as article_macro %} - -{% block head %} -{{ super() }} - - - - All posts -{% endblock head %} - - -{% block content %} -

{{ username }} blog

-

- About - Last 5 posts -

-
    - {% for post in posts %} - {{ article_macro::article(id=post.id,title=post.title,body=post.body,publish_date=post.publish_date) }} - {% endfor %} -
- -{% endblock content %} \ No newline at end of file diff --git a/site/content/templates/blog-by-id.html b/site/content/templates/blog-by-id.html deleted file mode 100644 index d4bcd8a..0000000 --- a/site/content/templates/blog-by-id.html +++ /dev/null @@ -1,21 +0,0 @@ -{% extends "base.html" %} -{% import "article.html.macro" as article_macro %} - -{% block head %} -{{ super() }} - - - {{ post.title }} | {{ username }}' blog -{% endblock head %} - -{% block content %} -

{{ username }} blog

- - -{{ article_macro::article(id=post.id,title=post.title,body=post.body,publish_date=post.publish_date) }} - -{% endblock content %} \ No newline at end of file diff --git a/site/content/templates/blog.html b/site/content/templates/blog.html deleted file mode 100644 index 3153265..0000000 --- a/site/content/templates/blog.html +++ /dev/null @@ -1,22 +0,0 @@ -{% extends "base.html" %} -{% import "article.html.macro" as article_macro %} - -{% block head %} -{{ super() }} - - - {{ username }} blog -{% endblock head %} - -{% block content %} -

{{ username }} blog

-

- About - All Posts -

-
    - {% for post in posts %} - {{ article_macro::article(id=post.id,title=post.title,body=post.body,publish_date=post.publish_date) }} - {% endfor %} -
-{% endblock content %} \ No newline at end of file diff --git a/site/content/templates/edit-form.html b/site/content/templates/edit-form.html deleted file mode 100644 index 5952609..0000000 --- a/site/content/templates/edit-form.html +++ /dev/null @@ -1,33 +0,0 @@ -{% extends "base.html" %} - -{% block head %} -{{ super() }} -Edit '{{ post.title }}' - -{% endblock head %} - -{% block content %} -

{{ username }} blog

-
- -
- -
- - -
- - -
- -
- -
- - -
-
- - -
-{% endblock content %} \ No newline at end of file diff --git a/site/content/templates/edit.html b/site/content/templates/edit.html deleted file mode 100644 index ba11447..0000000 --- a/site/content/templates/edit.html +++ /dev/null @@ -1,17 +0,0 @@ -{% extends "base.html" %} - -{% block head %} -{{ super() }} - -Edit posts... -{% endblock head %} - -{% block content %} -

{{ username }} blog

-

Edit posts

- -{% endblock content %} \ No newline at end of file diff --git a/site/content/templates/submit.html b/site/content/templates/submit.html deleted file mode 100644 index 599d7da..0000000 --- a/site/content/templates/submit.html +++ /dev/null @@ -1,26 +0,0 @@ -{% extends "base.html" %} - -{% block head %} -{{ super() }} -Submit post - -{% endblock head %} - - -{% block content %} -
- - -
- - -
-
-
- - -
- -
-
-{% endblock content %} \ No newline at end of file diff --git a/site/migrations/.gitkeep b/site/migrations/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/site/src/api.rs b/site/src/api.rs index a0dcdee..cb03b02 100644 --- a/site/src/api.rs +++ b/site/src/api.rs @@ -1,44 +1,24 @@ -use crate::config::CONFIG; use crate::db::*; use crate::routes::{id_valid, replace_newlines}; -use actix_identity::Identity; use actix_web::{get, http::StatusCode, post, web, web::Form, HttpResponse, Responder}; -use actix_web::{HttpMessage, HttpRequest}; +use serde::Deserialize; +use super::CONFIG_MAP; -use crate::form_data::NewPostForm; -use crate::form_data::{BlogActionForm, LoginForm}; - -#[get("/")] -async fn index(user: Option) -> impl Responder { - if let Some(user) = user { - format!("Welcome! {}", user.id().unwrap()) - } else { - "Welcome Anonymous!".to_owned() - } +#[derive(Deserialize)] +struct NewPostForm { + title: String, + body: String, + token: String, } -#[post("/login")] -async fn blog_login(form: Form, req: HttpRequest) -> impl Responder { - let submitted_login_token = form.login_token.clone(); - if submitted_login_token == CONFIG.login_token { - // attach a verified user identity to the active session - Identity::login(&req.extensions(), "default_user".into()).unwrap(); - - HttpResponse::Ok() - } else { - HttpResponse::Unauthorized() - } -} - -#[post("/logout")] -async fn blog_logout(user: Identity) -> impl Responder { - user.logout(); - HttpResponse::Ok() +#[derive(Deserialize)] +struct BlogActionForm { + token: String, } #[post("/api/blog/create")] async fn blog_create_post(form: Form) -> impl Responder { - if CONFIG.submit_token == form.token { + if *CONFIG_MAP.read().unwrap().get("SUBMIT_TOKEN").unwrap() == form.token { create_post(&form.title.as_str(), replace_newlines(&form.body).as_str()); println!("New blog post created."); } else { @@ -46,14 +26,17 @@ async fn blog_create_post(form: Form) -> impl Responder { } HttpResponse::MovedPermanently() - .insert_header(("LOCATION", "/")) + .set_header("LOCATION", "/blog") .finish() } #[post("/api/blog/posts/edit/{post_id}")] -async fn blog_edit_post(post_id: web::Path, form: Form) -> impl Responder { - let (valid, id) = id_valid(post_id.into_inner()); - if valid && CONFIG.submit_token == form.token { +async fn blog_edit_post( + web::Path(post_id): web::Path, + form: Form, +) -> impl Responder { + let (valid, id) = id_valid(post_id); + if valid && *CONFIG_MAP.read().unwrap().get("SUBMIT_TOKEN").unwrap() == form.token { edit_post_by_id( id as i32, &form.title.as_str(), @@ -66,15 +49,17 @@ async fn blog_edit_post(post_id: web::Path, form: Form) -> } return HttpResponse::MovedPermanently() - .insert_header(("LOCATION", "/")) + .set_header("LOCATION", "/blog") .finish(); } #[post("/api/blog/posts/delete/{post_id}")] -async fn blog_delete_post(post_id: web::Path) -> impl Responder { - let (valid, id) = id_valid(post_id.into_inner()); - // TODO - if valid && AUTHENTICATED { +async fn blog_delete_post( + web::Path(post_id): web::Path, + form: Form, +) -> impl Responder { + let (valid, id) = id_valid(post_id); + if valid && *CONFIG_MAP.read().unwrap().get("SUBMIT_TOKEN").unwrap() == form.token { println!("Deleted post: {}", id); delete_post_by_id(id as i32); } else { @@ -83,14 +68,17 @@ async fn blog_delete_post(post_id: web::Path) -> impl Responder { } return HttpResponse::MovedPermanently() - .insert_header(("LOCATION", "/")) + .set_header("LOCATION", "/blog") .finish(); } #[post("/api/blog/posts/hide/{post_id}")] -async fn blog_hide_post(post_id: web::Path, form: Form) -> impl Responder { - let (valid, id) = id_valid(post_id.into_inner()); - if valid && CONFIG.submit_token == form.token { +async fn blog_hide_post( + web::Path(post_id): web::Path, + form: Form, +) -> impl Responder { + let (valid, id) = id_valid(post_id); + if valid && *CONFIG_MAP.read().unwrap().get("SUBMIT_TOKEN").unwrap() == form.token { println!("Hid post: {}", id); hide_post_by_id(id as i32); } else { @@ -99,15 +87,12 @@ async fn blog_hide_post(post_id: web::Path, form: Form) } return HttpResponse::MovedPermanently() - .insert_header(("LOCATION", "/")) + .set_header("LOCATION", "/blog") .finish(); } #[get("/api/blog/posts")] -async fn get_posts_json(user: Option) -> impl Responder { - if let Some(user) = user { - let posts = get_all_posts(); - HttpResponse::Ok().json(posts) - } - return HttpResponse::new(StatusCode::UNAUTHORIZED); +async fn blog_get_posts_json() -> impl Responder { + let posts = get_all_posts(); + HttpResponse::Ok().json(posts) } diff --git a/site/src/config.rs b/site/src/config.rs deleted file mode 100644 index ac7bb1b..0000000 --- a/site/src/config.rs +++ /dev/null @@ -1,85 +0,0 @@ -use dotenvy::dotenv; -use once_cell::sync::Lazy; - -pub const ENV_PREFIX: &str = "CL_"; - -pub struct Config { - pub login_token: String, - pub session_secret: String, - pub root_path: String, - pub username: String, - pub bind_port: String, - pub accounts: Accounts, -} - -pub struct Accounts { - pub email: Option, - pub github: Option, - pub twitter: Option, - pub mastodon: Option, - pub discord: Option, - pub reddit: Option, -} - -fn load_config() -> Config { - dotenv().expect(".env file not found"); - - // return config value or panic if not set - fn eval_required_conf(variable_name: String) -> String { - match std::env::var(variable_name.clone()) { - Ok(value) => { - println!("{}: {}", variable_name, value); - return value; - } - Err(_) => { - panic!("{} not set!", variable_name) - } - } - } - - // return optional value - fn eval_optional_conf(variable_name: String, default_value: Option<&str>) -> Option { - match std::env::var(variable_name.clone()) { - Ok(value) => { - println!("{}: {}", variable_name, value); - return Some(value); - } - Err(_) => match default_value { - Some(val) => { - println!("Variable {variable_name} not set. Using default value: {val}."); - return Some(String::from(val)); - } - None => { - println!("Variable {variable_name} not set. No default, leaving this empty."); - None - } - }, - } - } - - fn eval_conf_var(name: &str, required_var: bool, default: Option<&str>) -> Option { - if required_var { - Some(eval_required_conf(format!("{ENV_PREFIX}{name}"))) - } else { - eval_optional_conf(format!("{ENV_PREFIX}{name}"), default) - } - } - - Config { - login_token: eval_conf_var("SUBMIT_TOKEN", true, None).unwrap(), - session_secret: eval_conf_var("SESSION_SECRET", true, None).unwrap(), - root_path: eval_conf_var("ROOT_PATH", false, Some("./content")).unwrap(), - username: eval_conf_var("USERNAME", true, None).unwrap(), - bind_port: eval_conf_var("BIND_PORT", false, Some("8000")).unwrap(), - accounts: Accounts { - email: eval_conf_var("EMAIL", false, None), - github: eval_conf_var("GITHUB_ACCOUNT", false, None), - discord: eval_conf_var("DISCORD_ACCOUNT", false, None), - twitter: eval_conf_var("TWITTER_ACCOUNT", false, None), - mastodon: eval_conf_var("MASTODON_ACCOUNT", false, None), - reddit: eval_conf_var("REDDIT_ACCOUNT", false, None), - }, - } -} - -pub static CONFIG: Lazy = Lazy::new(|| load_config()); diff --git a/site/src/db.rs b/site/src/db.rs index 02e41ec..a6484a7 100644 --- a/site/src/db.rs +++ b/site/src/db.rs @@ -4,12 +4,11 @@ mod schema; use diesel::prelude::*; use diesel::sqlite::SqliteConnection; use models::*; - -use crate::config::CONFIG; +use std::env; /// Returns an SqliteConnection if connection successful. fn establish_connection() -> SqliteConnection { - let db_path = CONFIG.root_path.clone() + "/db.sqlite3"; + let db_path = env::var("ROOT_PATH").unwrap() + "/db.sqlite3"; SqliteConnection::establish(&db_path) .unwrap_or_else(|_| panic!("Error, connection to {} failed.", &db_path)) } @@ -17,33 +16,33 @@ fn establish_connection() -> SqliteConnection { /// Returns all posts pub fn get_all_posts() -> std::vec::Vec { use schema::posts::dsl::*; - let mut connection = establish_connection(); + let connection = establish_connection(); posts .filter(published.eq(true)) .order(id.desc()) - .load::(&mut connection) + .load::(&connection) .expect("Error, couldn't load posts.") } /// Returns the last five posts. pub fn get_last_five_posts() -> std::vec::Vec { use schema::posts::dsl::*; - let mut connection = establish_connection(); + let connection = establish_connection(); posts .filter(published.eq(true)) .order(id.desc()) .limit(5) - .load::(&mut connection) + .load::(&connection) .expect("Error, couldn't load posts.") } /// Returns the post with the given ID. pub fn get_post_by_id(post_id: i32) -> Post { use schema::posts::dsl::*; - let mut connection = establish_connection(); + let connection = establish_connection(); posts .find(post_id) - .get_result(&mut connection) + .get_result(&connection) .expect("Error, couldn't find post.") } @@ -52,7 +51,7 @@ pub fn create_post(title: &str, body: &str) { use chrono::prelude::*; use schema::posts; - let mut connection = establish_connection(); + let connection = establish_connection(); let new_post = NewPost { title, @@ -63,40 +62,40 @@ pub fn create_post(title: &str, body: &str) { diesel::insert_into(posts::table) .values(&new_post) - .execute(&mut connection) + .execute(&connection) .unwrap_or_else(|_| panic!("Error, couldn't insert new Post.")); } /// Updates a post with the new title and body. pub fn edit_post_by_id(post_id: i32, new_title: &str, new_body: &str) { use schema::posts::dsl::*; - let mut connection = establish_connection(); + let connection = establish_connection(); diesel::update(posts) .filter(id.eq(post_id)) .set((title.eq(new_title), body.eq(new_body))) - .execute(&mut connection) + .execute(&connection) .expect("Error, couldn't update post."); } /// Deletes a post by id. pub fn delete_post_by_id(post_id: i32) { use schema::posts::dsl::*; - let mut connection = establish_connection(); + let connection = establish_connection(); diesel::delete(posts.filter(id.eq(post_id))) - .execute(&mut connection) + .execute(&connection) .expect("Error, couldn't update post."); } /// Sets the published bool of a post to false. pub fn hide_post_by_id(post_id: i32) { use schema::posts::dsl::*; - let mut connection = establish_connection(); + let connection = establish_connection(); diesel::update(posts) .filter(id.eq(post_id)) .set(published.eq(false)) - .execute(&mut connection) + .execute(&connection) .expect("Error, couldn't update post."); } diff --git a/site/src/db/models.rs b/site/src/db/models.rs index 94d518c..ae5bbf0 100644 --- a/site/src/db/models.rs +++ b/site/src/db/models.rs @@ -1,7 +1,6 @@ -use crate::db::schema::posts; +use super::schema::posts; use serde::{Deserialize, Serialize}; - #[derive(Queryable, Serialize, Deserialize)] pub struct Post { pub id: i32, @@ -12,7 +11,7 @@ pub struct Post { } #[derive(Insertable)] -#[diesel(table_name = posts)] +#[table_name = "posts"] pub struct NewPost<'a> { pub title: &'a str, pub body: &'a str, diff --git a/site/src/form_data.rs b/site/src/form_data.rs deleted file mode 100644 index f142207..0000000 --- a/site/src/form_data.rs +++ /dev/null @@ -1,15 +0,0 @@ -use serde::Deserialize; - -#[derive(Deserialize)] -pub struct LoginForm { - pub login_token: String, -} - -#[derive(Deserialize)] -pub struct NewPostForm { - title: String, - body: String, -} - -#[derive(Deserialize)] -pub struct BlogActionForm {} diff --git a/site/src/main.rs b/site/src/main.rs index 1c0d65c..ad7d5a1 100644 --- a/site/src/main.rs +++ b/site/src/main.rs @@ -1,7 +1,5 @@ mod api; -mod config; mod db; -mod form_data; mod routes; #[macro_use] @@ -11,33 +9,88 @@ extern crate serde_derive; extern crate tera; use actix_files as fs; -use actix_identity::IdentityMiddleware; -use actix_session::{storage::CookieSessionStore, SessionMiddleware}; -use actix_web::cookie::Key; -use actix_web::{middleware::Logger, web::Data, App, HttpServer}; -use config::CONFIG; +use actix_web::{middleware::Logger, App, HttpServer}; use env_logger::Env; use once_cell::sync::Lazy; +use std::{collections::HashMap, env, sync::RwLock}; use tera::Tera; -static SESSION_COOKIE_SECRET_KEY: Lazy = Lazy::new(|| Key::generate()); +pub static CONFIG_MAP: Lazy>> = Lazy::new(|| { + let mut config: HashMap = HashMap::new(); + + let required_env_vars = [ + "SUBMIT_TOKEN", + "ROOT_PATH", + "USERNAME", + "EMAIL", + "BIND_PORT", + ]; + + let optional_env_vars = [ + "GITHUB_ACCOUNT", + "TWITTER_ACCOUNT", + "MASTODON_ACCOUNT", + "DISCORD_ACCOUNT", + "REDDIT_ACCOUNT", + ]; + + // Test if variable is set. If not, panic. + let mut insert_required_env = |env: &str| { + let env_string = String::from(env); + config.insert( + env_string.clone(), // env var name + env::var(env_string).expect(format!("`{}` variable not set.", env).as_str()), // env var content + ) + }; + + for var in required_env_vars.iter() { + insert_required_env(var); + } + + // Test if variable is set. If it is insert into config. + let mut insert_optional_env = |env: &str| { + if let Ok(var_content) = env::var(String::from(env)) { + config.insert(String::from(env), var_content.clone()); + } + }; + + for var in optional_env_vars.iter() { + insert_optional_env(var); + } + + // Print some info about the current configuration + println!("Submit token = `{}`", config.get("SUBMIT_TOKEN").unwrap()); + println!( + "Current working directory = `{}`", + env::current_dir().unwrap().to_str().unwrap() + ); + println!("Root path = `{}`", config.get("ROOT_PATH").unwrap()); + println!( + "Template path = `{}/templates/*`", + config.get("ROOT_PATH").unwrap() + ); + println!("Launching on 0.0.0.0:{}", config.get("BIND_PORT").unwrap()); + RwLock::new(config) +}); #[actix_web::main] async fn main() -> std::io::Result<()> { - HttpServer::new(move || { - let mut tera = - Tera::new(format!("{}{}", CONFIG.root_path, "/templates/*").as_str()).unwrap(); + HttpServer::new(|| { + let mut tera = Tera::new( + format!( + "{}{}", + CONFIG_MAP.read().unwrap().get("ROOT_PATH").unwrap(), + "/templates/*" + ) + .as_str(), + ) + .unwrap(); tera.autoescape_on(vec![".sql"]); - env_logger::Builder::from_env(Env::default().default_filter_or("debug")); + env_logger::Builder::from_env(Env::default().default_filter_or("info")); App::new() - .wrap(IdentityMiddleware::default()) - .wrap(SessionMiddleware::new( - CookieSessionStore::default(), - SESSION_COOKIE_SECRET_KEY.clone(), - )) - .app_data(Data::new(tera)) + .data(tera) .service(routes::about) .service(routes::blog) .service(routes::blog_all) @@ -45,7 +98,6 @@ async fn main() -> std::io::Result<()> { .service(routes::blog_submit) .service(routes::blog_edit) .service(routes::blog_edit_by_id) - .service(api::blog_login) .service(api::blog_get_posts_json) .service(api::blog_create_post) .service(api::blog_edit_post) @@ -53,11 +105,18 @@ async fn main() -> std::io::Result<()> { .service(api::blog_delete_post) .service(fs::Files::new( "/static", - format!("{}{}", CONFIG.root_path, "/static"), + format!( + "{}{}", + CONFIG_MAP.read().unwrap().get("ROOT_PATH").unwrap(), + "/static" + ), )) .wrap(Logger::new("%a %r %t")) }) - .bind(format!("0.0.0.0:{}", CONFIG.bind_port))? + .bind(format!( + "0.0.0.0:{}", + CONFIG_MAP.read().unwrap().get("BIND_PORT").unwrap() + ))? .run() .await } diff --git a/site/src/routes.rs b/site/src/routes.rs index 15c0071..aadc38f 100644 --- a/site/src/routes.rs +++ b/site/src/routes.rs @@ -1,6 +1,6 @@ use crate::db; -use super::CONFIG; +use super::CONFIG_MAP; use actix_web::{error, get, http::StatusCode, web, Error, HttpResponse}; use tera::Context; @@ -36,36 +36,30 @@ pub fn replace_br_tags(x: &str) -> String { #[get("/about")] async fn about(tmpl: web::Data) -> Result { let mut context = Context::new(); - context.insert("username", &CONFIG.username); - match &CONFIG.accounts.email { - Some(acc) => context.insert("email", &acc.replace("@", " (at) ")), - None => (), + context.insert( + "username", + CONFIG_MAP.read().unwrap().get("USERNAME").unwrap(), + ); + context.insert("email", CONFIG_MAP.read().unwrap().get("EMAIL").unwrap()); + if let Some(acc) = CONFIG_MAP.read().unwrap().get("GITHUB_ACCOUNT") { + context.insert("github_account", acc); + } + if let Some(acc) = CONFIG_MAP.read().unwrap().get("TWITTER_ACCOUNT") { + context.insert("twitter_account", acc); + } + if let Some(acc) = CONFIG_MAP.read().unwrap().get("MASTODON_ACCOUNT") { + context.insert("mastodon_account", acc); + } + if let Some(acc) = CONFIG_MAP.read().unwrap().get("DISCORD_ACCOUNT") { + context.insert("discord_account", acc); + } + if let Some(acc) = CONFIG_MAP.read().unwrap().get("REDDIT_ACCOUNT") { + context.insert("reddit_account", acc); } - match &CONFIG.accounts.github { - Some(acc) => context.insert("github_account", &acc), - None => (), - }; - match &CONFIG.accounts.twitter { - Some(acc) => context.insert("twitter_account", &acc), - None => (), - }; - match &CONFIG.accounts.mastodon { - Some(acc) => context.insert("mastodon_account", &acc), - None => (), - }; - match &CONFIG.accounts.reddit { - Some(acc) => context.insert("reddit_account", &acc), - None => (), - }; - match &CONFIG.accounts.discord { - Some(acc) => context.insert("discord_account", &acc), - None => (), - }; let result = tmpl .render("about.html", &context) - .map_err(|err| error::ErrorInternalServerError(err)) - .unwrap(); + .map_err(|e| error::ErrorInternalServerError(format!("Template error\n{}", e)))?; Ok(HttpResponse::Ok().content_type("text/html").body(result)) } @@ -76,12 +70,14 @@ async fn blog(tmpl: web::Data) -> Result { let mut context = Context::new(); context.insert("posts", &posts); - context.insert("username", &CONFIG.username); + context.insert( + "username", + CONFIG_MAP.read().unwrap().get("USERNAME").unwrap(), + ); let result = tmpl .render("blog.html", &context) - .map_err(|err| error::ErrorInternalServerError(err)) - .unwrap(); + .map_err(|_| error::ErrorInternalServerError("Template error"))?; Ok(HttpResponse::Ok().content_type("text/html").body(result)) } @@ -92,12 +88,14 @@ async fn blog_all(tmpl: web::Data) -> Result { let mut context = Context::new(); context.insert("posts", &posts); - context.insert("username", &CONFIG.username); + context.insert( + "username", + CONFIG_MAP.read().unwrap().get("USERNAME").unwrap(), + ); let result = tmpl .render("blog-all-posts.html", &context) - .map_err(|err| error::ErrorInternalServerError(err)) - .unwrap(); + .map_err(|_| error::ErrorInternalServerError("Template error"))?; Ok(HttpResponse::Ok().content_type("text/html").body(result)) } @@ -105,9 +103,9 @@ async fn blog_all(tmpl: web::Data) -> Result { #[get("/id/{post_id}")] async fn blog_by_id( tmpl: web::Data, - post_id: web::Path, // web::Path(post_id): web::Path, + web::Path(post_id): web::Path, ) -> Result { - let (valid, id) = id_valid(post_id.into_inner()); + let (valid, id) = id_valid(post_id); if valid { let post = db::get_post_by_id(id as i32); @@ -116,13 +114,15 @@ async fn blog_by_id( } let mut context = Context::new(); - context.insert("username", &CONFIG.username); context.insert("post", &post); + context.insert( + "username", + CONFIG_MAP.read().unwrap().get("USERNAME").unwrap(), + ); let result = tmpl .render("blog-by-id.html", &context) - .map_err(|err| error::ErrorInternalServerError(err)) - .unwrap(); + .map_err(|_| error::ErrorInternalServerError("Template error"))?; return Ok(HttpResponse::Ok().content_type("text/html").body(result)); } else { @@ -138,8 +138,7 @@ async fn blog_submit(tmpl: web::Data) -> Result let result = tmpl .render("submit.html", &context) - .map_err(|err| error::ErrorInternalServerError(err)) - .unwrap(); + .map_err(|_| error::ErrorInternalServerError("Template error"))?; return Ok(HttpResponse::Ok().content_type("text/html").body(result)); } @@ -148,12 +147,14 @@ async fn blog_submit(tmpl: web::Data) -> Result async fn blog_edit(tmpl: web::Data) -> Result { let mut context = Context::new(); context.insert("posts", &db::get_all_posts()); - context.insert("username", &CONFIG.username); + context.insert( + "username", + CONFIG_MAP.read().unwrap().get("USERNAME").unwrap(), + ); let result = tmpl .render("edit.html", &context) - .map_err(|err| error::ErrorInternalServerError(err)) - .unwrap(); + .map_err(|_| error::ErrorInternalServerError("Template error"))?; Ok(HttpResponse::Ok().content_type("text/html").body(result)) } @@ -161,9 +162,9 @@ async fn blog_edit(tmpl: web::Data) -> Result { #[get("/edit/{post_id}")] async fn blog_edit_by_id( tmpl: web::Data, - post_id: web::Path, + web::Path(post_id): web::Path, ) -> Result { - let (valid, id) = id_valid(post_id.into_inner()); + let (valid, id) = id_valid(post_id); if valid { let mut post = db::get_post_by_id(id as i32); @@ -171,13 +172,13 @@ async fn blog_edit_by_id( post.body = replace_br_tags(&post.body); let mut context = Context::new(); - context.insert("username", &CONFIG.username); - context.insert("post", &post); + context.insert("title", &post.title); + context.insert("body", &post.body); + context.insert("id", &id); let result = tmpl .render("edit-form.html", &context) - .map_err(|err| error::ErrorInternalServerError(err)) - .unwrap(); + .map_err(|_| error::ErrorInternalServerError("Template error"))?; Ok(HttpResponse::Ok().content_type("text/html").body(result)) } else { diff --git a/site/src/schema.rs b/site/src/schema.rs new file mode 100644 index 0000000..22b279e --- /dev/null +++ b/site/src/schema.rs @@ -0,0 +1,9 @@ +table! { + posts (id) { + id -> Nullable, + title -> Text, + body -> Text, + published -> Bool, + publish_date -> Timestamp, + } +}