From 076d30924db8748881e329bbdebfacc4958ad446 Mon Sep 17 00:00:00 2001 From: daimond113 <72147841+daimond113@users.noreply.github.com> Date: Fri, 24 May 2024 00:16:19 +0200 Subject: [PATCH] feat: :tada: rewrite biasdo --- .dockerignore | 15 + .github/workflows/check-and-lint.yaml | 26 + .gitignore | 11 +- .../client/.prettierignore => .prettierignore | 0 .prettierrc.cjs | 18 + ...6d3b12e47125c5bd0dd5b48747f5dc937d6fa.json | 12 + ...fdf897fe5217040d424f2a8743336207c9d0c.json | 58 + ...124e7b3d9110296eabbc436f88bdec9ae99b1.json | 12 + ...c594a72d4750a8fbab81195c9a0f1e24e7df2.json | 12 + ...fb56ad6d17b589c7d4cfde4e112691db4c7e7.json | 12 + ...9da169ab90c91f7abed3b239d59036429d61a.json | 25 + ...9585c34b72f956ecad9b4d4ec068d6fa25a05.json | 27 +- ...9713f91cb90da656e75ad8dd4bcba276e5cf6.json | 91 + ...f9c49a9a78debd9f0ff7c8c2b8261f837c955.json | 12 + ...d523877ad1b15f458a6b04df847a968b3c969.json | 102 + ...f3382ca996e22cbb9e827465dcdfc0624a9df.json | 19 +- ...54142121b29cf9f4dd38b8d9ea93f25a79603.json | 25 + ...92924ba9acf9b15f276356de0d658c4cb71b7.json | 36 + ...baed58acbd14eea3904e1a7c8676510694f0c.json | 12 + ...6307165797622553871088e8452e6ea061dcd.json | 12 + ...598da81337a0c59c814f30daa2ad63c3fbd16.json | 36 + ...a9f9947ba7eef22e4a256fdf850b3b2835ed9.json | 12 + ...2f0435371ea0d33e7ed3097d728cef572c10d.json | 36 + ...9415af3d98abeda8c50383f289a058d30adc5.json | 47 + ...3eaf8b7bae5d994ee51b7d968997f0baa9a0c.json | 25 + ...15792c9a9abe255a3e3f3b80fee5247bf8230.json | 10 +- ...a1dec82baaecdc1b194501ae77472d10c0508.json | 25 + ...f1174064e8944c10c0ee614435a95c5226be2.json | 12 + ...f2be476722a63cf7d35c0eaece691c8df75f0.json | 25 + ...05e37c69f6d7ea69185025278fe24c5be2977.json | 25 + ...21ab07f735a7cdb9145192bb18b3ddb805160.json | 6 +- ...c4a65ecc63ef3ad21f36abf6d5629d32d9e38.json | 80 + ...ecd37705d700835ffc923f90bfe9d144bb47f.json | 102 + ...8060f672903f8bf642588b629fd21fd834df4.json | 12 + ...a8b3e5ab9467592c9411c5a41f2ea790dcd8c.json | 12 + ...4ce14a7e11bf493515d20ab376fe3e1dfee28.json | 54 +- ...21c3e2965e3cf76ebf77a4859ac4a54257bc5.json | 8 +- ...f616da3a5e67a68f313e7c027b645f64f9de0.json | 36 + ...39e97e118aebe7bc433620bf4a0505010415b.json | 12 + ...1381fbf06db5798cf65b7803c5f5d3841df71.json | 15 +- ...b4778161294838d5d60c8a6803b8b6d5d3ab5.json | 6 +- ...b63d553ba82ab4e6f284d52f17b0a9ba028fd.json | 58 + ...3d03f59ac31cebb9e509494c82643a5b07f7f.json | 70 +- ...c71e7bc0d67a993767a3ea1d76568fe7752c1.json | 80 + ...5d1816b2248d66fd20564b8b1eac5b35dee90.json | 12 + ...08c70df983f0d4fc8535804db511ad95b69fd.json | 12 + ...8e36e992531db6c62e1de174f50390bd32457.json | 36 + ...28b491f99dada87cdda92e5b6272d9b33144e.json | 36 + ...103f81a85e366470708aa90303b627e92386e.json | 4 +- ...1bdb012306ecd6c282874b2bbae222d7ae813.json | 12 + ...20c0cb8e873915eebbb579802136d4ff947ea.json | 69 + ...fca3cc5795567636e1a1dcb18b8841c779678.json | 12 + ...691b6cdafb227370af66311c29f6f0bc3d35c.json | 91 + ...62974d6f91b9a819e741780e51963664338a8.json | 47 + ...db92d92f3911f7c633dfeba211747de288940.json | 12 + ...a3da4f173a42043fb188563bf361f6d2e6573.json | 12 + ...377101d29d9d1d141851ce5bec52cbdb86f8a.json | 25 + ...b6539439324c51c678bf618caa82d9b8da944.json | 25 + ...c99caa1cf3954cc4796a7cbe6a487cfb5677c.json | 80 + ...6e052a5bd40a7b65aea03972863116cbfe8c9.json | 25 + ...3243888f548921d523d909a481d44b5443e56.json | 25 + ...3534eb5ca51f542312e76ff48b6a735061e9a.json | 43 +- ...fd1d305cc8af5723d6ffbd87d98cc19f7df49.json | 12 + ...58620bb49752fd9249444b8df415024b8068f.json | 4 +- ...3ecd69c99a1fa2d04db4a3a2cd6cd10353415.json | 69 + ...50a801f30344a7611e36c90e024ce2ddc93ec.json | 58 + ...ddd6472e9c2f521b991f23c75cefa406800c6.json | 12 + ...c81c8507b5c9a2e90cbb0c6f7493054b41272.json | 12 + ...9e445e6a446187ccc953ec3a7ca5f16835b2d.json | 12 + ...c36a1c16303afeb8867c7c78b42cb4cee6998.json | 36 + ...dc747344e4e514d26edd0cb59dce8a34b505a.json | 25 + ...6769ec57bbeec53d26cfe5532d9c83829513a.json | 36 + ...fc15d896d4dbd531dbb5ee7ab3a849d518bc8.json | 12 + ...a772452e3a4ceb0cf2becac4003d20936a002.json | 36 + ...292c51f89598fc730b3ea7d196d3252bd19a8.json | 19 +- ...67de46ed50839d8472884eb34dbaeca53c5f9.json | 10 +- ...94827810d6870d4d1e7e38b7d183bffec3e72.json | 36 + ...e475f1e13fc2f8127b5fcfee663ae6d0b1c45.json | 12 + ...bff81c2e7788b02a204b041f8e7b1a81b6a5e.json | 12 + ...99f999b221bb2ec71a80f4dcdd6a414c92c84.json | 12 + ...3d9a93c53b1308bd799af49086ce9c4dbd1de.json | 12 + ...f48aa8a57ab3d7e701ad3f9929d9f2dabf014.json | 91 + ...2bc58dc4e1b179085a936b4e40dd7cd4cd371.json | 70 +- ...0a3b534f4c18911ff828a9a4dc871d49c4770.json | 47 + ...e1a6c01028a77e8b42764645fc60d08997e53.json | 12 + ...9553ae6781a503eaf67c0a55f8a9d2ad931c8.json | 12 + ...8eeca131119e8b2c65f86651135a011f69217.json | 12 + ...665545fa40bb5e56f862a5ecc206a8755aac0.json | 12 + ...bfae9e29b308329921776f6763080f20ef965.json | 48 +- .vscode/settings.json | 8 +- Cargo.lock | 2165 +++++-- Cargo.toml | 56 +- Dockerfile | 13 + README.md | 45 +- biasdo-maria/fly.toml | 4 +- build.rs | 5 + ...docker-compose.yaml => docker-compose.yaml | 10 +- eslint.config.js | 94 + packages/server/fly.toml => fly.toml | 0 migrations/20240427130855_init.sql | 196 + package.json | 19 +- packages/client/.eslintignore | 13 - packages/client/.eslintrc.cjs | 30 - packages/client/.gitignore | 10 - packages/client/.prettierrc | 21 - packages/client/README.md | 38 - packages/client/package.json | 105 +- packages/client/src/app.css | 99 - packages/client/src/app.d.ts | 2 +- packages/client/src/app.html | 18 +- packages/client/src/app.scss | 141 + packages/client/src/lib/BoxLayout.svelte | 25 + packages/client/src/lib/Button.svelte | 38 +- packages/client/src/lib/ErrorPage.svelte | 8 + packages/client/src/lib/LoadingSpinner.svelte | 8 + packages/client/src/lib/Modal.svelte | 48 +- packages/client/src/lib/Paper.svelte | 16 - packages/client/src/lib/SidebarButton.svelte | 52 +- packages/client/src/lib/SidebarDivider.svelte | 3 - packages/client/src/lib/TextField.svelte | 104 +- packages/client/src/lib/UserIcon.svelte | 122 - packages/client/src/lib/UserProfile.svelte | 214 + packages/client/src/lib/cn.ts | 6 - packages/client/src/lib/fetch.ts | 25 + packages/client/src/lib/images.ts | 6 + packages/client/src/lib/index.ts | 61 - packages/client/src/lib/markdown.ts | 45 +- packages/client/src/lib/stores.ts | 876 ++- packages/client/src/routes/+error.svelte | 47 +- packages/client/src/routes/+layout.svelte | 5 +- packages/client/src/routes/+layout.ts | 1 + packages/client/src/routes/+page.svelte | 84 +- packages/client/src/routes/+page.ts | 21 - .../src/routes/app/(messages)/+layout.svelte | 275 + .../src/routes/app/(messages)/Message.svelte | 156 + .../direct-messages/[channelId]/+page.svelte | 0 .../channels/[channelId]/+page.svelte | 0 .../(sidebar-ui)/(messages)/+layout.svelte | 211 - .../app/(sidebar-ui)/(messages)/+layout.ts | 46 - .../(sidebar-ui)/(messages)/Message.svelte | 69 - .../routes/app/(sidebar-ui)/+layout.svelte | 491 -- .../src/routes/app/(sidebar-ui)/+layout.ts | 57 - .../src/routes/app/(sidebar-ui)/+page.svelte | 14 - .../servers/[serverId]/+page.svelte | 1 - .../(sidebar-ui)/servers/[serverId]/+page.ts | 22 - .../servers/[serverId]/settings/+page.svelte | 116 - .../servers/[serverId]/settings/+page.ts | 21 - .../app/(sidebar-ui)/settings/+page.svelte | 48 - packages/client/src/routes/app/+layout.svelte | 750 +++ packages/client/src/routes/app/+page.svelte | 19 + .../client/src/routes/app/DMButton.svelte | 19 + .../client/src/routes/app/MemberButton.svelte | 33 + .../src/routes/app/friends/+page.svelte | 53 + .../src/routes/app/friends/Friend.svelte | 51 + .../routes/app/friends/FriendRequest.svelte | 70 + .../app/invites/[inviteId]/+page.svelte | 113 +- .../routes/app/invites/[inviteId]/+page.ts | 30 - .../routes/app/oauth/authorize/+error.svelte | 41 + .../routes/app/oauth/authorize/+page.svelte | 68 + .../src/routes/app/oauth/authorize/+page.ts | 103 + .../app/servers/[serverId]/+layout.svelte | 33 + .../routes/app/servers/[serverId]/+page.ts | 11 + .../servers/[serverId]/settings/+page.svelte | 167 + .../servers/[serverId]/settings/Invite.svelte | 81 + .../src/routes/app/settings/+page.svelte | 221 + packages/client/src/routes/auth/+page.svelte | 89 - packages/client/src/routes/login/+page.svelte | 103 + .../client/src/routes/rate-limit/+page.svelte | 21 + .../client/src/routes/register/+page.svelte | 122 + packages/client/src/routes/tos/+page.svelte | 65 + .../client/static/android-chrome-192x192.png | Bin 4156 -> 5094 bytes .../client/static/android-chrome-512x512.png | Bin 10496 -> 26312 bytes packages/client/static/app-icons/0.svg | 6 + packages/client/static/app-icons/1.svg | 6 + packages/client/static/app-icons/2.svg | 6 + packages/client/static/app-icons/3.svg | 6 + packages/client/static/apple-touch-icon.png | Bin 3788 -> 4034 bytes packages/client/static/browserconfig.xml | 2 +- packages/client/static/favicon-16x16.png | Bin 923 -> 935 bytes packages/client/static/favicon-32x32.png | Bin 1375 -> 1389 bytes packages/client/static/favicon.ico | Bin 15086 -> 15086 bytes packages/client/static/favicon.svg | 11 + packages/client/static/logo.svg | 10 +- packages/client/static/logotype.svg | 17 + packages/client/static/mstile-144x144.png | Bin 3972 -> 4555 bytes packages/client/static/mstile-150x150.png | Bin 3991 -> 4645 bytes packages/client/static/mstile-310x150.png | Bin 4206 -> 5000 bytes packages/client/static/mstile-310x310.png | Bin 7511 -> 10167 bytes packages/client/static/mstile-70x70.png | Bin 2957 -> 3001 bytes packages/client/static/safari-pinned-tab.svg | 80 +- packages/client/static/server-icons/0.svg | 2 +- packages/client/static/server-icons/1.svg | 2 +- packages/client/static/server-icons/2.svg | 2 +- packages/client/static/server-icons/3.svg | 2 +- packages/client/static/site.webmanifest | 11 +- packages/client/static/user-icons/0.svg | 2 +- packages/client/static/user-icons/1.svg | 2 +- packages/client/static/user-icons/2.svg | 2 +- packages/client/static/user-icons/3.svg | 2 +- packages/client/tailwind.config.js | 67 +- packages/server-utils/package.json | 2 +- packages/server-utils/src/Channel.ts | 5 +- packages/server-utils/src/ChannelKind.ts | 2 +- packages/server-utils/src/Client.ts | 3 + packages/server-utils/src/Invite.ts | 4 +- packages/server-utils/src/Member.ts | 5 - packages/server-utils/src/Message.ts | 6 +- packages/server-utils/src/MessageKind.ts | 2 +- packages/server-utils/src/OptionId.ts | 3 - .../server-utils/src/{Id.ts => ReadWrite.ts} | 2 +- packages/server-utils/src/Scope.ts | 4 + packages/server-utils/src/Server.ts | 3 +- packages/server-utils/src/ServerMember.ts | 4 + packages/server-utils/src/User.ts | 3 +- packages/server-utils/src/UserFriend.ts | 5 + .../server-utils/src/UserFriendRequest.ts | 4 + packages/server-utils/src/WsUpdateEvent.ts | 10 + packages/server/.dockerignore | 13 - packages/server/.env | 1 - ...11fb7979eaf2f4511cb6886de86552130d3fd.json | 102 - ...4a759290418077ca100e6bf181ac633f14346.json | 102 - ...75b2db0086b65340176104a6e80efb636d84f.json | 58 - ...74148bcdb939df474bb7cb74c174c59a4c450.json | 12 - ...67675cc5fd1c7aa062fa4a67228d336dce446.json | 91 - ...88f2c8bad408b4fcee344f5e032acf9969656.json | 12 - ...0a557e8f606731cfe786de0d72067a4eb745d.json | 91 - ...60bddddbef57b247a402c54eb0f357f7e91ea.json | 69 - ...1acc7413b9d44cef84613f14f9371211fa87b.json | 69 - ...eb2bd07ac67a45badf19c8f725d28969c5d8b.json | 91 - ...f7692ee09c6041392d30e882036f45824980c.json | 91 - ...f6810f34e4d12d873ea4d93fa390fe967a42a.json | 58 - ...0c70eb04a16091b6fc75a91072661fd104678.json | 25 - ...8893e556d2b6b45c2cae4009a85aaf481f068.json | 69 - ...3d804754670f4a6004db07b876aa48955f8aa.json | 58 - ...280fcf4fc43ae0587542a6764ececa7f63849.json | 12 - ...f3ebc3fc1942b9a6dae5873131bcadded870e.json | 12 - ...f7dea2603461f88906e4864b35674e36dbd4b.json | 146 - ...d3cfa98d6f70b2b61f4d4adee6470e741400d.json | 58 - ...448b3f4d5da78b358fc4049c76bd901de8366.json | 58 - ...5f33ae1eca953569becc805568158740ea8b6.json | 58 - packages/server/Cargo.toml | 41 - packages/server/Dockerfile | 18 - .../server/migrations/20231022135325_init.sql | 73 - .../20231102195343_invite_string_id.sql | 4 - .../20231118221236_shrink_message_len.sql | 1 - ...20231126235317_direct_message_channels.sql | 23 - packages/server/package.json | 9 - packages/server/src/consts.rs | 133 - packages/server/src/endpoints/auth.rs | 172 - packages/server/src/endpoints/channels.rs | 155 - .../server/src/endpoints/direct_messages.rs | 183 - packages/server/src/endpoints/invites.rs | 265 - packages/server/src/endpoints/members.rs | 182 - packages/server/src/endpoints/messages.rs | 228 - packages/server/src/endpoints/mod.rs | 19 - packages/server/src/endpoints/servers.rs | 197 - packages/server/src/errors.rs | 81 - packages/server/src/id_type.rs | 86 - packages/server/src/main.rs | 123 - packages/server/src/structures/channel.rs | 54 - packages/server/src/structures/member.rs | 72 - packages/server/src/structures/message.rs | 37 - packages/server/src/structures/mod.rs | 7 - packages/server/src/structures/session.rs | 10 - packages/server/src/structures/user.rs | 14 - packages/server/src/ws/mod.rs | 204 - patches/carta-md@4.0.4.patch | 64 + patches/markdown-it-shikiji@0.9.7.patch | 12 - patches/svelte-portal@2.2.0.patch | 117 - patches/svelte-portal@2.2.1.patch | 12 + pnpm-lock.yaml | 5738 +++++++++++------ rust-toolchain.toml | 3 + src/endpoints/channels.rs | 286 + src/endpoints/direct_messages.rs | 52 + src/endpoints/friend_requests.rs | 393 ++ src/endpoints/friends.rs | 146 + src/endpoints/invites.rs | 335 + src/endpoints/members.rs | 203 + src/endpoints/messages.rs | 464 ++ src/endpoints/mod.rs | 71 + src/endpoints/oauth/authorization.rs | 157 + src/endpoints/oauth/clients.rs | 320 + src/endpoints/oauth/mod.rs | 50 + src/endpoints/oauth/token.rs | 316 + src/endpoints/servers.rs | 317 + src/endpoints/users.rs | 407 ++ src/endpoints/ws.rs | 252 + src/error.rs | 69 + src/main.rs | 365 ++ src/middleware.rs | 247 + src/models/channel.rs | 51 + src/models/client.rs | 19 + src/models/friend.rs | 13 + .../server.rs => src/models/friendrequest.rs | 11 +- .../src/structures => src/models}/invite.rs | 6 +- src/models/message.rs | 47 + src/models/mod.rs | 24 + src/models/scope.rs | 246 + src/models/server.rs | 14 + src/models/servermember.rs | 18 + src/models/user.rs | 12 + src/ws.rs | 200 + turbo.json | 19 - 303 files changed, 17206 insertions(+), 9279 deletions(-) create mode 100644 .dockerignore create mode 100644 .github/workflows/check-and-lint.yaml rename packages/client/.prettierignore => .prettierignore (100%) create mode 100644 .prettierrc.cjs create mode 100644 .sqlx/query-04cc53a1acd226550c0366cbb426d3b12e47125c5bd0dd5b48747f5dc937d6fa.json create mode 100644 .sqlx/query-0949aee2ce7773a8245b1e90637fdf897fe5217040d424f2a8743336207c9d0c.json create mode 100644 .sqlx/query-0955856e4a2e56bbc5f44868eca124e7b3d9110296eabbc436f88bdec9ae99b1.json create mode 100644 .sqlx/query-09bfba968aa011c80fba2ed63e0c594a72d4750a8fbab81195c9a0f1e24e7df2.json create mode 100644 .sqlx/query-0b1e2c01e3567fc1a96c119dd14fb56ad6d17b589c7d4cfde4e112691db4c7e7.json create mode 100644 .sqlx/query-10e51d6c003b25695791f0d38ab9da169ab90c91f7abed3b239d59036429d61a.json rename packages/server/.sqlx/query-644fc033697d3a72a7f96cb2da9e8828132e7e21340df5c88cfce7423fb39222.json => .sqlx/query-12d94b8b6b08a56cbff90c854c19585c34b72f956ecad9b4d4ec068d6fa25a05.json (67%) create mode 100644 .sqlx/query-1aca019b87ce49e2205d705156a9713f91cb90da656e75ad8dd4bcba276e5cf6.json create mode 100644 .sqlx/query-1ae849ba28c57de83c96018d91af9c49a9a78debd9f0ff7c8c2b8261f837c955.json create mode 100644 .sqlx/query-1bdc5392e6b2df0e16ef24cba88d523877ad1b15f458a6b04df847a968b3c969.json rename packages/server/.sqlx/query-181f229d243cae535444392f042aa4f73f09bb649650ddd5ba5abee87c9ba3ab.json => .sqlx/query-20ae2fe678989904913788809caf3382ca996e22cbb9e827465dcdfc0624a9df.json (63%) create mode 100644 .sqlx/query-215f5cb12815cea5f637e1b962d54142121b29cf9f4dd38b8d9ea93f25a79603.json create mode 100644 .sqlx/query-29e0f35feb6b078a4c44486bd8892924ba9acf9b15f276356de0d658c4cb71b7.json create mode 100644 .sqlx/query-31fac37d150d480f1c70ef7fa0cbaed58acbd14eea3904e1a7c8676510694f0c.json create mode 100644 .sqlx/query-3610f699fd0296befa4467cec376307165797622553871088e8452e6ea061dcd.json create mode 100644 .sqlx/query-3955eda5ad8eef747b7903d116d598da81337a0c59c814f30daa2ad63c3fbd16.json create mode 100644 .sqlx/query-3aaaa344b8ff6ff2e9744f97a6da9f9947ba7eef22e4a256fdf850b3b2835ed9.json create mode 100644 .sqlx/query-417fa5983fa6b2f9ccf5d942b8b2f0435371ea0d33e7ed3097d728cef572c10d.json create mode 100644 .sqlx/query-4324b799aa733af47731f98be449415af3d98abeda8c50383f289a058d30adc5.json create mode 100644 .sqlx/query-45477d8169340f5ccec75d4bd3b3eaf8b7bae5d994ee51b7d968997f0baa9a0c.json rename packages/server/.sqlx/query-51eb3bf9c3171a56e3428fa989cbe056e84126e7d3a3c56130903e3b6a238cca.json => .sqlx/query-463cdd552772f40da789d359d1a15792c9a9abe255a3e3f3b80fee5247bf8230.json (53%) create mode 100644 .sqlx/query-494df8247ee42becde92381c79ea1dec82baaecdc1b194501ae77472d10c0508.json create mode 100644 .sqlx/query-506e8eb87903ad88683a893d235f1174064e8944c10c0ee614435a95c5226be2.json create mode 100644 .sqlx/query-5593cf60b802c9bfe23b8d30d0cf2be476722a63cf7d35c0eaece691c8df75f0.json create mode 100644 .sqlx/query-57b78a46153555423ed7adf65d805e37c69f6d7ea69185025278fe24c5be2977.json rename packages/server/.sqlx/query-85324acc33dc436990380bfc4bcf60be6750bc256dab6122726f9c1459053552.json => .sqlx/query-593d990d2c1244a9c29bba0f58b21ab07f735a7cdb9145192bb18b3ddb805160.json (67%) create mode 100644 .sqlx/query-59e5735b40462b73e8a84f7bb46c4a65ecc63ef3ad21f36abf6d5629d32d9e38.json create mode 100644 .sqlx/query-603e81926c964ec6357013fa5e8ecd37705d700835ffc923f90bfe9d144bb47f.json create mode 100644 .sqlx/query-652ebe8b6fd3a10a9ffbfb758508060f672903f8bf642588b629fd21fd834df4.json create mode 100644 .sqlx/query-681df428c25723edbdb6d884ecba8b3e5ab9467592c9411c5a41f2ea790dcd8c.json rename packages/server/.sqlx/query-ca6d4ddeaecaacc7278e3eeba53b64749d7dcb3d7454c5593815696ad02103f8.json => .sqlx/query-6aa8ce1e6445559acb6879a1a8f4ce14a7e11bf493515d20ab376fe3e1dfee28.json (58%) rename packages/server/.sqlx/query-e4472712357e995b832ffb497ca2a822a7e330e13c03123cb55bfc2b3f5f6baa.json => .sqlx/query-6b8c040e5c713053bb4fb1f755521c3e2965e3cf76ebf77a4859ac4a54257bc5.json (53%) create mode 100644 .sqlx/query-702ae047ce656f8899125e5228af616da3a5e67a68f313e7c027b645f64f9de0.json create mode 100644 .sqlx/query-777ef02ecb3aa6b48f81d4f42f239e97e118aebe7bc433620bf4a0505010415b.json rename packages/server/.sqlx/query-96516c3ed00a6a8d29d165b12d73a03f6ec6b0e8038effdb87eed16479a0fbca.json => .sqlx/query-79f60517e18d2aecddc39df80951381fbf06db5798cf65b7803c5f5d3841df71.json (67%) rename packages/server/.sqlx/query-62f68b9d3b5d64c96789f2b1c7c47dc983a0078d2bb73e3349042e0585c0978c.json => .sqlx/query-7ed2add29b1ffc7e16b9f059a9eb4778161294838d5d60c8a6803b8b6d5d3ab5.json (60%) create mode 100644 .sqlx/query-7fac129bef12c554c5948b339c9b63d553ba82ab4e6f284d52f17b0a9ba028fd.json rename packages/server/.sqlx/query-78fab8bb99cf072b57792b69bb8ef625f419309c7aaecdf350ef97f5239abdeb.json => .sqlx/query-80c3f7f9687fe09f2114d8e4ea63d03f59ac31cebb9e509494c82643a5b07f7f.json (54%) create mode 100644 .sqlx/query-81abad5cdf7f7d5d990dc5b082ec71e7bc0d67a993767a3ea1d76568fe7752c1.json create mode 100644 .sqlx/query-8395f606f0d81d15c3c619a698b5d1816b2248d66fd20564b8b1eac5b35dee90.json create mode 100644 .sqlx/query-887cd7237809d9ad6185a9506c508c70df983f0d4fc8535804db511ad95b69fd.json create mode 100644 .sqlx/query-8dd05101a46e1af538f063757d28e36e992531db6c62e1de174f50390bd32457.json create mode 100644 .sqlx/query-90345c9b4b56bb414c7cbb0337028b491f99dada87cdda92e5b6272d9b33144e.json rename packages/server/.sqlx/query-256599c1a6316528da484bfbe8b7c29c53af2680bbbd935cdebac6509dafab06.json => .sqlx/query-9398ee3e7aed458915ee00a2b23103f81a85e366470708aa90303b627e92386e.json (50%) create mode 100644 .sqlx/query-9488f59b0bdbc518cef16088d7f1bdb012306ecd6c282874b2bbae222d7ae813.json create mode 100644 .sqlx/query-952f971d0d83e5d0cf6ef5a990c20c0cb8e873915eebbb579802136d4ff947ea.json create mode 100644 .sqlx/query-957cd5f50bcb42e8545fff7f09dfca3cc5795567636e1a1dcb18b8841c779678.json create mode 100644 .sqlx/query-96c1fdae31bb6c28506c274d15b691b6cdafb227370af66311c29f6f0bc3d35c.json create mode 100644 .sqlx/query-97421c0eef5d5c64ab506aebb4462974d6f91b9a819e741780e51963664338a8.json create mode 100644 .sqlx/query-97a45b572c6a75b91c11caacb17db92d92f3911f7c633dfeba211747de288940.json create mode 100644 .sqlx/query-986b954cd44124b591c0be21a2ca3da4f173a42043fb188563bf361f6d2e6573.json create mode 100644 .sqlx/query-9e879460b096ea2f21ad49baafd377101d29d9d1d141851ce5bec52cbdb86f8a.json create mode 100644 .sqlx/query-9f376990074c62141b156d30d16b6539439324c51c678bf618caa82d9b8da944.json create mode 100644 .sqlx/query-a0ccd9c589d166f366e3a7e4f50c99caa1cf3954cc4796a7cbe6a487cfb5677c.json create mode 100644 .sqlx/query-a4d2c820fa4b6537048d401e0866e052a5bd40a7b65aea03972863116cbfe8c9.json create mode 100644 .sqlx/query-a575ba31cdd7fc81919c1c5df543243888f548921d523d909a481d44b5443e56.json rename packages/server/.sqlx/query-f9b0282f7ba80c441c61b64ac3592751f79a24c85e7870ff65d9803cbe65ab92.json => .sqlx/query-ad2df4d22791eb31e9afc8a7a313534eb5ca51f542312e76ff48b6a735061e9a.json (55%) create mode 100644 .sqlx/query-adf77e45e3c483ffb3c3f342a83fd1d305cc8af5723d6ffbd87d98cc19f7df49.json rename packages/server/.sqlx/query-38a57a98598079947ef06f295b8eb77c64f4c6bc414b5ed9bf6e218efb574d49.json => .sqlx/query-b97fb40ff69e1f72f1f04c8095458620bb49752fd9249444b8df415024b8068f.json (50%) create mode 100644 .sqlx/query-bd67de4c2c23877db53dae948ae3ecd69c99a1fa2d04db4a3a2cd6cd10353415.json create mode 100644 .sqlx/query-bd977dad64b7fa409c5b1ab281650a801f30344a7611e36c90e024ce2ddc93ec.json create mode 100644 .sqlx/query-be40259ec9953120e9f41601e50ddd6472e9c2f521b991f23c75cefa406800c6.json create mode 100644 .sqlx/query-bfae3820850b94f74c100bc7782c81c8507b5c9a2e90cbb0c6f7493054b41272.json create mode 100644 .sqlx/query-c1b2b9fddeb1bdcbc23c7f17d469e445e6a446187ccc953ec3a7ca5f16835b2d.json create mode 100644 .sqlx/query-c3b8c2e52a732999696dce6eaa0c36a1c16303afeb8867c7c78b42cb4cee6998.json create mode 100644 .sqlx/query-c5c002aa4a5da03a417d0fc06bedc747344e4e514d26edd0cb59dce8a34b505a.json create mode 100644 .sqlx/query-c63692c5cc204a139d48a4ab3ab6769ec57bbeec53d26cfe5532d9c83829513a.json create mode 100644 .sqlx/query-c74dc062ddc59b912b701b543fffc15d896d4dbd531dbb5ee7ab3a849d518bc8.json create mode 100644 .sqlx/query-c957dee29f4eba21b67334e428da772452e3a4ceb0cf2becac4003d20936a002.json rename packages/server/.sqlx/query-d6ba3efed8974ec07fa1541a94794731db2c657930d2b0a14f47b48cce5284e6.json => .sqlx/query-cce880601c8bfb24045dd62b488292c51f89598fc730b3ea7d196d3252bd19a8.json (60%) rename packages/server/.sqlx/query-937bacabf9e54a8f39597fd96b35997704a6e512b578ad08b5c65c25e2aeba80.json => .sqlx/query-d30ce8710a039cad27d1208897167de46ed50839d8472884eb34dbaeca53c5f9.json (54%) create mode 100644 .sqlx/query-d96f6dfe2b214fe64b64205ab0594827810d6870d4d1e7e38b7d183bffec3e72.json create mode 100644 .sqlx/query-dcddf398d56fde4c0fcecf2c5ece475f1e13fc2f8127b5fcfee663ae6d0b1c45.json create mode 100644 .sqlx/query-dd0d75d133e3ee210f6e69e5df5bff81c2e7788b02a204b041f8e7b1a81b6a5e.json create mode 100644 .sqlx/query-e0240c8326e110368444ea16a3499f999b221bb2ec71a80f4dcdd6a414c92c84.json create mode 100644 .sqlx/query-e522a6ee2a810b31998680aa0633d9a93c53b1308bd799af49086ce9c4dbd1de.json create mode 100644 .sqlx/query-e654ab753473d4eedccbb4ee301f48aa8a57ab3d7e701ad3f9929d9f2dabf014.json rename packages/server/.sqlx/query-10a7f8fb2c07a5dc5b89873278e91bd444369f5f1b65dd1f2b7852731969ef30.json => .sqlx/query-e683334bc7b2f0c6fe49ed13a392bc58dc4e1b179085a936b4e40dd7cd4cd371.json (53%) create mode 100644 .sqlx/query-ea015afc56448ddfc65e3c5c0670a3b534f4c18911ff828a9a4dc871d49c4770.json create mode 100644 .sqlx/query-ea36c3ce8434541374b872bbb3de1a6c01028a77e8b42764645fc60d08997e53.json create mode 100644 .sqlx/query-f28838fef895007dab20147d5919553ae6781a503eaf67c0a55f8a9d2ad931c8.json create mode 100644 .sqlx/query-f8ca974a48169c1bee200b4e20e8eeca131119e8b2c65f86651135a011f69217.json create mode 100644 .sqlx/query-fb01700465102dd75862f7b6b93665545fa40bb5e56f862a5ecc206a8755aac0.json rename packages/server/.sqlx/query-70158dd99f50fd5e545dadf05f9bb38ac2109485d43bec427866cc664d64bd88.json => .sqlx/query-fc63d3cf8560da2607855a939acbfae9e29b308329921776f6763080f20ef965.json (51%) create mode 100644 Dockerfile create mode 100644 build.rs rename packages/server/docker-compose.yaml => docker-compose.yaml (60%) create mode 100644 eslint.config.js rename packages/server/fly.toml => fly.toml (100%) create mode 100644 migrations/20240427130855_init.sql delete mode 100644 packages/client/.eslintignore delete mode 100644 packages/client/.eslintrc.cjs delete mode 100644 packages/client/.gitignore delete mode 100644 packages/client/.prettierrc delete mode 100644 packages/client/README.md delete mode 100644 packages/client/src/app.css create mode 100644 packages/client/src/app.scss create mode 100644 packages/client/src/lib/BoxLayout.svelte create mode 100644 packages/client/src/lib/ErrorPage.svelte create mode 100644 packages/client/src/lib/LoadingSpinner.svelte delete mode 100644 packages/client/src/lib/Paper.svelte delete mode 100644 packages/client/src/lib/SidebarDivider.svelte delete mode 100644 packages/client/src/lib/UserIcon.svelte create mode 100644 packages/client/src/lib/UserProfile.svelte delete mode 100644 packages/client/src/lib/cn.ts create mode 100644 packages/client/src/lib/fetch.ts create mode 100644 packages/client/src/lib/images.ts delete mode 100644 packages/client/src/lib/index.ts create mode 100644 packages/client/src/routes/+layout.ts delete mode 100644 packages/client/src/routes/+page.ts create mode 100644 packages/client/src/routes/app/(messages)/+layout.svelte create mode 100644 packages/client/src/routes/app/(messages)/Message.svelte rename packages/client/src/routes/app/{(sidebar-ui) => }/(messages)/direct-messages/[channelId]/+page.svelte (100%) rename packages/client/src/routes/app/{(sidebar-ui) => }/(messages)/servers/[serverId]/channels/[channelId]/+page.svelte (100%) delete mode 100644 packages/client/src/routes/app/(sidebar-ui)/(messages)/+layout.svelte delete mode 100644 packages/client/src/routes/app/(sidebar-ui)/(messages)/+layout.ts delete mode 100644 packages/client/src/routes/app/(sidebar-ui)/(messages)/Message.svelte delete mode 100644 packages/client/src/routes/app/(sidebar-ui)/+layout.svelte delete mode 100644 packages/client/src/routes/app/(sidebar-ui)/+layout.ts delete mode 100644 packages/client/src/routes/app/(sidebar-ui)/+page.svelte delete mode 100644 packages/client/src/routes/app/(sidebar-ui)/servers/[serverId]/+page.svelte delete mode 100644 packages/client/src/routes/app/(sidebar-ui)/servers/[serverId]/+page.ts delete mode 100644 packages/client/src/routes/app/(sidebar-ui)/servers/[serverId]/settings/+page.svelte delete mode 100644 packages/client/src/routes/app/(sidebar-ui)/servers/[serverId]/settings/+page.ts delete mode 100644 packages/client/src/routes/app/(sidebar-ui)/settings/+page.svelte create mode 100644 packages/client/src/routes/app/+layout.svelte create mode 100644 packages/client/src/routes/app/+page.svelte create mode 100644 packages/client/src/routes/app/DMButton.svelte create mode 100644 packages/client/src/routes/app/MemberButton.svelte create mode 100644 packages/client/src/routes/app/friends/+page.svelte create mode 100644 packages/client/src/routes/app/friends/Friend.svelte create mode 100644 packages/client/src/routes/app/friends/FriendRequest.svelte delete mode 100644 packages/client/src/routes/app/invites/[inviteId]/+page.ts create mode 100644 packages/client/src/routes/app/oauth/authorize/+error.svelte create mode 100644 packages/client/src/routes/app/oauth/authorize/+page.svelte create mode 100644 packages/client/src/routes/app/oauth/authorize/+page.ts create mode 100644 packages/client/src/routes/app/servers/[serverId]/+layout.svelte create mode 100644 packages/client/src/routes/app/servers/[serverId]/+page.ts create mode 100644 packages/client/src/routes/app/servers/[serverId]/settings/+page.svelte create mode 100644 packages/client/src/routes/app/servers/[serverId]/settings/Invite.svelte create mode 100644 packages/client/src/routes/app/settings/+page.svelte delete mode 100644 packages/client/src/routes/auth/+page.svelte create mode 100644 packages/client/src/routes/login/+page.svelte create mode 100644 packages/client/src/routes/rate-limit/+page.svelte create mode 100644 packages/client/src/routes/register/+page.svelte create mode 100644 packages/client/src/routes/tos/+page.svelte create mode 100644 packages/client/static/app-icons/0.svg create mode 100644 packages/client/static/app-icons/1.svg create mode 100644 packages/client/static/app-icons/2.svg create mode 100644 packages/client/static/app-icons/3.svg create mode 100644 packages/client/static/favicon.svg create mode 100644 packages/client/static/logotype.svg create mode 100644 packages/server-utils/src/Client.ts delete mode 100644 packages/server-utils/src/Member.ts delete mode 100644 packages/server-utils/src/OptionId.ts rename packages/server-utils/src/{Id.ts => ReadWrite.ts} (72%) create mode 100644 packages/server-utils/src/Scope.ts create mode 100644 packages/server-utils/src/ServerMember.ts create mode 100644 packages/server-utils/src/UserFriend.ts create mode 100644 packages/server-utils/src/UserFriendRequest.ts create mode 100644 packages/server-utils/src/WsUpdateEvent.ts delete mode 100644 packages/server/.dockerignore delete mode 100644 packages/server/.env delete mode 100644 packages/server/.sqlx/query-0d1580e0aad0fa3a087921784fd11fb7979eaf2f4511cb6886de86552130d3fd.json delete mode 100644 packages/server/.sqlx/query-21cf1948c823c1ad2a9f42559964a759290418077ca100e6bf181ac633f14346.json delete mode 100644 packages/server/.sqlx/query-25e028b68816c21c2c78cb7950675b2db0086b65340176104a6e80efb636d84f.json delete mode 100644 packages/server/.sqlx/query-2d47020cf75ac00d8f58377e0c374148bcdb939df474bb7cb74c174c59a4c450.json delete mode 100644 packages/server/.sqlx/query-2f752218af04eb49b5d6949ef8b67675cc5fd1c7aa062fa4a67228d336dce446.json delete mode 100644 packages/server/.sqlx/query-308d383c2c85855234e7ec975dc88f2c8bad408b4fcee344f5e032acf9969656.json delete mode 100644 packages/server/.sqlx/query-362afb56117e33b1c248f1d36890a557e8f606731cfe786de0d72067a4eb745d.json delete mode 100644 packages/server/.sqlx/query-40bfa0c4c996b1d04aa4c9af7e560bddddbef57b247a402c54eb0f357f7e91ea.json delete mode 100644 packages/server/.sqlx/query-670c02aabca70e8e4e9ff21fbd01acc7413b9d44cef84613f14f9371211fa87b.json delete mode 100644 packages/server/.sqlx/query-6c51bfbe154a06770330f260166eb2bd07ac67a45badf19c8f725d28969c5d8b.json delete mode 100644 packages/server/.sqlx/query-89887e0b3c8c18217559d9d1550f7692ee09c6041392d30e882036f45824980c.json delete mode 100644 packages/server/.sqlx/query-931c48b0ef76dcc977851f59498f6810f34e4d12d873ea4d93fa390fe967a42a.json delete mode 100644 packages/server/.sqlx/query-9d3ac45626efb20cc15482861750c70eb04a16091b6fc75a91072661fd104678.json delete mode 100644 packages/server/.sqlx/query-b2095a2bc40028774e92616cf398893e556d2b6b45c2cae4009a85aaf481f068.json delete mode 100644 packages/server/.sqlx/query-c16ab63c782c256e7d2f8c24f183d804754670f4a6004db07b876aa48955f8aa.json delete mode 100644 packages/server/.sqlx/query-d247a55e4929217f6019885a13a280fcf4fc43ae0587542a6764ececa7f63849.json delete mode 100644 packages/server/.sqlx/query-d6846443223b83ee9ce7b5fcb15f3ebc3fc1942b9a6dae5873131bcadded870e.json delete mode 100644 packages/server/.sqlx/query-e6a484b9a360ec604f01efb5245f7dea2603461f88906e4864b35674e36dbd4b.json delete mode 100644 packages/server/.sqlx/query-ec51b44f870c999911948e76af0d3cfa98d6f70b2b61f4d4adee6470e741400d.json delete mode 100644 packages/server/.sqlx/query-f0a39240190fb1634d85576bffe448b3f4d5da78b358fc4049c76bd901de8366.json delete mode 100644 packages/server/.sqlx/query-f96eac603928d183f5bd006931d5f33ae1eca953569becc805568158740ea8b6.json delete mode 100644 packages/server/Cargo.toml delete mode 100644 packages/server/Dockerfile delete mode 100644 packages/server/migrations/20231022135325_init.sql delete mode 100644 packages/server/migrations/20231102195343_invite_string_id.sql delete mode 100644 packages/server/migrations/20231118221236_shrink_message_len.sql delete mode 100644 packages/server/migrations/20231126235317_direct_message_channels.sql delete mode 100644 packages/server/package.json delete mode 100644 packages/server/src/consts.rs delete mode 100644 packages/server/src/endpoints/auth.rs delete mode 100644 packages/server/src/endpoints/channels.rs delete mode 100644 packages/server/src/endpoints/direct_messages.rs delete mode 100644 packages/server/src/endpoints/invites.rs delete mode 100644 packages/server/src/endpoints/members.rs delete mode 100644 packages/server/src/endpoints/messages.rs delete mode 100644 packages/server/src/endpoints/mod.rs delete mode 100644 packages/server/src/endpoints/servers.rs delete mode 100644 packages/server/src/errors.rs delete mode 100644 packages/server/src/id_type.rs delete mode 100644 packages/server/src/main.rs delete mode 100644 packages/server/src/structures/channel.rs delete mode 100644 packages/server/src/structures/member.rs delete mode 100644 packages/server/src/structures/message.rs delete mode 100644 packages/server/src/structures/mod.rs delete mode 100644 packages/server/src/structures/session.rs delete mode 100644 packages/server/src/structures/user.rs delete mode 100644 packages/server/src/ws/mod.rs create mode 100644 patches/carta-md@4.0.4.patch delete mode 100644 patches/markdown-it-shikiji@0.9.7.patch delete mode 100644 patches/svelte-portal@2.2.0.patch create mode 100644 patches/svelte-portal@2.2.1.patch create mode 100644 rust-toolchain.toml create mode 100644 src/endpoints/channels.rs create mode 100644 src/endpoints/direct_messages.rs create mode 100644 src/endpoints/friend_requests.rs create mode 100644 src/endpoints/friends.rs create mode 100644 src/endpoints/invites.rs create mode 100644 src/endpoints/members.rs create mode 100644 src/endpoints/messages.rs create mode 100644 src/endpoints/mod.rs create mode 100644 src/endpoints/oauth/authorization.rs create mode 100644 src/endpoints/oauth/clients.rs create mode 100644 src/endpoints/oauth/mod.rs create mode 100644 src/endpoints/oauth/token.rs create mode 100644 src/endpoints/servers.rs create mode 100644 src/endpoints/users.rs create mode 100644 src/endpoints/ws.rs create mode 100644 src/error.rs create mode 100644 src/main.rs create mode 100644 src/middleware.rs create mode 100644 src/models/channel.rs create mode 100644 src/models/client.rs create mode 100644 src/models/friend.rs rename packages/server/src/structures/server.rs => src/models/friendrequest.rs (51%) rename {packages/server/src/structures => src/models}/invite.rs (71%) create mode 100644 src/models/message.rs create mode 100644 src/models/mod.rs create mode 100644 src/models/scope.rs create mode 100644 src/models/server.rs create mode 100644 src/models/servermember.rs create mode 100644 src/models/user.rs create mode 100644 src/ws.rs delete mode 100644 turbo.json diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..2cc950b --- /dev/null +++ b/.dockerignore @@ -0,0 +1,15 @@ +.idea +.vscode +biasdo-maria +node_modules +fly.toml +target +.env +packages +patches +.prettierignore +.prettierrc.cjs +eslint.config.js +pnpm-lock.yaml +pnpm-workspace.yaml +README.md \ No newline at end of file diff --git a/.github/workflows/check-and-lint.yaml b/.github/workflows/check-and-lint.yaml new file mode 100644 index 0000000..490e633 --- /dev/null +++ b/.github/workflows/check-and-lint.yaml @@ -0,0 +1,26 @@ +name: Test & Lint +on: + - push + - pull_request +env: + CARGO_TERM_COLOR: always + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Rust + uses: moonrepo/setup-rust@v1 + with: + bins: sqlx-cli + components: rustfmt, clippy + + - name: Check formatting + run: cargo fmt --all -- --check + + - name: Run clippy + run: cargo clippy --all --all-targets --all-features -- -D warnings + + - name: Check sqlx queries + run: cargo sqlx prepare --check \ No newline at end of file diff --git a/.gitignore b/.gitignore index e536db0..fdb430a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ dist -.solid +.svelte-kit .output .vercel .netlify @@ -26,8 +26,7 @@ Thumbs.db stats.html .turbo target -packages/server/src/prisma.rs -packages/client/src/server-types.ts -packages/client/src/lib/schemas -packages/server/mysql-data -.vite-inspect \ No newline at end of file +.vite-inspect +.env + +yarn.lock \ No newline at end of file diff --git a/packages/client/.prettierignore b/.prettierignore similarity index 100% rename from packages/client/.prettierignore rename to .prettierignore diff --git a/.prettierrc.cjs b/.prettierrc.cjs new file mode 100644 index 0000000..3e7bc45 --- /dev/null +++ b/.prettierrc.cjs @@ -0,0 +1,18 @@ +/** @type {import('prettier').Config} */ +module.exports = { + plugins: [ + require.resolve("prettier-plugin-svelte"), + require.resolve("prettier-plugin-tailwindcss"), + ], + overrides: [ + { + files: "*.svelte", + options: { + parser: "svelte", + }, + }, + ], + semi: false, + useTabs: true, + endOfLine: "auto", +} diff --git a/.sqlx/query-04cc53a1acd226550c0366cbb426d3b12e47125c5bd0dd5b48747f5dc937d6fa.json b/.sqlx/query-04cc53a1acd226550c0366cbb426d3b12e47125c5bd0dd5b48747f5dc937d6fa.json new file mode 100644 index 0000000..8f6d7b5 --- /dev/null +++ b/.sqlx/query-04cc53a1acd226550c0366cbb426d3b12e47125c5bd0dd5b48747f5dc937d6fa.json @@ -0,0 +1,12 @@ +{ + "db_name": "MySQL", + "query": "INSERT INTO AuthorizationCode (id, created_at, expires_at, client_id, user_id, scope, code_challenge, code_challenge_method) VALUES (?, DEFAULT, DEFAULT, ?, ?, ?, ?, ?)", + "describe": { + "columns": [], + "parameters": { + "Right": 6 + }, + "nullable": [] + }, + "hash": "04cc53a1acd226550c0366cbb426d3b12e47125c5bd0dd5b48747f5dc937d6fa" +} diff --git a/.sqlx/query-0949aee2ce7773a8245b1e90637fdf897fe5217040d424f2a8743336207c9d0c.json b/.sqlx/query-0949aee2ce7773a8245b1e90637fdf897fe5217040d424f2a8743336207c9d0c.json new file mode 100644 index 0000000..c186f9a --- /dev/null +++ b/.sqlx/query-0949aee2ce7773a8245b1e90637fdf897fe5217040d424f2a8743336207c9d0c.json @@ -0,0 +1,58 @@ +{ + "db_name": "MySQL", + "query": "SELECT Channel.id,\nUser.id AS user_id, User.username, User.display_name\nFROM DMChannelRecipient\nINNER JOIN Channel ON DMChannelRecipient.channel_id=Channel.id AND Channel.kind='DM'\nINNER JOIN DMChannelRecipient AS OtherRecipient ON Channel.id=OtherRecipient.channel_id AND OtherRecipient.user_id!=DMChannelRecipient.user_id\nINNER JOIN User ON OtherRecipient.user_id=User.id\nWHERE DMChannelRecipient.user_id = ?\n", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "id", + "type_info": { + "type": "LongLong", + "flags": "NOT_NULL | PRIMARY_KEY | UNSIGNED | NO_DEFAULT_VALUE", + "char_set": 63, + "max_size": 20 + } + }, + { + "ordinal": 1, + "name": "user_id", + "type_info": { + "type": "LongLong", + "flags": "NOT_NULL | PRIMARY_KEY | UNSIGNED | NO_DEFAULT_VALUE", + "char_set": 63, + "max_size": 20 + } + }, + { + "ordinal": 2, + "name": "username", + "type_info": { + "type": "VarString", + "flags": "NOT_NULL | UNIQUE_KEY | MULTIPLE_KEY | NO_DEFAULT_VALUE", + "char_set": 224, + "max_size": 128 + } + }, + { + "ordinal": 3, + "name": "display_name", + "type_info": { + "type": "VarString", + "flags": "", + "char_set": 224, + "max_size": 128 + } + } + ], + "parameters": { + "Right": 1 + }, + "nullable": [ + false, + false, + false, + true + ] + }, + "hash": "0949aee2ce7773a8245b1e90637fdf897fe5217040d424f2a8743336207c9d0c" +} diff --git a/.sqlx/query-0955856e4a2e56bbc5f44868eca124e7b3d9110296eabbc436f88bdec9ae99b1.json b/.sqlx/query-0955856e4a2e56bbc5f44868eca124e7b3d9110296eabbc436f88bdec9ae99b1.json new file mode 100644 index 0000000..baca3af --- /dev/null +++ b/.sqlx/query-0955856e4a2e56bbc5f44868eca124e7b3d9110296eabbc436f88bdec9ae99b1.json @@ -0,0 +1,12 @@ +{ + "db_name": "MySQL", + "query": "INSERT INTO User (id, username, display_name, password, email, email_verified) VALUES (?, ?, ?, ?, ?, FALSE)", + "describe": { + "columns": [], + "parameters": { + "Right": 5 + }, + "nullable": [] + }, + "hash": "0955856e4a2e56bbc5f44868eca124e7b3d9110296eabbc436f88bdec9ae99b1" +} diff --git a/.sqlx/query-09bfba968aa011c80fba2ed63e0c594a72d4750a8fbab81195c9a0f1e24e7df2.json b/.sqlx/query-09bfba968aa011c80fba2ed63e0c594a72d4750a8fbab81195c9a0f1e24e7df2.json new file mode 100644 index 0000000..c794f21 --- /dev/null +++ b/.sqlx/query-09bfba968aa011c80fba2ed63e0c594a72d4750a8fbab81195c9a0f1e24e7df2.json @@ -0,0 +1,12 @@ +{ + "db_name": "MySQL", + "query": "INSERT INTO ServerMember (server_id, user_id, created_at, nickname) VALUES (?, ?, ?, NULL)", + "describe": { + "columns": [], + "parameters": { + "Right": 3 + }, + "nullable": [] + }, + "hash": "09bfba968aa011c80fba2ed63e0c594a72d4750a8fbab81195c9a0f1e24e7df2" +} diff --git a/.sqlx/query-0b1e2c01e3567fc1a96c119dd14fb56ad6d17b589c7d4cfde4e112691db4c7e7.json b/.sqlx/query-0b1e2c01e3567fc1a96c119dd14fb56ad6d17b589c7d4cfde4e112691db4c7e7.json new file mode 100644 index 0000000..d3ff5b3 --- /dev/null +++ b/.sqlx/query-0b1e2c01e3567fc1a96c119dd14fb56ad6d17b589c7d4cfde4e112691db4c7e7.json @@ -0,0 +1,12 @@ +{ + "db_name": "MySQL", + "query": "INSERT INTO Channel (id, name, kind, server_id) VALUES (?, 'general', 'text', ?)", + "describe": { + "columns": [], + "parameters": { + "Right": 2 + }, + "nullable": [] + }, + "hash": "0b1e2c01e3567fc1a96c119dd14fb56ad6d17b589c7d4cfde4e112691db4c7e7" +} diff --git a/.sqlx/query-10e51d6c003b25695791f0d38ab9da169ab90c91f7abed3b239d59036429d61a.json b/.sqlx/query-10e51d6c003b25695791f0d38ab9da169ab90c91f7abed3b239d59036429d61a.json new file mode 100644 index 0000000..ce83f8c --- /dev/null +++ b/.sqlx/query-10e51d6c003b25695791f0d38ab9da169ab90c91f7abed3b239d59036429d61a.json @@ -0,0 +1,25 @@ +{ + "db_name": "MySQL", + "query": "\nSELECT EXISTS(\n SELECT 1\n FROM (\n SELECT sender_id, receiver_id FROM UserFriendRequest\n UNION\n SELECT user_id AS `sender_id`, friend_id AS `receiver_id` FROM UserFriend\n ) AS Friend\n WHERE (sender_id, receiver_id) = (?, ?) OR (sender_id, receiver_id) = (?, ?)\n) AS `exists: bool`", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "exists: bool", + "type_info": { + "type": "Long", + "flags": "NOT_NULL | BINARY", + "char_set": 63, + "max_size": 1 + } + } + ], + "parameters": { + "Right": 4 + }, + "nullable": [ + false + ] + }, + "hash": "10e51d6c003b25695791f0d38ab9da169ab90c91f7abed3b239d59036429d61a" +} diff --git a/packages/server/.sqlx/query-644fc033697d3a72a7f96cb2da9e8828132e7e21340df5c88cfce7423fb39222.json b/.sqlx/query-12d94b8b6b08a56cbff90c854c19585c34b72f956ecad9b4d4ec068d6fa25a05.json similarity index 67% rename from packages/server/.sqlx/query-644fc033697d3a72a7f96cb2da9e8828132e7e21340df5c88cfce7423fb39222.json rename to .sqlx/query-12d94b8b6b08a56cbff90c854c19585c34b72f956ecad9b4d4ec068d6fa25a05.json index af434fd..366ed75 100644 --- a/packages/server/.sqlx/query-644fc033697d3a72a7f96cb2da9e8828132e7e21340df5c88cfce7423fb39222.json +++ b/.sqlx/query-12d94b8b6b08a56cbff90c854c19585c34b72f956ecad9b4d4ec068d6fa25a05.json @@ -1,6 +1,6 @@ { "db_name": "MySQL", - "query": "SELECT Invite.id, Invite.created_at, Invite.expires_at, Invite.server_id, Server.created_at AS server_created_at, Server.name AS server_name, Server.owner_id AS server_owner_id FROM Invite INNER JOIN Server ON Server.id = Invite.server_id WHERE Invite.id = ?", + "query": "SELECT ServerInvite.id, ServerInvite.created_at, ServerInvite.expires_at, Server.id AS `server_id`, Server.owner_id, Server.name FROM ServerInvite INNER JOIN Server ON Server.id=ServerInvite.server_id WHERE ServerInvite.id = ? AND ServerInvite.expires_at > NOW()", "describe": { "columns": [ { @@ -38,40 +38,30 @@ "name": "server_id", "type_info": { "type": "LongLong", - "flags": "NOT_NULL | MULTIPLE_KEY | UNSIGNED | NO_DEFAULT_VALUE", + "flags": "NOT_NULL | PRIMARY_KEY | UNSIGNED | NO_DEFAULT_VALUE", "char_set": 63, "max_size": 20 } }, { "ordinal": 4, - "name": "server_created_at", + "name": "owner_id", "type_info": { - "type": "Timestamp", - "flags": "NOT_NULL | UNSIGNED | BINARY | TIMESTAMP", + "type": "LongLong", + "flags": "NOT_NULL | MULTIPLE_KEY | UNSIGNED | NO_DEFAULT_VALUE", "char_set": 63, - "max_size": 19 + "max_size": 20 } }, { "ordinal": 5, - "name": "server_name", + "name": "name", "type_info": { "type": "VarString", "flags": "NOT_NULL | NO_DEFAULT_VALUE", "char_set": 224, "max_size": 128 } - }, - { - "ordinal": 6, - "name": "server_owner_id", - "type_info": { - "type": "LongLong", - "flags": "NOT_NULL | MULTIPLE_KEY | UNSIGNED | NO_DEFAULT_VALUE", - "char_set": 63, - "max_size": 20 - } } ], "parameters": { @@ -83,9 +73,8 @@ false, false, false, - false, false ] }, - "hash": "644fc033697d3a72a7f96cb2da9e8828132e7e21340df5c88cfce7423fb39222" + "hash": "12d94b8b6b08a56cbff90c854c19585c34b72f956ecad9b4d4ec068d6fa25a05" } diff --git a/.sqlx/query-1aca019b87ce49e2205d705156a9713f91cb90da656e75ad8dd4bcba276e5cf6.json b/.sqlx/query-1aca019b87ce49e2205d705156a9713f91cb90da656e75ad8dd4bcba276e5cf6.json new file mode 100644 index 0000000..8b874e5 --- /dev/null +++ b/.sqlx/query-1aca019b87ce49e2205d705156a9713f91cb90da656e75ad8dd4bcba276e5cf6.json @@ -0,0 +1,91 @@ +{ + "db_name": "MySQL", + "query": "SELECT UserFriendRequest.sender_id, UserFriendRequest.receiver_id, UserFriendRequest.created_at,\nSender.username AS `sender_username`, Sender.display_name AS `sender_display_name`,\nReceiver.username AS `receiver_username`, Receiver.display_name AS `receiver_display_name`\nFROM UserFriendRequest\nINNER JOIN User AS Sender ON UserFriendRequest.sender_id=Sender.id\nINNER JOIN User AS Receiver ON UserFriendRequest.receiver_id=Receiver.id\nWHERE ? IN (UserFriendRequest.sender_id, UserFriendRequest.receiver_id)\n", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "sender_id", + "type_info": { + "type": "LongLong", + "flags": "NOT_NULL | PRIMARY_KEY | UNSIGNED | NO_DEFAULT_VALUE", + "char_set": 63, + "max_size": 20 + } + }, + { + "ordinal": 1, + "name": "receiver_id", + "type_info": { + "type": "LongLong", + "flags": "NOT_NULL | PRIMARY_KEY | MULTIPLE_KEY | UNSIGNED | NO_DEFAULT_VALUE", + "char_set": 63, + "max_size": 20 + } + }, + { + "ordinal": 2, + "name": "created_at", + "type_info": { + "type": "Timestamp", + "flags": "NOT_NULL | UNSIGNED | BINARY | TIMESTAMP", + "char_set": 63, + "max_size": 19 + } + }, + { + "ordinal": 3, + "name": "sender_username", + "type_info": { + "type": "VarString", + "flags": "NOT_NULL | UNIQUE_KEY | MULTIPLE_KEY | NO_DEFAULT_VALUE", + "char_set": 224, + "max_size": 128 + } + }, + { + "ordinal": 4, + "name": "sender_display_name", + "type_info": { + "type": "VarString", + "flags": "", + "char_set": 224, + "max_size": 128 + } + }, + { + "ordinal": 5, + "name": "receiver_username", + "type_info": { + "type": "VarString", + "flags": "NOT_NULL | UNIQUE_KEY | MULTIPLE_KEY | NO_DEFAULT_VALUE", + "char_set": 224, + "max_size": 128 + } + }, + { + "ordinal": 6, + "name": "receiver_display_name", + "type_info": { + "type": "VarString", + "flags": "", + "char_set": 224, + "max_size": 128 + } + } + ], + "parameters": { + "Right": 1 + }, + "nullable": [ + false, + false, + false, + false, + true, + false, + true + ] + }, + "hash": "1aca019b87ce49e2205d705156a9713f91cb90da656e75ad8dd4bcba276e5cf6" +} diff --git a/.sqlx/query-1ae849ba28c57de83c96018d91af9c49a9a78debd9f0ff7c8c2b8261f837c955.json b/.sqlx/query-1ae849ba28c57de83c96018d91af9c49a9a78debd9f0ff7c8c2b8261f837c955.json new file mode 100644 index 0000000..4ed493c --- /dev/null +++ b/.sqlx/query-1ae849ba28c57de83c96018d91af9c49a9a78debd9f0ff7c8c2b8261f837c955.json @@ -0,0 +1,12 @@ +{ + "db_name": "MySQL", + "query": "DELETE ClientUserTokens FROM ClientUserTokens INNER JOIN AuthorizationCode ON AuthorizationCode.id=ClientUserTokens.auth_code WHERE ClientUserTokens.auth_code = ? AND AuthorizationCode.expires_at > NOW()", + "describe": { + "columns": [], + "parameters": { + "Right": 1 + }, + "nullable": [] + }, + "hash": "1ae849ba28c57de83c96018d91af9c49a9a78debd9f0ff7c8c2b8261f837c955" +} diff --git a/.sqlx/query-1bdc5392e6b2df0e16ef24cba88d523877ad1b15f458a6b04df847a968b3c969.json b/.sqlx/query-1bdc5392e6b2df0e16ef24cba88d523877ad1b15f458a6b04df847a968b3c969.json new file mode 100644 index 0000000..31d7b19 --- /dev/null +++ b/.sqlx/query-1bdc5392e6b2df0e16ef24cba88d523877ad1b15f458a6b04df847a968b3c969.json @@ -0,0 +1,102 @@ +{ + "db_name": "MySQL", + "query": "SELECT UserFriend.friend_id, UserFriend.user_id, UserFriend.created_at,\nFriend.username AS `friend_username`, Friend.display_name AS `friend_display_name`,\nUser.username AS `user_username`, User.display_name AS `user_display_name`,\nChannel.id AS `channel_id`\nFROM UserFriend\nINNER JOIN User AS Friend ON UserFriend.friend_id=Friend.id\nINNER JOIN User ON UserFriend.user_id=User.id\nINNER JOIN DMChannelRecipient AS UserRecipient ON UserRecipient.user_id=User.id\nINNER JOIN DMChannelRecipient AS FriendRecipient ON FriendRecipient.user_id=Friend.id\nINNER JOIN Channel ON UserRecipient.channel_id=Channel.id AND FriendRecipient.channel_id=Channel.id\nWHERE ? IN (UserFriend.user_id, UserFriend.friend_id) AND Channel.kind = 'DM'\n", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "friend_id", + "type_info": { + "type": "LongLong", + "flags": "NOT_NULL | PRIMARY_KEY | MULTIPLE_KEY | UNSIGNED | NO_DEFAULT_VALUE", + "char_set": 63, + "max_size": 20 + } + }, + { + "ordinal": 1, + "name": "user_id", + "type_info": { + "type": "LongLong", + "flags": "NOT_NULL | PRIMARY_KEY | UNSIGNED | NO_DEFAULT_VALUE", + "char_set": 63, + "max_size": 20 + } + }, + { + "ordinal": 2, + "name": "created_at", + "type_info": { + "type": "Timestamp", + "flags": "NOT_NULL | UNSIGNED | BINARY | TIMESTAMP", + "char_set": 63, + "max_size": 19 + } + }, + { + "ordinal": 3, + "name": "friend_username", + "type_info": { + "type": "VarString", + "flags": "NOT_NULL | UNIQUE_KEY | MULTIPLE_KEY | NO_DEFAULT_VALUE", + "char_set": 224, + "max_size": 128 + } + }, + { + "ordinal": 4, + "name": "friend_display_name", + "type_info": { + "type": "VarString", + "flags": "", + "char_set": 224, + "max_size": 128 + } + }, + { + "ordinal": 5, + "name": "user_username", + "type_info": { + "type": "VarString", + "flags": "NOT_NULL | UNIQUE_KEY | MULTIPLE_KEY | NO_DEFAULT_VALUE", + "char_set": 224, + "max_size": 128 + } + }, + { + "ordinal": 6, + "name": "user_display_name", + "type_info": { + "type": "VarString", + "flags": "", + "char_set": 224, + "max_size": 128 + } + }, + { + "ordinal": 7, + "name": "channel_id", + "type_info": { + "type": "LongLong", + "flags": "NOT_NULL | PRIMARY_KEY | UNSIGNED | NO_DEFAULT_VALUE", + "char_set": 63, + "max_size": 20 + } + } + ], + "parameters": { + "Right": 1 + }, + "nullable": [ + false, + false, + false, + false, + true, + false, + true, + false + ] + }, + "hash": "1bdc5392e6b2df0e16ef24cba88d523877ad1b15f458a6b04df847a968b3c969" +} diff --git a/packages/server/.sqlx/query-181f229d243cae535444392f042aa4f73f09bb649650ddd5ba5abee87c9ba3ab.json b/.sqlx/query-20ae2fe678989904913788809caf3382ca996e22cbb9e827465dcdfc0624a9df.json similarity index 63% rename from packages/server/.sqlx/query-181f229d243cae535444392f042aa4f73f09bb649650ddd5ba5abee87c9ba3ab.json rename to .sqlx/query-20ae2fe678989904913788809caf3382ca996e22cbb9e827465dcdfc0624a9df.json index 7c5380e..e1f2523 100644 --- a/packages/server/.sqlx/query-181f229d243cae535444392f042aa4f73f09bb649650ddd5ba5abee87c9ba3ab.json +++ b/.sqlx/query-20ae2fe678989904913788809caf3382ca996e22cbb9e827465dcdfc0624a9df.json @@ -1,6 +1,6 @@ { "db_name": "MySQL", - "query": "SELECT id, created_at, name, owner_id FROM Server WHERE id = ?", + "query": "SELECT Server.id, Server.name, Server.owner_id FROM Server INNER JOIN ServerMember ON Server.id=ServerMember.server_id WHERE ServerMember.user_id = ?", "describe": { "columns": [ { @@ -8,23 +8,13 @@ "name": "id", "type_info": { "type": "LongLong", - "flags": "NOT_NULL | PRIMARY_KEY | UNSIGNED | AUTO_INCREMENT", + "flags": "NOT_NULL | PRIMARY_KEY | UNSIGNED | NO_DEFAULT_VALUE", "char_set": 63, "max_size": 20 } }, { "ordinal": 1, - "name": "created_at", - "type_info": { - "type": "Timestamp", - "flags": "NOT_NULL | UNSIGNED | BINARY | TIMESTAMP", - "char_set": 63, - "max_size": 19 - } - }, - { - "ordinal": 2, "name": "name", "type_info": { "type": "VarString", @@ -34,7 +24,7 @@ } }, { - "ordinal": 3, + "ordinal": 2, "name": "owner_id", "type_info": { "type": "LongLong", @@ -48,11 +38,10 @@ "Right": 1 }, "nullable": [ - false, false, false, false ] }, - "hash": "181f229d243cae535444392f042aa4f73f09bb649650ddd5ba5abee87c9ba3ab" + "hash": "20ae2fe678989904913788809caf3382ca996e22cbb9e827465dcdfc0624a9df" } diff --git a/.sqlx/query-215f5cb12815cea5f637e1b962d54142121b29cf9f4dd38b8d9ea93f25a79603.json b/.sqlx/query-215f5cb12815cea5f637e1b962d54142121b29cf9f4dd38b8d9ea93f25a79603.json new file mode 100644 index 0000000..56665d9 --- /dev/null +++ b/.sqlx/query-215f5cb12815cea5f637e1b962d54142121b29cf9f4dd38b8d9ea93f25a79603.json @@ -0,0 +1,25 @@ +{ + "db_name": "MySQL", + "query": "SELECT Server.owner_id FROM ServerMember INNER JOIN Server ON ServerMember.server_id=Server.id WHERE ServerMember.user_id = ? AND ServerMember.server_id = ?", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "owner_id", + "type_info": { + "type": "LongLong", + "flags": "NOT_NULL | MULTIPLE_KEY | UNSIGNED | NO_DEFAULT_VALUE", + "char_set": 63, + "max_size": 20 + } + } + ], + "parameters": { + "Right": 2 + }, + "nullable": [ + false + ] + }, + "hash": "215f5cb12815cea5f637e1b962d54142121b29cf9f4dd38b8d9ea93f25a79603" +} diff --git a/.sqlx/query-29e0f35feb6b078a4c44486bd8892924ba9acf9b15f276356de0d658c4cb71b7.json b/.sqlx/query-29e0f35feb6b078a4c44486bd8892924ba9acf9b15f276356de0d658c4cb71b7.json new file mode 100644 index 0000000..b440723 --- /dev/null +++ b/.sqlx/query-29e0f35feb6b078a4c44486bd8892924ba9acf9b15f276356de0d658c4cb71b7.json @@ -0,0 +1,36 @@ +{ + "db_name": "MySQL", + "query": "SELECT username, display_name FROM User WHERE id = ?", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "username", + "type_info": { + "type": "VarString", + "flags": "NOT_NULL | UNIQUE_KEY | MULTIPLE_KEY | NO_DEFAULT_VALUE", + "char_set": 224, + "max_size": 128 + } + }, + { + "ordinal": 1, + "name": "display_name", + "type_info": { + "type": "VarString", + "flags": "", + "char_set": 224, + "max_size": 128 + } + } + ], + "parameters": { + "Right": 1 + }, + "nullable": [ + false, + true + ] + }, + "hash": "29e0f35feb6b078a4c44486bd8892924ba9acf9b15f276356de0d658c4cb71b7" +} diff --git a/.sqlx/query-31fac37d150d480f1c70ef7fa0cbaed58acbd14eea3904e1a7c8676510694f0c.json b/.sqlx/query-31fac37d150d480f1c70ef7fa0cbaed58acbd14eea3904e1a7c8676510694f0c.json new file mode 100644 index 0000000..6ad6991 --- /dev/null +++ b/.sqlx/query-31fac37d150d480f1c70ef7fa0cbaed58acbd14eea3904e1a7c8676510694f0c.json @@ -0,0 +1,12 @@ +{ + "db_name": "MySQL", + "query": "INSERT INTO UserSession (id, user_id, created_at, expires_at) VALUES (?, ?, DEFAULT, DEFAULT)", + "describe": { + "columns": [], + "parameters": { + "Right": 2 + }, + "nullable": [] + }, + "hash": "31fac37d150d480f1c70ef7fa0cbaed58acbd14eea3904e1a7c8676510694f0c" +} diff --git a/.sqlx/query-3610f699fd0296befa4467cec376307165797622553871088e8452e6ea061dcd.json b/.sqlx/query-3610f699fd0296befa4467cec376307165797622553871088e8452e6ea061dcd.json new file mode 100644 index 0000000..0f0e1b9 --- /dev/null +++ b/.sqlx/query-3610f699fd0296befa4467cec376307165797622553871088e8452e6ea061dcd.json @@ -0,0 +1,12 @@ +{ + "db_name": "MySQL", + "query": "INSERT INTO Client (id, name, secret, owner_id, client_uri, tos_uri, policy_uri) VALUES (?, ?, ?, ?, ?, ?, ?)", + "describe": { + "columns": [], + "parameters": { + "Right": 7 + }, + "nullable": [] + }, + "hash": "3610f699fd0296befa4467cec376307165797622553871088e8452e6ea061dcd" +} diff --git a/.sqlx/query-3955eda5ad8eef747b7903d116d598da81337a0c59c814f30daa2ad63c3fbd16.json b/.sqlx/query-3955eda5ad8eef747b7903d116d598da81337a0c59c814f30daa2ad63c3fbd16.json new file mode 100644 index 0000000..60f0024 --- /dev/null +++ b/.sqlx/query-3955eda5ad8eef747b7903d116d598da81337a0c59c814f30daa2ad63c3fbd16.json @@ -0,0 +1,36 @@ +{ + "db_name": "MySQL", + "query": "SELECT ServerMember.server_id, DMChannelRecipient.user_id\nFROM Channel\nLEFT JOIN ServerMember ON ServerMember.server_id=Channel.server_id AND ServerMember.user_id=?\nLEFT JOIN DMChannelRecipient ON DMChannelRecipient.channel_id=Channel.id\nWHERE Channel.id = ?\n", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "server_id", + "type_info": { + "type": "LongLong", + "flags": "PRIMARY_KEY | UNSIGNED | NO_DEFAULT_VALUE", + "char_set": 63, + "max_size": 20 + } + }, + { + "ordinal": 1, + "name": "user_id", + "type_info": { + "type": "LongLong", + "flags": "PRIMARY_KEY | MULTIPLE_KEY | UNSIGNED | NO_DEFAULT_VALUE", + "char_set": 63, + "max_size": 20 + } + } + ], + "parameters": { + "Right": 2 + }, + "nullable": [ + true, + true + ] + }, + "hash": "3955eda5ad8eef747b7903d116d598da81337a0c59c814f30daa2ad63c3fbd16" +} diff --git a/.sqlx/query-3aaaa344b8ff6ff2e9744f97a6da9f9947ba7eef22e4a256fdf850b3b2835ed9.json b/.sqlx/query-3aaaa344b8ff6ff2e9744f97a6da9f9947ba7eef22e4a256fdf850b3b2835ed9.json new file mode 100644 index 0000000..6227a80 --- /dev/null +++ b/.sqlx/query-3aaaa344b8ff6ff2e9744f97a6da9f9947ba7eef22e4a256fdf850b3b2835ed9.json @@ -0,0 +1,12 @@ +{ + "db_name": "MySQL", + "query": "DELETE FROM UserSession WHERE user_id = ?", + "describe": { + "columns": [], + "parameters": { + "Right": 1 + }, + "nullable": [] + }, + "hash": "3aaaa344b8ff6ff2e9744f97a6da9f9947ba7eef22e4a256fdf850b3b2835ed9" +} diff --git a/.sqlx/query-417fa5983fa6b2f9ccf5d942b8b2f0435371ea0d33e7ed3097d728cef572c10d.json b/.sqlx/query-417fa5983fa6b2f9ccf5d942b8b2f0435371ea0d33e7ed3097d728cef572c10d.json new file mode 100644 index 0000000..165e080 --- /dev/null +++ b/.sqlx/query-417fa5983fa6b2f9ccf5d942b8b2f0435371ea0d33e7ed3097d728cef572c10d.json @@ -0,0 +1,36 @@ +{ + "db_name": "MySQL", + "query": "SELECT name, owner_id FROM Server WHERE id = ?", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "name", + "type_info": { + "type": "VarString", + "flags": "NOT_NULL | NO_DEFAULT_VALUE", + "char_set": 224, + "max_size": 128 + } + }, + { + "ordinal": 1, + "name": "owner_id", + "type_info": { + "type": "LongLong", + "flags": "NOT_NULL | MULTIPLE_KEY | UNSIGNED | NO_DEFAULT_VALUE", + "char_set": 63, + "max_size": 20 + } + } + ], + "parameters": { + "Right": 1 + }, + "nullable": [ + false, + false + ] + }, + "hash": "417fa5983fa6b2f9ccf5d942b8b2f0435371ea0d33e7ed3097d728cef572c10d" +} diff --git a/.sqlx/query-4324b799aa733af47731f98be449415af3d98abeda8c50383f289a058d30adc5.json b/.sqlx/query-4324b799aa733af47731f98be449415af3d98abeda8c50383f289a058d30adc5.json new file mode 100644 index 0000000..c3ff6a9 --- /dev/null +++ b/.sqlx/query-4324b799aa733af47731f98be449415af3d98abeda8c50383f289a058d30adc5.json @@ -0,0 +1,47 @@ +{ + "db_name": "MySQL", + "query": "SELECT id, username, display_name FROM User WHERE username = ?", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "id", + "type_info": { + "type": "LongLong", + "flags": "NOT_NULL | PRIMARY_KEY | UNSIGNED | NO_DEFAULT_VALUE", + "char_set": 63, + "max_size": 20 + } + }, + { + "ordinal": 1, + "name": "username", + "type_info": { + "type": "VarString", + "flags": "NOT_NULL | UNIQUE_KEY | MULTIPLE_KEY | NO_DEFAULT_VALUE", + "char_set": 224, + "max_size": 128 + } + }, + { + "ordinal": 2, + "name": "display_name", + "type_info": { + "type": "VarString", + "flags": "", + "char_set": 224, + "max_size": 128 + } + } + ], + "parameters": { + "Right": 1 + }, + "nullable": [ + false, + false, + true + ] + }, + "hash": "4324b799aa733af47731f98be449415af3d98abeda8c50383f289a058d30adc5" +} diff --git a/.sqlx/query-45477d8169340f5ccec75d4bd3b3eaf8b7bae5d994ee51b7d968997f0baa9a0c.json b/.sqlx/query-45477d8169340f5ccec75d4bd3b3eaf8b7bae5d994ee51b7d968997f0baa9a0c.json new file mode 100644 index 0000000..3af7e93 --- /dev/null +++ b/.sqlx/query-45477d8169340f5ccec75d4bd3b3eaf8b7bae5d994ee51b7d968997f0baa9a0c.json @@ -0,0 +1,25 @@ +{ + "db_name": "MySQL", + "query": "SELECT EXISTS(SELECT 1 FROM ServerMember WHERE server_id = ? AND user_id = ?) AS `exists: bool`", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "exists: bool", + "type_info": { + "type": "Long", + "flags": "NOT_NULL | BINARY", + "char_set": 63, + "max_size": 1 + } + } + ], + "parameters": { + "Right": 2 + }, + "nullable": [ + false + ] + }, + "hash": "45477d8169340f5ccec75d4bd3b3eaf8b7bae5d994ee51b7d968997f0baa9a0c" +} diff --git a/packages/server/.sqlx/query-51eb3bf9c3171a56e3428fa989cbe056e84126e7d3a3c56130903e3b6a238cca.json b/.sqlx/query-463cdd552772f40da789d359d1a15792c9a9abe255a3e3f3b80fee5247bf8230.json similarity index 53% rename from packages/server/.sqlx/query-51eb3bf9c3171a56e3428fa989cbe056e84126e7d3a3c56130903e3b6a238cca.json rename to .sqlx/query-463cdd552772f40da789d359d1a15792c9a9abe255a3e3f3b80fee5247bf8230.json index 916872b..65caaea 100644 --- a/packages/server/.sqlx/query-51eb3bf9c3171a56e3428fa989cbe056e84126e7d3a3c56130903e3b6a238cca.json +++ b/.sqlx/query-463cdd552772f40da789d359d1a15792c9a9abe255a3e3f3b80fee5247bf8230.json @@ -1,16 +1,16 @@ { "db_name": "MySQL", - "query": "SELECT COUNT(*) AS count FROM Channel WHERE server_id = ?", + "query": "SELECT COUNT(*) > 200 AS `over_limit: bool` FROM Channel WHERE server_id = ?", "describe": { "columns": [ { "ordinal": 0, - "name": "count", + "name": "over_limit: bool", "type_info": { - "type": "LongLong", + "type": "Long", "flags": "NOT_NULL | BINARY", "char_set": 63, - "max_size": 21 + "max_size": 1 } } ], @@ -21,5 +21,5 @@ false ] }, - "hash": "51eb3bf9c3171a56e3428fa989cbe056e84126e7d3a3c56130903e3b6a238cca" + "hash": "463cdd552772f40da789d359d1a15792c9a9abe255a3e3f3b80fee5247bf8230" } diff --git a/.sqlx/query-494df8247ee42becde92381c79ea1dec82baaecdc1b194501ae77472d10c0508.json b/.sqlx/query-494df8247ee42becde92381c79ea1dec82baaecdc1b194501ae77472d10c0508.json new file mode 100644 index 0000000..2f0c80c --- /dev/null +++ b/.sqlx/query-494df8247ee42becde92381c79ea1dec82baaecdc1b194501ae77472d10c0508.json @@ -0,0 +1,25 @@ +{ + "db_name": "MySQL", + "query": "SELECT EXISTS(SELECT 1 FROM Client WHERE id = ? AND secret = ?) AS `exists: bool`", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "exists: bool", + "type_info": { + "type": "Long", + "flags": "NOT_NULL | BINARY", + "char_set": 63, + "max_size": 1 + } + } + ], + "parameters": { + "Right": 2 + }, + "nullable": [ + false + ] + }, + "hash": "494df8247ee42becde92381c79ea1dec82baaecdc1b194501ae77472d10c0508" +} diff --git a/.sqlx/query-506e8eb87903ad88683a893d235f1174064e8944c10c0ee614435a95c5226be2.json b/.sqlx/query-506e8eb87903ad88683a893d235f1174064e8944c10c0ee614435a95c5226be2.json new file mode 100644 index 0000000..144e6f4 --- /dev/null +++ b/.sqlx/query-506e8eb87903ad88683a893d235f1174064e8944c10c0ee614435a95c5226be2.json @@ -0,0 +1,12 @@ +{ + "db_name": "MySQL", + "query": "INSERT INTO Server (id, owner_id, name) VALUES (?, ?, ?)", + "describe": { + "columns": [], + "parameters": { + "Right": 3 + }, + "nullable": [] + }, + "hash": "506e8eb87903ad88683a893d235f1174064e8944c10c0ee614435a95c5226be2" +} diff --git a/.sqlx/query-5593cf60b802c9bfe23b8d30d0cf2be476722a63cf7d35c0eaece691c8df75f0.json b/.sqlx/query-5593cf60b802c9bfe23b8d30d0cf2be476722a63cf7d35c0eaece691c8df75f0.json new file mode 100644 index 0000000..a584e5e --- /dev/null +++ b/.sqlx/query-5593cf60b802c9bfe23b8d30d0cf2be476722a63cf7d35c0eaece691c8df75f0.json @@ -0,0 +1,25 @@ +{ + "db_name": "MySQL", + "query": "\nSELECT ServerMember.user_id\nFROM ServerMember\nINNER JOIN ServerMember AS UpdatedUser ON ServerMember.user_id=?\nWHERE ServerMember.server_id=UpdatedUser.server_id\n\nUNION\n \nSELECT friend_id AS user_id\nFROM UserFriend\nWHERE user_id=?\n\nUNION\n\nSELECT user_id\nFROM UserFriend\nWHERE friend_id=?\n\nUNION\n\nSELECT receiver_id AS user_id\nFROM UserFriendRequest\nWHERE sender_id=?\n\nUNION\n\nSELECT sender_id AS user_id\nFROM UserFriendRequest\nWHERE receiver_id=?\n\nUNION\n\nSELECT Other.user_id\nFROM DMChannelRecipient\nINNER JOIN DMChannelRecipient AS Other ON DMChannelRecipient.channel_id=Other.channel_id\nWHERE DMChannelRecipient.user_id=?\n", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "user_id", + "type_info": { + "type": "LongLong", + "flags": "NOT_NULL | UNSIGNED", + "char_set": 63, + "max_size": 20 + } + } + ], + "parameters": { + "Right": 6 + }, + "nullable": [ + false + ] + }, + "hash": "5593cf60b802c9bfe23b8d30d0cf2be476722a63cf7d35c0eaece691c8df75f0" +} diff --git a/.sqlx/query-57b78a46153555423ed7adf65d805e37c69f6d7ea69185025278fe24c5be2977.json b/.sqlx/query-57b78a46153555423ed7adf65d805e37c69f6d7ea69185025278fe24c5be2977.json new file mode 100644 index 0000000..38641f0 --- /dev/null +++ b/.sqlx/query-57b78a46153555423ed7adf65d805e37c69f6d7ea69185025278fe24c5be2977.json @@ -0,0 +1,25 @@ +{ + "db_name": "MySQL", + "query": "SELECT EXISTS(SELECT 1 FROM Server WHERE id = ? AND owner_id = ?) AS `exists: bool`", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "exists: bool", + "type_info": { + "type": "Long", + "flags": "NOT_NULL | BINARY", + "char_set": 63, + "max_size": 1 + } + } + ], + "parameters": { + "Right": 2 + }, + "nullable": [ + false + ] + }, + "hash": "57b78a46153555423ed7adf65d805e37c69f6d7ea69185025278fe24c5be2977" +} diff --git a/packages/server/.sqlx/query-85324acc33dc436990380bfc4bcf60be6750bc256dab6122726f9c1459053552.json b/.sqlx/query-593d990d2c1244a9c29bba0f58b21ab07f735a7cdb9145192bb18b3ddb805160.json similarity index 67% rename from packages/server/.sqlx/query-85324acc33dc436990380bfc4bcf60be6750bc256dab6122726f9c1459053552.json rename to .sqlx/query-593d990d2c1244a9c29bba0f58b21ab07f735a7cdb9145192bb18b3ddb805160.json index 810e587..ed8872a 100644 --- a/packages/server/.sqlx/query-85324acc33dc436990380bfc4bcf60be6750bc256dab6122726f9c1459053552.json +++ b/.sqlx/query-593d990d2c1244a9c29bba0f58b21ab07f735a7cdb9145192bb18b3ddb805160.json @@ -1,11 +1,11 @@ { "db_name": "MySQL", - "query": "SELECT server_id FROM Member WHERE user_id = ?", + "query": "SELECT user_id FROM UserSession WHERE id = ? AND expires_at > NOW()", "describe": { "columns": [ { "ordinal": 0, - "name": "server_id", + "name": "user_id", "type_info": { "type": "LongLong", "flags": "NOT_NULL | MULTIPLE_KEY | UNSIGNED | NO_DEFAULT_VALUE", @@ -21,5 +21,5 @@ false ] }, - "hash": "85324acc33dc436990380bfc4bcf60be6750bc256dab6122726f9c1459053552" + "hash": "593d990d2c1244a9c29bba0f58b21ab07f735a7cdb9145192bb18b3ddb805160" } diff --git a/.sqlx/query-59e5735b40462b73e8a84f7bb46c4a65ecc63ef3ad21f36abf6d5629d32d9e38.json b/.sqlx/query-59e5735b40462b73e8a84f7bb46c4a65ecc63ef3ad21f36abf6d5629d32d9e38.json new file mode 100644 index 0000000..52cd170 --- /dev/null +++ b/.sqlx/query-59e5735b40462b73e8a84f7bb46c4a65ecc63ef3ad21f36abf6d5629d32d9e38.json @@ -0,0 +1,80 @@ +{ + "db_name": "MySQL", + "query": "SELECT Client.id, Client.name, Client.owner_id, Client.client_uri, Client.tos_uri, Client.policy_uri FROM Client INNER JOIN ClientRedirect ON ClientRedirect.client_id=Client.id WHERE Client.id = ? AND ClientRedirect.uri = ?", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "id", + "type_info": { + "type": "LongLong", + "flags": "NOT_NULL | PRIMARY_KEY | UNSIGNED | NO_DEFAULT_VALUE", + "char_set": 63, + "max_size": 20 + } + }, + { + "ordinal": 1, + "name": "name", + "type_info": { + "type": "VarString", + "flags": "NOT_NULL | NO_DEFAULT_VALUE", + "char_set": 224, + "max_size": 96 + } + }, + { + "ordinal": 2, + "name": "owner_id", + "type_info": { + "type": "LongLong", + "flags": "NOT_NULL | MULTIPLE_KEY | UNSIGNED | NO_DEFAULT_VALUE", + "char_set": 63, + "max_size": 20 + } + }, + { + "ordinal": 3, + "name": "client_uri", + "type_info": { + "type": "VarString", + "flags": "", + "char_set": 224, + "max_size": 1020 + } + }, + { + "ordinal": 4, + "name": "tos_uri", + "type_info": { + "type": "VarString", + "flags": "", + "char_set": 224, + "max_size": 1020 + } + }, + { + "ordinal": 5, + "name": "policy_uri", + "type_info": { + "type": "VarString", + "flags": "", + "char_set": 224, + "max_size": 1020 + } + } + ], + "parameters": { + "Right": 2 + }, + "nullable": [ + false, + false, + false, + true, + true, + true + ] + }, + "hash": "59e5735b40462b73e8a84f7bb46c4a65ecc63ef3ad21f36abf6d5629d32d9e38" +} diff --git a/.sqlx/query-603e81926c964ec6357013fa5e8ecd37705d700835ffc923f90bfe9d144bb47f.json b/.sqlx/query-603e81926c964ec6357013fa5e8ecd37705d700835ffc923f90bfe9d144bb47f.json new file mode 100644 index 0000000..10c2ec0 --- /dev/null +++ b/.sqlx/query-603e81926c964ec6357013fa5e8ecd37705d700835ffc923f90bfe9d144bb47f.json @@ -0,0 +1,102 @@ +{ + "db_name": "MySQL", + "query": "SELECT UserFriend.friend_id, UserFriend.user_id, UserFriend.created_at,\nFriend.username AS `friend_username`, Friend.display_name AS `friend_display_name`,\nUser.username AS `user_username`, User.display_name AS `user_display_name`,\nChannel.id AS `channel_id`\nFROM UserFriend\nINNER JOIN User AS Friend ON UserFriend.friend_id=Friend.id\nINNER JOIN User ON UserFriend.user_id=User.id\nINNER JOIN DMChannelRecipient AS UserRecipient ON UserRecipient.user_id=User.id\nINNER JOIN DMChannelRecipient AS FriendRecipient ON FriendRecipient.user_id=Friend.id\nINNER JOIN Channel ON UserRecipient.channel_id=Channel.id AND FriendRecipient.channel_id=Channel.id\nWHERE (UserFriend.user_id, UserFriend.friend_id) = (?, ?) OR (UserFriend.user_id, UserFriend.friend_id) = (?, ?) AND Channel.kind = 'DM'\n", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "friend_id", + "type_info": { + "type": "LongLong", + "flags": "NOT_NULL | PRIMARY_KEY | MULTIPLE_KEY | UNSIGNED | NO_DEFAULT_VALUE", + "char_set": 63, + "max_size": 20 + } + }, + { + "ordinal": 1, + "name": "user_id", + "type_info": { + "type": "LongLong", + "flags": "NOT_NULL | PRIMARY_KEY | UNSIGNED | NO_DEFAULT_VALUE", + "char_set": 63, + "max_size": 20 + } + }, + { + "ordinal": 2, + "name": "created_at", + "type_info": { + "type": "Timestamp", + "flags": "NOT_NULL | UNSIGNED | BINARY | TIMESTAMP", + "char_set": 63, + "max_size": 19 + } + }, + { + "ordinal": 3, + "name": "friend_username", + "type_info": { + "type": "VarString", + "flags": "NOT_NULL | UNIQUE_KEY | MULTIPLE_KEY | NO_DEFAULT_VALUE", + "char_set": 224, + "max_size": 128 + } + }, + { + "ordinal": 4, + "name": "friend_display_name", + "type_info": { + "type": "VarString", + "flags": "", + "char_set": 224, + "max_size": 128 + } + }, + { + "ordinal": 5, + "name": "user_username", + "type_info": { + "type": "VarString", + "flags": "NOT_NULL | UNIQUE_KEY | MULTIPLE_KEY | NO_DEFAULT_VALUE", + "char_set": 224, + "max_size": 128 + } + }, + { + "ordinal": 6, + "name": "user_display_name", + "type_info": { + "type": "VarString", + "flags": "", + "char_set": 224, + "max_size": 128 + } + }, + { + "ordinal": 7, + "name": "channel_id", + "type_info": { + "type": "LongLong", + "flags": "NOT_NULL | PRIMARY_KEY | UNSIGNED | NO_DEFAULT_VALUE", + "char_set": 63, + "max_size": 20 + } + } + ], + "parameters": { + "Right": 4 + }, + "nullable": [ + false, + false, + false, + false, + true, + false, + true, + false + ] + }, + "hash": "603e81926c964ec6357013fa5e8ecd37705d700835ffc923f90bfe9d144bb47f" +} diff --git a/.sqlx/query-652ebe8b6fd3a10a9ffbfb758508060f672903f8bf642588b629fd21fd834df4.json b/.sqlx/query-652ebe8b6fd3a10a9ffbfb758508060f672903f8bf642588b629fd21fd834df4.json new file mode 100644 index 0000000..f65ce1d --- /dev/null +++ b/.sqlx/query-652ebe8b6fd3a10a9ffbfb758508060f672903f8bf642588b629fd21fd834df4.json @@ -0,0 +1,12 @@ +{ + "db_name": "MySQL", + "query": "INSERT INTO UserFriendRequest (sender_id, receiver_id, created_at) VALUES (?, ?, ?)", + "describe": { + "columns": [], + "parameters": { + "Right": 3 + }, + "nullable": [] + }, + "hash": "652ebe8b6fd3a10a9ffbfb758508060f672903f8bf642588b629fd21fd834df4" +} diff --git a/.sqlx/query-681df428c25723edbdb6d884ecba8b3e5ab9467592c9411c5a41f2ea790dcd8c.json b/.sqlx/query-681df428c25723edbdb6d884ecba8b3e5ab9467592c9411c5a41f2ea790dcd8c.json new file mode 100644 index 0000000..08ee551 --- /dev/null +++ b/.sqlx/query-681df428c25723edbdb6d884ecba8b3e5ab9467592c9411c5a41f2ea790dcd8c.json @@ -0,0 +1,12 @@ +{ + "db_name": "MySQL", + "query": "UPDATE UserSession INNER JOIN User ON UserSession.user_id=User.id SET UserSession.expires_at = DEFAULT, User.began_deletion_at = NULL WHERE UserSession.id = ?", + "describe": { + "columns": [], + "parameters": { + "Right": 1 + }, + "nullable": [] + }, + "hash": "681df428c25723edbdb6d884ecba8b3e5ab9467592c9411c5a41f2ea790dcd8c" +} diff --git a/packages/server/.sqlx/query-ca6d4ddeaecaacc7278e3eeba53b64749d7dcb3d7454c5593815696ad02103f8.json b/.sqlx/query-6aa8ce1e6445559acb6879a1a8f4ce14a7e11bf493515d20ab376fe3e1dfee28.json similarity index 58% rename from packages/server/.sqlx/query-ca6d4ddeaecaacc7278e3eeba53b64749d7dcb3d7454c5593815696ad02103f8.json rename to .sqlx/query-6aa8ce1e6445559acb6879a1a8f4ce14a7e11bf493515d20ab376fe3e1dfee28.json index 3e1b4b2..b9fa768 100644 --- a/packages/server/.sqlx/query-ca6d4ddeaecaacc7278e3eeba53b64749d7dcb3d7454c5593815696ad02103f8.json +++ b/.sqlx/query-6aa8ce1e6445559acb6879a1a8f4ce14a7e11bf493515d20ab376fe3e1dfee28.json @@ -1,56 +1,56 @@ { "db_name": "MySQL", - "query": "SELECT id, created_at, name, kind AS `kind: _`, server_id FROM Channel WHERE server_id = ?", + "query": "SELECT Server.name, Server.owner_id, Channel.id, Channel.name AS `channel_name`, Channel.kind FROM Server LEFT JOIN Channel ON Server.id=Channel.server_id WHERE Server.id = ?", "describe": { "columns": [ { "ordinal": 0, - "name": "id", + "name": "name", "type_info": { - "type": "LongLong", - "flags": "NOT_NULL | PRIMARY_KEY | UNSIGNED | AUTO_INCREMENT", - "char_set": 63, - "max_size": 20 + "type": "VarString", + "flags": "NOT_NULL | NO_DEFAULT_VALUE", + "char_set": 224, + "max_size": 128 } }, { "ordinal": 1, - "name": "created_at", + "name": "owner_id", "type_info": { - "type": "Timestamp", - "flags": "NOT_NULL | UNSIGNED | BINARY | TIMESTAMP", + "type": "LongLong", + "flags": "NOT_NULL | MULTIPLE_KEY | UNSIGNED | NO_DEFAULT_VALUE", "char_set": 63, - "max_size": 19 + "max_size": 20 } }, { "ordinal": 2, - "name": "name", + "name": "id", "type_info": { - "type": "VarString", - "flags": "NOT_NULL | NO_DEFAULT_VALUE", - "char_set": 224, - "max_size": 128 + "type": "LongLong", + "flags": "PRIMARY_KEY | UNSIGNED | NO_DEFAULT_VALUE", + "char_set": 63, + "max_size": 20 } }, { "ordinal": 3, - "name": "kind: _", + "name": "channel_name", "type_info": { - "type": "String", - "flags": "NOT_NULL | ENUM | NO_DEFAULT_VALUE", + "type": "VarString", + "flags": "NO_DEFAULT_VALUE", "char_set": 224, - "max_size": 16 + "max_size": 128 } }, { "ordinal": 4, - "name": "server_id", + "name": "kind", "type_info": { - "type": "LongLong", - "flags": "MULTIPLE_KEY | UNSIGNED", - "char_set": 63, - "max_size": 20 + "type": "String", + "flags": "ENUM | NO_DEFAULT_VALUE", + "char_set": 224, + "max_size": 16 } } ], @@ -60,10 +60,10 @@ "nullable": [ false, false, - false, - false, + true, + true, true ] }, - "hash": "ca6d4ddeaecaacc7278e3eeba53b64749d7dcb3d7454c5593815696ad02103f8" + "hash": "6aa8ce1e6445559acb6879a1a8f4ce14a7e11bf493515d20ab376fe3e1dfee28" } diff --git a/packages/server/.sqlx/query-e4472712357e995b832ffb497ca2a822a7e330e13c03123cb55bfc2b3f5f6baa.json b/.sqlx/query-6b8c040e5c713053bb4fb1f755521c3e2965e3cf76ebf77a4859ac4a54257bc5.json similarity index 53% rename from packages/server/.sqlx/query-e4472712357e995b832ffb497ca2a822a7e330e13c03123cb55bfc2b3f5f6baa.json rename to .sqlx/query-6b8c040e5c713053bb4fb1f755521c3e2965e3cf76ebf77a4859ac4a54257bc5.json index 3579855..ae6ac2c 100644 --- a/packages/server/.sqlx/query-e4472712357e995b832ffb497ca2a822a7e330e13c03123cb55bfc2b3f5f6baa.json +++ b/.sqlx/query-6b8c040e5c713053bb4fb1f755521c3e2965e3cf76ebf77a4859ac4a54257bc5.json @@ -1,14 +1,14 @@ { "db_name": "MySQL", - "query": "SELECT user_id FROM ChannelRecipient WHERE channel_id = ?", + "query": "SELECT server_id FROM ServerMember WHERE user_id = ?", "describe": { "columns": [ { "ordinal": 0, - "name": "user_id", + "name": "server_id", "type_info": { "type": "LongLong", - "flags": "NOT_NULL | PRIMARY_KEY | MULTIPLE_KEY | UNSIGNED | NO_DEFAULT_VALUE", + "flags": "NOT_NULL | PRIMARY_KEY | UNSIGNED | NO_DEFAULT_VALUE", "char_set": 63, "max_size": 20 } @@ -21,5 +21,5 @@ false ] }, - "hash": "e4472712357e995b832ffb497ca2a822a7e330e13c03123cb55bfc2b3f5f6baa" + "hash": "6b8c040e5c713053bb4fb1f755521c3e2965e3cf76ebf77a4859ac4a54257bc5" } diff --git a/.sqlx/query-702ae047ce656f8899125e5228af616da3a5e67a68f313e7c027b645f64f9de0.json b/.sqlx/query-702ae047ce656f8899125e5228af616da3a5e67a68f313e7c027b645f64f9de0.json new file mode 100644 index 0000000..40a3994 --- /dev/null +++ b/.sqlx/query-702ae047ce656f8899125e5228af616da3a5e67a68f313e7c027b645f64f9de0.json @@ -0,0 +1,36 @@ +{ + "db_name": "MySQL", + "query": "SELECT client_id, scope FROM ClientToken WHERE access_token = ? AND expires_at > NOW()", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "client_id", + "type_info": { + "type": "LongLong", + "flags": "NOT_NULL | MULTIPLE_KEY | UNSIGNED | NO_DEFAULT_VALUE", + "char_set": 63, + "max_size": 20 + } + }, + { + "ordinal": 1, + "name": "scope", + "type_info": { + "type": "String", + "flags": "NOT_NULL | SET | NO_DEFAULT_VALUE", + "char_set": 224, + "max_size": 436 + } + } + ], + "parameters": { + "Right": 1 + }, + "nullable": [ + false, + false + ] + }, + "hash": "702ae047ce656f8899125e5228af616da3a5e67a68f313e7c027b645f64f9de0" +} diff --git a/.sqlx/query-777ef02ecb3aa6b48f81d4f42f239e97e118aebe7bc433620bf4a0505010415b.json b/.sqlx/query-777ef02ecb3aa6b48f81d4f42f239e97e118aebe7bc433620bf4a0505010415b.json new file mode 100644 index 0000000..9616088 --- /dev/null +++ b/.sqlx/query-777ef02ecb3aa6b48f81d4f42f239e97e118aebe7bc433620bf4a0505010415b.json @@ -0,0 +1,12 @@ +{ + "db_name": "MySQL", + "query": "INSERT INTO ClientToken (access_token, client_id, created_at, expires_at, scope) VALUES (?, ?, DEFAULT, DEFAULT, ?)", + "describe": { + "columns": [], + "parameters": { + "Right": 3 + }, + "nullable": [] + }, + "hash": "777ef02ecb3aa6b48f81d4f42f239e97e118aebe7bc433620bf4a0505010415b" +} diff --git a/packages/server/.sqlx/query-96516c3ed00a6a8d29d165b12d73a03f6ec6b0e8038effdb87eed16479a0fbca.json b/.sqlx/query-79f60517e18d2aecddc39df80951381fbf06db5798cf65b7803c5f5d3841df71.json similarity index 67% rename from packages/server/.sqlx/query-96516c3ed00a6a8d29d165b12d73a03f6ec6b0e8038effdb87eed16479a0fbca.json rename to .sqlx/query-79f60517e18d2aecddc39df80951381fbf06db5798cf65b7803c5f5d3841df71.json index bd1f6fe..aa3c83c 100644 --- a/packages/server/.sqlx/query-96516c3ed00a6a8d29d165b12d73a03f6ec6b0e8038effdb87eed16479a0fbca.json +++ b/.sqlx/query-79f60517e18d2aecddc39df80951381fbf06db5798cf65b7803c5f5d3841df71.json @@ -1,6 +1,6 @@ { "db_name": "MySQL", - "query": "SELECT id, created_at, expires_at, user_id FROM Session WHERE id = ?", + "query": "SELECT id, created_at, expires_at FROM ServerInvite WHERE server_id = ? AND expires_at > NOW()", "describe": { "columns": [ { @@ -32,27 +32,16 @@ "char_set": 63, "max_size": 19 } - }, - { - "ordinal": 3, - "name": "user_id", - "type_info": { - "type": "LongLong", - "flags": "NOT_NULL | MULTIPLE_KEY | UNSIGNED | NO_DEFAULT_VALUE", - "char_set": 63, - "max_size": 20 - } } ], "parameters": { "Right": 1 }, "nullable": [ - false, false, false, false ] }, - "hash": "96516c3ed00a6a8d29d165b12d73a03f6ec6b0e8038effdb87eed16479a0fbca" + "hash": "79f60517e18d2aecddc39df80951381fbf06db5798cf65b7803c5f5d3841df71" } diff --git a/packages/server/.sqlx/query-62f68b9d3b5d64c96789f2b1c7c47dc983a0078d2bb73e3349042e0585c0978c.json b/.sqlx/query-7ed2add29b1ffc7e16b9f059a9eb4778161294838d5d60c8a6803b8b6d5d3ab5.json similarity index 60% rename from packages/server/.sqlx/query-62f68b9d3b5d64c96789f2b1c7c47dc983a0078d2bb73e3349042e0585c0978c.json rename to .sqlx/query-7ed2add29b1ffc7e16b9f059a9eb4778161294838d5d60c8a6803b8b6d5d3ab5.json index 867a9b9..424d92c 100644 --- a/packages/server/.sqlx/query-62f68b9d3b5d64c96789f2b1c7c47dc983a0078d2bb73e3349042e0585c0978c.json +++ b/.sqlx/query-7ed2add29b1ffc7e16b9f059a9eb4778161294838d5d60c8a6803b8b6d5d3ab5.json @@ -1,6 +1,6 @@ { "db_name": "MySQL", - "query": "SELECT owner_id FROM Server WHERE id = ?", + "query": "SELECT Server.owner_id FROM Server INNER JOIN ServerMember ON ServerMember.server_id=Server.id AND ServerMember.user_id=? WHERE Server.id = ?", "describe": { "columns": [ { @@ -15,11 +15,11 @@ } ], "parameters": { - "Right": 1 + "Right": 2 }, "nullable": [ false ] }, - "hash": "62f68b9d3b5d64c96789f2b1c7c47dc983a0078d2bb73e3349042e0585c0978c" + "hash": "7ed2add29b1ffc7e16b9f059a9eb4778161294838d5d60c8a6803b8b6d5d3ab5" } diff --git a/.sqlx/query-7fac129bef12c554c5948b339c9b63d553ba82ab4e6f284d52f17b0a9ba028fd.json b/.sqlx/query-7fac129bef12c554c5948b339c9b63d553ba82ab4e6f284d52f17b0a9ba028fd.json new file mode 100644 index 0000000..555ff27 --- /dev/null +++ b/.sqlx/query-7fac129bef12c554c5948b339c9b63d553ba82ab4e6f284d52f17b0a9ba028fd.json @@ -0,0 +1,58 @@ +{ + "db_name": "MySQL", + "query": "SELECT user_id, scope, code_challenge, code_challenge_method FROM AuthorizationCode WHERE id = ? AND client_id = ? AND expires_at > NOW()", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "user_id", + "type_info": { + "type": "LongLong", + "flags": "NOT_NULL | MULTIPLE_KEY | UNSIGNED | NO_DEFAULT_VALUE", + "char_set": 63, + "max_size": 20 + } + }, + { + "ordinal": 1, + "name": "scope", + "type_info": { + "type": "String", + "flags": "NOT_NULL | SET | NO_DEFAULT_VALUE", + "char_set": 224, + "max_size": 436 + } + }, + { + "ordinal": 2, + "name": "code_challenge", + "type_info": { + "type": "VarString", + "flags": "", + "char_set": 224, + "max_size": 512 + } + }, + { + "ordinal": 3, + "name": "code_challenge_method", + "type_info": { + "type": "String", + "flags": "NOT_NULL | ENUM | NO_DEFAULT_VALUE", + "char_set": 224, + "max_size": 20 + } + } + ], + "parameters": { + "Right": 2 + }, + "nullable": [ + false, + false, + true, + false + ] + }, + "hash": "7fac129bef12c554c5948b339c9b63d553ba82ab4e6f284d52f17b0a9ba028fd" +} diff --git a/packages/server/.sqlx/query-78fab8bb99cf072b57792b69bb8ef625f419309c7aaecdf350ef97f5239abdeb.json b/.sqlx/query-80c3f7f9687fe09f2114d8e4ea63d03f59ac31cebb9e509494c82643a5b07f7f.json similarity index 54% rename from packages/server/.sqlx/query-78fab8bb99cf072b57792b69bb8ef625f419309c7aaecdf350ef97f5239abdeb.json rename to .sqlx/query-80c3f7f9687fe09f2114d8e4ea63d03f59ac31cebb9e509494c82643a5b07f7f.json index d64bb21..bcfbfbe 100644 --- a/packages/server/.sqlx/query-78fab8bb99cf072b57792b69bb8ef625f419309c7aaecdf350ef97f5239abdeb.json +++ b/.sqlx/query-80c3f7f9687fe09f2114d8e4ea63d03f59ac31cebb9e509494c82643a5b07f7f.json @@ -1,6 +1,6 @@ { "db_name": "MySQL", - "query": "SELECT Message.id, Message.created_at, Message.content, Message.kind AS `kind: _`, Message.channel_id, Message.user_id, User.created_at AS user_created_at, User.username AS user_username, Member.id as member_id, Member.created_at AS member_created_at, Member.server_id AS member_server_id, Member.nickname AS member_nickname FROM Message LEFT JOIN User ON User.id = Message.user_id LEFT JOIN Member ON Member.server_id = (SELECT server_id FROM Channel WHERE id = Message.channel_id) AND Member.user_id = Message.user_id WHERE Message.channel_id = ? AND Message.id < ? ORDER BY Message.id DESC LIMIT 100", + "query": "SELECT ChannelMessage.id, ChannelMessage.updated_at, ChannelMessage.content, ChannelMessage.kind, ChannelMessage.channel_id, ChannelMessage.user_id,\nUser.username, User.display_name,\nServerMember.nickname, ServerMember.created_at\nFROM ChannelMessage\nINNER JOIN User ON User.id=ChannelMessage.user_id\nLEFT JOIN ServerMember ON ServerMember.user_id=ChannelMessage.user_id AND ServerMember.server_id=?\nWHERE ChannelMessage.channel_id = ? AND ChannelMessage.id < ?\nORDER BY id DESC\nLIMIT ?\n", "describe": { "columns": [ { @@ -8,17 +8,17 @@ "name": "id", "type_info": { "type": "LongLong", - "flags": "NOT_NULL | PRIMARY_KEY | UNSIGNED | AUTO_INCREMENT", + "flags": "NOT_NULL | PRIMARY_KEY | UNSIGNED | NO_DEFAULT_VALUE", "char_set": 63, "max_size": 20 } }, { "ordinal": 1, - "name": "created_at", + "name": "updated_at", "type_info": { "type": "Timestamp", - "flags": "NOT_NULL | UNSIGNED | BINARY | TIMESTAMP", + "flags": "UNSIGNED | BINARY", "char_set": 63, "max_size": 19 } @@ -35,7 +35,7 @@ }, { "ordinal": 3, - "name": "kind: _", + "name": "kind", "type_info": { "type": "String", "flags": "NOT_NULL | ENUM | NO_DEFAULT_VALUE", @@ -58,76 +58,58 @@ "name": "user_id", "type_info": { "type": "LongLong", - "flags": "MULTIPLE_KEY | UNSIGNED", + "flags": "NOT_NULL | MULTIPLE_KEY | UNSIGNED | NO_DEFAULT_VALUE", "char_set": 63, "max_size": 20 } }, { "ordinal": 6, - "name": "user_created_at", + "name": "username", "type_info": { - "type": "Timestamp", - "flags": "UNSIGNED | BINARY | TIMESTAMP", - "char_set": 63, - "max_size": 19 + "type": "VarString", + "flags": "NOT_NULL | UNIQUE_KEY | MULTIPLE_KEY | NO_DEFAULT_VALUE", + "char_set": 224, + "max_size": 128 } }, { "ordinal": 7, - "name": "user_username", + "name": "display_name", "type_info": { "type": "VarString", - "flags": "MULTIPLE_KEY | NO_DEFAULT_VALUE", + "flags": "", "char_set": 224, - "max_size": 64 + "max_size": 128 } }, { "ordinal": 8, - "name": "member_id", + "name": "nickname", "type_info": { - "type": "LongLong", - "flags": "PRIMARY_KEY | UNSIGNED | AUTO_INCREMENT", - "char_set": 63, - "max_size": 20 + "type": "VarString", + "flags": "", + "char_set": 224, + "max_size": 128 } }, { "ordinal": 9, - "name": "member_created_at", + "name": "created_at", "type_info": { "type": "Timestamp", "flags": "UNSIGNED | BINARY | TIMESTAMP", "char_set": 63, "max_size": 19 } - }, - { - "ordinal": 10, - "name": "member_server_id", - "type_info": { - "type": "LongLong", - "flags": "MULTIPLE_KEY | UNSIGNED | NO_DEFAULT_VALUE", - "char_set": 63, - "max_size": 20 - } - }, - { - "ordinal": 11, - "name": "member_nickname", - "type_info": { - "type": "VarString", - "flags": "", - "char_set": 224, - "max_size": 128 - } } ], "parameters": { - "Right": 2 + "Right": 4 }, "nullable": [ + false, + true, false, false, false, @@ -135,12 +117,8 @@ false, true, true, - true, - true, - true, - true, true ] }, - "hash": "78fab8bb99cf072b57792b69bb8ef625f419309c7aaecdf350ef97f5239abdeb" + "hash": "80c3f7f9687fe09f2114d8e4ea63d03f59ac31cebb9e509494c82643a5b07f7f" } diff --git a/.sqlx/query-81abad5cdf7f7d5d990dc5b082ec71e7bc0d67a993767a3ea1d76568fe7752c1.json b/.sqlx/query-81abad5cdf7f7d5d990dc5b082ec71e7bc0d67a993767a3ea1d76568fe7752c1.json new file mode 100644 index 0000000..4296fda --- /dev/null +++ b/.sqlx/query-81abad5cdf7f7d5d990dc5b082ec71e7bc0d67a993767a3ea1d76568fe7752c1.json @@ -0,0 +1,80 @@ +{ + "db_name": "MySQL", + "query": "SELECT UserFriendRequest.sender_id, UserFriendRequest.receiver_id,\nSender.username AS `sender_username`, Sender.display_name AS `sender_display_name`,\nReceiver.username AS `receiver_username`, Receiver.display_name AS `receiver_display_name`\nFROM UserFriendRequest\nINNER JOIN User AS Sender ON UserFriendRequest.sender_id=Sender.id\nINNER JOIN User AS Receiver ON UserFriendRequest.receiver_id=Receiver.id\nWHERE (UserFriendRequest.sender_id, UserFriendRequest.receiver_id) = (?, ?) OR (UserFriendRequest.sender_id, UserFriendRequest.receiver_id) = (?, ?)\n", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "sender_id", + "type_info": { + "type": "LongLong", + "flags": "NOT_NULL | PRIMARY_KEY | UNSIGNED | NO_DEFAULT_VALUE", + "char_set": 63, + "max_size": 20 + } + }, + { + "ordinal": 1, + "name": "receiver_id", + "type_info": { + "type": "LongLong", + "flags": "NOT_NULL | PRIMARY_KEY | MULTIPLE_KEY | UNSIGNED | NO_DEFAULT_VALUE", + "char_set": 63, + "max_size": 20 + } + }, + { + "ordinal": 2, + "name": "sender_username", + "type_info": { + "type": "VarString", + "flags": "NOT_NULL | UNIQUE_KEY | MULTIPLE_KEY | NO_DEFAULT_VALUE", + "char_set": 224, + "max_size": 128 + } + }, + { + "ordinal": 3, + "name": "sender_display_name", + "type_info": { + "type": "VarString", + "flags": "", + "char_set": 224, + "max_size": 128 + } + }, + { + "ordinal": 4, + "name": "receiver_username", + "type_info": { + "type": "VarString", + "flags": "NOT_NULL | UNIQUE_KEY | MULTIPLE_KEY | NO_DEFAULT_VALUE", + "char_set": 224, + "max_size": 128 + } + }, + { + "ordinal": 5, + "name": "receiver_display_name", + "type_info": { + "type": "VarString", + "flags": "", + "char_set": 224, + "max_size": 128 + } + } + ], + "parameters": { + "Right": 4 + }, + "nullable": [ + false, + false, + false, + true, + false, + true + ] + }, + "hash": "81abad5cdf7f7d5d990dc5b082ec71e7bc0d67a993767a3ea1d76568fe7752c1" +} diff --git a/.sqlx/query-8395f606f0d81d15c3c619a698b5d1816b2248d66fd20564b8b1eac5b35dee90.json b/.sqlx/query-8395f606f0d81d15c3c619a698b5d1816b2248d66fd20564b8b1eac5b35dee90.json new file mode 100644 index 0000000..7bd4b89 --- /dev/null +++ b/.sqlx/query-8395f606f0d81d15c3c619a698b5d1816b2248d66fd20564b8b1eac5b35dee90.json @@ -0,0 +1,12 @@ +{ + "db_name": "MySQL", + "query": "DELETE FROM UserFriendRequest WHERE (sender_id, receiver_id) = (?, ?)", + "describe": { + "columns": [], + "parameters": { + "Right": 2 + }, + "nullable": [] + }, + "hash": "8395f606f0d81d15c3c619a698b5d1816b2248d66fd20564b8b1eac5b35dee90" +} diff --git a/.sqlx/query-887cd7237809d9ad6185a9506c508c70df983f0d4fc8535804db511ad95b69fd.json b/.sqlx/query-887cd7237809d9ad6185a9506c508c70df983f0d4fc8535804db511ad95b69fd.json new file mode 100644 index 0000000..154608e --- /dev/null +++ b/.sqlx/query-887cd7237809d9ad6185a9506c508c70df983f0d4fc8535804db511ad95b69fd.json @@ -0,0 +1,12 @@ +{ + "db_name": "MySQL", + "query": "DELETE FROM ChannelMessage WHERE id = ? AND user_id = ? AND channel_id = ?", + "describe": { + "columns": [], + "parameters": { + "Right": 3 + }, + "nullable": [] + }, + "hash": "887cd7237809d9ad6185a9506c508c70df983f0d4fc8535804db511ad95b69fd" +} diff --git a/.sqlx/query-8dd05101a46e1af538f063757d28e36e992531db6c62e1de174f50390bd32457.json b/.sqlx/query-8dd05101a46e1af538f063757d28e36e992531db6c62e1de174f50390bd32457.json new file mode 100644 index 0000000..bc63342 --- /dev/null +++ b/.sqlx/query-8dd05101a46e1af538f063757d28e36e992531db6c62e1de174f50390bd32457.json @@ -0,0 +1,36 @@ +{ + "db_name": "MySQL", + "query": "SELECT sender_id, receiver_id FROM UserFriendRequest WHERE (sender_id, receiver_id) = (?, ?) OR (sender_id, receiver_id) = (?, ?)", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "sender_id", + "type_info": { + "type": "LongLong", + "flags": "NOT_NULL | PRIMARY_KEY | UNSIGNED | NO_DEFAULT_VALUE", + "char_set": 63, + "max_size": 20 + } + }, + { + "ordinal": 1, + "name": "receiver_id", + "type_info": { + "type": "LongLong", + "flags": "NOT_NULL | PRIMARY_KEY | MULTIPLE_KEY | UNSIGNED | NO_DEFAULT_VALUE", + "char_set": 63, + "max_size": 20 + } + } + ], + "parameters": { + "Right": 4 + }, + "nullable": [ + false, + false + ] + }, + "hash": "8dd05101a46e1af538f063757d28e36e992531db6c62e1de174f50390bd32457" +} diff --git a/.sqlx/query-90345c9b4b56bb414c7cbb0337028b491f99dada87cdda92e5b6272d9b33144e.json b/.sqlx/query-90345c9b4b56bb414c7cbb0337028b491f99dada87cdda92e5b6272d9b33144e.json new file mode 100644 index 0000000..bb77647 --- /dev/null +++ b/.sqlx/query-90345c9b4b56bb414c7cbb0337028b491f99dada87cdda92e5b6272d9b33144e.json @@ -0,0 +1,36 @@ +{ + "db_name": "MySQL", + "query": "SELECT name, kind FROM Channel WHERE id = ? AND server_id = ?", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "name", + "type_info": { + "type": "VarString", + "flags": "NOT_NULL | NO_DEFAULT_VALUE", + "char_set": 224, + "max_size": 128 + } + }, + { + "ordinal": 1, + "name": "kind", + "type_info": { + "type": "String", + "flags": "NOT_NULL | ENUM | NO_DEFAULT_VALUE", + "char_set": 224, + "max_size": 16 + } + } + ], + "parameters": { + "Right": 2 + }, + "nullable": [ + false, + false + ] + }, + "hash": "90345c9b4b56bb414c7cbb0337028b491f99dada87cdda92e5b6272d9b33144e" +} diff --git a/packages/server/.sqlx/query-256599c1a6316528da484bfbe8b7c29c53af2680bbbd935cdebac6509dafab06.json b/.sqlx/query-9398ee3e7aed458915ee00a2b23103f81a85e366470708aa90303b627e92386e.json similarity index 50% rename from packages/server/.sqlx/query-256599c1a6316528da484bfbe8b7c29c53af2680bbbd935cdebac6509dafab06.json rename to .sqlx/query-9398ee3e7aed458915ee00a2b23103f81a85e366470708aa90303b627e92386e.json index 8a432b3..09e6a53 100644 --- a/packages/server/.sqlx/query-256599c1a6316528da484bfbe8b7c29c53af2680bbbd935cdebac6509dafab06.json +++ b/.sqlx/query-9398ee3e7aed458915ee00a2b23103f81a85e366470708aa90303b627e92386e.json @@ -1,6 +1,6 @@ { "db_name": "MySQL", - "query": "DELETE FROM Session WHERE id = ?", + "query": "DELETE FROM Client WHERE id = ?", "describe": { "columns": [], "parameters": { @@ -8,5 +8,5 @@ }, "nullable": [] }, - "hash": "256599c1a6316528da484bfbe8b7c29c53af2680bbbd935cdebac6509dafab06" + "hash": "9398ee3e7aed458915ee00a2b23103f81a85e366470708aa90303b627e92386e" } diff --git a/.sqlx/query-9488f59b0bdbc518cef16088d7f1bdb012306ecd6c282874b2bbae222d7ae813.json b/.sqlx/query-9488f59b0bdbc518cef16088d7f1bdb012306ecd6c282874b2bbae222d7ae813.json new file mode 100644 index 0000000..7ca0440 --- /dev/null +++ b/.sqlx/query-9488f59b0bdbc518cef16088d7f1bdb012306ecd6c282874b2bbae222d7ae813.json @@ -0,0 +1,12 @@ +{ + "db_name": "MySQL", + "query": "INSERT INTO UserFriend (user_id, friend_id, created_at) VALUES (?, ?, ?)", + "describe": { + "columns": [], + "parameters": { + "Right": 3 + }, + "nullable": [] + }, + "hash": "9488f59b0bdbc518cef16088d7f1bdb012306ecd6c282874b2bbae222d7ae813" +} diff --git a/.sqlx/query-952f971d0d83e5d0cf6ef5a990c20c0cb8e873915eebbb579802136d4ff947ea.json b/.sqlx/query-952f971d0d83e5d0cf6ef5a990c20c0cb8e873915eebbb579802136d4ff947ea.json new file mode 100644 index 0000000..de1e8e6 --- /dev/null +++ b/.sqlx/query-952f971d0d83e5d0cf6ef5a990c20c0cb8e873915eebbb579802136d4ff947ea.json @@ -0,0 +1,69 @@ +{ + "db_name": "MySQL", + "query": "SELECT id, username, display_name, email, email_verified AS `email_verified: bool` FROM User WHERE id = ?", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "id", + "type_info": { + "type": "LongLong", + "flags": "NOT_NULL | PRIMARY_KEY | UNSIGNED | NO_DEFAULT_VALUE", + "char_set": 63, + "max_size": 20 + } + }, + { + "ordinal": 1, + "name": "username", + "type_info": { + "type": "VarString", + "flags": "NOT_NULL | UNIQUE_KEY | MULTIPLE_KEY | NO_DEFAULT_VALUE", + "char_set": 224, + "max_size": 128 + } + }, + { + "ordinal": 2, + "name": "display_name", + "type_info": { + "type": "VarString", + "flags": "", + "char_set": 224, + "max_size": 128 + } + }, + { + "ordinal": 3, + "name": "email", + "type_info": { + "type": "VarString", + "flags": "NOT_NULL | UNIQUE_KEY | NO_DEFAULT_VALUE", + "char_set": 224, + "max_size": 1020 + } + }, + { + "ordinal": 4, + "name": "email_verified: bool", + "type_info": { + "type": "Tiny", + "flags": "NOT_NULL", + "char_set": 63, + "max_size": 1 + } + } + ], + "parameters": { + "Right": 1 + }, + "nullable": [ + false, + false, + true, + false, + false + ] + }, + "hash": "952f971d0d83e5d0cf6ef5a990c20c0cb8e873915eebbb579802136d4ff947ea" +} diff --git a/.sqlx/query-957cd5f50bcb42e8545fff7f09dfca3cc5795567636e1a1dcb18b8841c779678.json b/.sqlx/query-957cd5f50bcb42e8545fff7f09dfca3cc5795567636e1a1dcb18b8841c779678.json new file mode 100644 index 0000000..bb8133a --- /dev/null +++ b/.sqlx/query-957cd5f50bcb42e8545fff7f09dfca3cc5795567636e1a1dcb18b8841c779678.json @@ -0,0 +1,12 @@ +{ + "db_name": "MySQL", + "query": "DELETE FROM ServerMember WHERE server_id = ? AND user_id = ?", + "describe": { + "columns": [], + "parameters": { + "Right": 2 + }, + "nullable": [] + }, + "hash": "957cd5f50bcb42e8545fff7f09dfca3cc5795567636e1a1dcb18b8841c779678" +} diff --git a/.sqlx/query-96c1fdae31bb6c28506c274d15b691b6cdafb227370af66311c29f6f0bc3d35c.json b/.sqlx/query-96c1fdae31bb6c28506c274d15b691b6cdafb227370af66311c29f6f0bc3d35c.json new file mode 100644 index 0000000..f33459c --- /dev/null +++ b/.sqlx/query-96c1fdae31bb6c28506c274d15b691b6cdafb227370af66311c29f6f0bc3d35c.json @@ -0,0 +1,91 @@ +{ + "db_name": "MySQL", + "query": "SELECT UserFriendRequest.sender_id, UserFriendRequest.receiver_id, UserFriendRequest.created_at,\nSender.username AS `sender_username`, Sender.display_name AS `sender_display_name`,\nReceiver.username AS `receiver_username`, Receiver.display_name AS `receiver_display_name`\nFROM UserFriendRequest\nINNER JOIN User AS Sender ON UserFriendRequest.sender_id=Sender.id\nINNER JOIN User AS Receiver ON UserFriendRequest.receiver_id=Receiver.id\nWHERE (UserFriendRequest.sender_id, UserFriendRequest.receiver_id) = (?, ?) OR (UserFriendRequest.sender_id, UserFriendRequest.receiver_id) = (?, ?)\n", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "sender_id", + "type_info": { + "type": "LongLong", + "flags": "NOT_NULL | PRIMARY_KEY | UNSIGNED | NO_DEFAULT_VALUE", + "char_set": 63, + "max_size": 20 + } + }, + { + "ordinal": 1, + "name": "receiver_id", + "type_info": { + "type": "LongLong", + "flags": "NOT_NULL | PRIMARY_KEY | MULTIPLE_KEY | UNSIGNED | NO_DEFAULT_VALUE", + "char_set": 63, + "max_size": 20 + } + }, + { + "ordinal": 2, + "name": "created_at", + "type_info": { + "type": "Timestamp", + "flags": "NOT_NULL | UNSIGNED | BINARY | TIMESTAMP", + "char_set": 63, + "max_size": 19 + } + }, + { + "ordinal": 3, + "name": "sender_username", + "type_info": { + "type": "VarString", + "flags": "NOT_NULL | UNIQUE_KEY | MULTIPLE_KEY | NO_DEFAULT_VALUE", + "char_set": 224, + "max_size": 128 + } + }, + { + "ordinal": 4, + "name": "sender_display_name", + "type_info": { + "type": "VarString", + "flags": "", + "char_set": 224, + "max_size": 128 + } + }, + { + "ordinal": 5, + "name": "receiver_username", + "type_info": { + "type": "VarString", + "flags": "NOT_NULL | UNIQUE_KEY | MULTIPLE_KEY | NO_DEFAULT_VALUE", + "char_set": 224, + "max_size": 128 + } + }, + { + "ordinal": 6, + "name": "receiver_display_name", + "type_info": { + "type": "VarString", + "flags": "", + "char_set": 224, + "max_size": 128 + } + } + ], + "parameters": { + "Right": 4 + }, + "nullable": [ + false, + false, + false, + false, + true, + false, + true + ] + }, + "hash": "96c1fdae31bb6c28506c274d15b691b6cdafb227370af66311c29f6f0bc3d35c" +} diff --git a/.sqlx/query-97421c0eef5d5c64ab506aebb4462974d6f91b9a819e741780e51963664338a8.json b/.sqlx/query-97421c0eef5d5c64ab506aebb4462974d6f91b9a819e741780e51963664338a8.json new file mode 100644 index 0000000..d8154a6 --- /dev/null +++ b/.sqlx/query-97421c0eef5d5c64ab506aebb4462974d6f91b9a819e741780e51963664338a8.json @@ -0,0 +1,47 @@ +{ + "db_name": "MySQL", + "query": "SELECT id, username, display_name FROM User WHERE id = ?", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "id", + "type_info": { + "type": "LongLong", + "flags": "NOT_NULL | PRIMARY_KEY | UNSIGNED | NO_DEFAULT_VALUE", + "char_set": 63, + "max_size": 20 + } + }, + { + "ordinal": 1, + "name": "username", + "type_info": { + "type": "VarString", + "flags": "NOT_NULL | UNIQUE_KEY | MULTIPLE_KEY | NO_DEFAULT_VALUE", + "char_set": 224, + "max_size": 128 + } + }, + { + "ordinal": 2, + "name": "display_name", + "type_info": { + "type": "VarString", + "flags": "", + "char_set": 224, + "max_size": 128 + } + } + ], + "parameters": { + "Right": 1 + }, + "nullable": [ + false, + false, + true + ] + }, + "hash": "97421c0eef5d5c64ab506aebb4462974d6f91b9a819e741780e51963664338a8" +} diff --git a/.sqlx/query-97a45b572c6a75b91c11caacb17db92d92f3911f7c633dfeba211747de288940.json b/.sqlx/query-97a45b572c6a75b91c11caacb17db92d92f3911f7c633dfeba211747de288940.json new file mode 100644 index 0000000..730dd4a --- /dev/null +++ b/.sqlx/query-97a45b572c6a75b91c11caacb17db92d92f3911f7c633dfeba211747de288940.json @@ -0,0 +1,12 @@ +{ + "db_name": "MySQL", + "query": "DELETE FROM Channel WHERE id = ? AND server_id = ?", + "describe": { + "columns": [], + "parameters": { + "Right": 2 + }, + "nullable": [] + }, + "hash": "97a45b572c6a75b91c11caacb17db92d92f3911f7c633dfeba211747de288940" +} diff --git a/.sqlx/query-986b954cd44124b591c0be21a2ca3da4f173a42043fb188563bf361f6d2e6573.json b/.sqlx/query-986b954cd44124b591c0be21a2ca3da4f173a42043fb188563bf361f6d2e6573.json new file mode 100644 index 0000000..9e08b3e --- /dev/null +++ b/.sqlx/query-986b954cd44124b591c0be21a2ca3da4f173a42043fb188563bf361f6d2e6573.json @@ -0,0 +1,12 @@ +{ + "db_name": "MySQL", + "query": "DELETE FROM ServerInvite WHERE id = ? AND server_id = ? AND expires_at > NOW()", + "describe": { + "columns": [], + "parameters": { + "Right": 2 + }, + "nullable": [] + }, + "hash": "986b954cd44124b591c0be21a2ca3da4f173a42043fb188563bf361f6d2e6573" +} diff --git a/.sqlx/query-9e879460b096ea2f21ad49baafd377101d29d9d1d141851ce5bec52cbdb86f8a.json b/.sqlx/query-9e879460b096ea2f21ad49baafd377101d29d9d1d141851ce5bec52cbdb86f8a.json new file mode 100644 index 0000000..a42d671 --- /dev/null +++ b/.sqlx/query-9e879460b096ea2f21ad49baafd377101d29d9d1d141851ce5bec52cbdb86f8a.json @@ -0,0 +1,25 @@ +{ + "db_name": "MySQL", + "query": "SELECT COUNT(*) > 30 AS `over_limit: bool` FROM ServerInvite WHERE server_id = ? AND expires_at > NOW()", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "over_limit: bool", + "type_info": { + "type": "Long", + "flags": "NOT_NULL | BINARY", + "char_set": 63, + "max_size": 1 + } + } + ], + "parameters": { + "Right": 1 + }, + "nullable": [ + false + ] + }, + "hash": "9e879460b096ea2f21ad49baafd377101d29d9d1d141851ce5bec52cbdb86f8a" +} diff --git a/.sqlx/query-9f376990074c62141b156d30d16b6539439324c51c678bf618caa82d9b8da944.json b/.sqlx/query-9f376990074c62141b156d30d16b6539439324c51c678bf618caa82d9b8da944.json new file mode 100644 index 0000000..52846ab --- /dev/null +++ b/.sqlx/query-9f376990074c62141b156d30d16b6539439324c51c678bf618caa82d9b8da944.json @@ -0,0 +1,25 @@ +{ + "db_name": "MySQL", + "query": "SELECT name FROM Server WHERE id = ? AND owner_id = ?", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "name", + "type_info": { + "type": "VarString", + "flags": "NOT_NULL | NO_DEFAULT_VALUE", + "char_set": 224, + "max_size": 128 + } + } + ], + "parameters": { + "Right": 2 + }, + "nullable": [ + false + ] + }, + "hash": "9f376990074c62141b156d30d16b6539439324c51c678bf618caa82d9b8da944" +} diff --git a/.sqlx/query-a0ccd9c589d166f366e3a7e4f50c99caa1cf3954cc4796a7cbe6a487cfb5677c.json b/.sqlx/query-a0ccd9c589d166f366e3a7e4f50c99caa1cf3954cc4796a7cbe6a487cfb5677c.json new file mode 100644 index 0000000..2e22514 --- /dev/null +++ b/.sqlx/query-a0ccd9c589d166f366e3a7e4f50c99caa1cf3954cc4796a7cbe6a487cfb5677c.json @@ -0,0 +1,80 @@ +{ + "db_name": "MySQL", + "query": "SELECT Client.id, Client.name, Client.client_uri, Client.tos_uri, Client.policy_uri, ClientRedirect.uri FROM Client LEFT JOIN ClientRedirect ON ClientRedirect.client_id=Client.id WHERE Client.owner_id = ?", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "id", + "type_info": { + "type": "LongLong", + "flags": "NOT_NULL | PRIMARY_KEY | UNSIGNED | NO_DEFAULT_VALUE", + "char_set": 63, + "max_size": 20 + } + }, + { + "ordinal": 1, + "name": "name", + "type_info": { + "type": "VarString", + "flags": "NOT_NULL | NO_DEFAULT_VALUE", + "char_set": 224, + "max_size": 96 + } + }, + { + "ordinal": 2, + "name": "client_uri", + "type_info": { + "type": "VarString", + "flags": "", + "char_set": 224, + "max_size": 1020 + } + }, + { + "ordinal": 3, + "name": "tos_uri", + "type_info": { + "type": "VarString", + "flags": "", + "char_set": 224, + "max_size": 1020 + } + }, + { + "ordinal": 4, + "name": "policy_uri", + "type_info": { + "type": "VarString", + "flags": "", + "char_set": 224, + "max_size": 1020 + } + }, + { + "ordinal": 5, + "name": "uri", + "type_info": { + "type": "VarString", + "flags": "PRIMARY_KEY | NO_DEFAULT_VALUE", + "char_set": 224, + "max_size": 1020 + } + } + ], + "parameters": { + "Right": 1 + }, + "nullable": [ + false, + false, + true, + true, + true, + true + ] + }, + "hash": "a0ccd9c589d166f366e3a7e4f50c99caa1cf3954cc4796a7cbe6a487cfb5677c" +} diff --git a/.sqlx/query-a4d2c820fa4b6537048d401e0866e052a5bd40a7b65aea03972863116cbfe8c9.json b/.sqlx/query-a4d2c820fa4b6537048d401e0866e052a5bd40a7b65aea03972863116cbfe8c9.json new file mode 100644 index 0000000..e4ac0d3 --- /dev/null +++ b/.sqlx/query-a4d2c820fa4b6537048d401e0866e052a5bd40a7b65aea03972863116cbfe8c9.json @@ -0,0 +1,25 @@ +{ + "db_name": "MySQL", + "query": "SELECT Channel.id\nFROM Channel\nINNER JOIN DMChannelRecipient AS Sender ON Sender.channel_id=Channel.id\nINNER JOIN DMChannelRecipient AS Receiver ON Receiver.channel_id=Channel.id\nWHERE (Sender.user_id, Receiver.user_id) = (?, ?) OR (Sender.user_id, Receiver.user_id) = (?, ?) AND Channel.kind = 'DM'\nLIMIT 1\n", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "id", + "type_info": { + "type": "LongLong", + "flags": "NOT_NULL | PRIMARY_KEY | UNSIGNED | NO_DEFAULT_VALUE", + "char_set": 63, + "max_size": 20 + } + } + ], + "parameters": { + "Right": 4 + }, + "nullable": [ + false + ] + }, + "hash": "a4d2c820fa4b6537048d401e0866e052a5bd40a7b65aea03972863116cbfe8c9" +} diff --git a/.sqlx/query-a575ba31cdd7fc81919c1c5df543243888f548921d523d909a481d44b5443e56.json b/.sqlx/query-a575ba31cdd7fc81919c1c5df543243888f548921d523d909a481d44b5443e56.json new file mode 100644 index 0000000..7b9c733 --- /dev/null +++ b/.sqlx/query-a575ba31cdd7fc81919c1c5df543243888f548921d523d909a481d44b5443e56.json @@ -0,0 +1,25 @@ +{ + "db_name": "MySQL", + "query": "SELECT EXISTS(SELECT 1 FROM Client INNER JOIN ClientRedirect ON ClientRedirect.client_id=Client.id WHERE Client.id = ? AND ClientRedirect.uri = ?) AS `exists: bool`", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "exists: bool", + "type_info": { + "type": "Long", + "flags": "NOT_NULL | BINARY", + "char_set": 63, + "max_size": 1 + } + } + ], + "parameters": { + "Right": 2 + }, + "nullable": [ + false + ] + }, + "hash": "a575ba31cdd7fc81919c1c5df543243888f548921d523d909a481d44b5443e56" +} diff --git a/packages/server/.sqlx/query-f9b0282f7ba80c441c61b64ac3592751f79a24c85e7870ff65d9803cbe65ab92.json b/.sqlx/query-ad2df4d22791eb31e9afc8a7a313534eb5ca51f542312e76ff48b6a735061e9a.json similarity index 55% rename from packages/server/.sqlx/query-f9b0282f7ba80c441c61b64ac3592751f79a24c85e7870ff65d9803cbe65ab92.json rename to .sqlx/query-ad2df4d22791eb31e9afc8a7a313534eb5ca51f542312e76ff48b6a735061e9a.json index aa34d9c..bac9376 100644 --- a/packages/server/.sqlx/query-f9b0282f7ba80c441c61b64ac3592751f79a24c85e7870ff65d9803cbe65ab92.json +++ b/.sqlx/query-ad2df4d22791eb31e9afc8a7a313534eb5ca51f542312e76ff48b6a735061e9a.json @@ -1,54 +1,44 @@ { "db_name": "MySQL", - "query": "SELECT id, created_at, server_id, nickname, user_id FROM Member WHERE user_id = ? AND server_id = ?", + "query": "SELECT ServerMember.server_id, ServerMember.nickname, ServerMember.created_at AS `created_at: DateTime`,\nDMChannelRecipient.user_id\nFROM Channel\nLEFT JOIN ServerMember ON ServerMember.server_id=Channel.server_id AND ServerMember.user_id=?\nLEFT JOIN DMChannelRecipient ON DMChannelRecipient.channel_id=Channel.id\nWHERE Channel.id = ?\n", "describe": { "columns": [ { "ordinal": 0, - "name": "id", + "name": "server_id", "type_info": { "type": "LongLong", - "flags": "NOT_NULL | PRIMARY_KEY | UNSIGNED | AUTO_INCREMENT", + "flags": "PRIMARY_KEY | UNSIGNED | NO_DEFAULT_VALUE", "char_set": 63, "max_size": 20 } }, { "ordinal": 1, - "name": "created_at", + "name": "nickname", "type_info": { - "type": "Timestamp", - "flags": "NOT_NULL | UNSIGNED | BINARY | TIMESTAMP", - "char_set": 63, - "max_size": 19 + "type": "VarString", + "flags": "", + "char_set": 224, + "max_size": 128 } }, { "ordinal": 2, - "name": "server_id", + "name": "created_at: DateTime", "type_info": { - "type": "LongLong", - "flags": "NOT_NULL | MULTIPLE_KEY | UNSIGNED | NO_DEFAULT_VALUE", + "type": "Timestamp", + "flags": "UNSIGNED | BINARY | TIMESTAMP", "char_set": 63, - "max_size": 20 + "max_size": 19 } }, { "ordinal": 3, - "name": "nickname", - "type_info": { - "type": "VarString", - "flags": "", - "char_set": 224, - "max_size": 128 - } - }, - { - "ordinal": 4, "name": "user_id", "type_info": { "type": "LongLong", - "flags": "MULTIPLE_KEY | UNSIGNED", + "flags": "PRIMARY_KEY | MULTIPLE_KEY | UNSIGNED | NO_DEFAULT_VALUE", "char_set": 63, "max_size": 20 } @@ -58,12 +48,11 @@ "Right": 2 }, "nullable": [ - false, - false, - false, + true, + true, true, true ] }, - "hash": "f9b0282f7ba80c441c61b64ac3592751f79a24c85e7870ff65d9803cbe65ab92" + "hash": "ad2df4d22791eb31e9afc8a7a313534eb5ca51f542312e76ff48b6a735061e9a" } diff --git a/.sqlx/query-adf77e45e3c483ffb3c3f342a83fd1d305cc8af5723d6ffbd87d98cc19f7df49.json b/.sqlx/query-adf77e45e3c483ffb3c3f342a83fd1d305cc8af5723d6ffbd87d98cc19f7df49.json new file mode 100644 index 0000000..12d2b14 --- /dev/null +++ b/.sqlx/query-adf77e45e3c483ffb3c3f342a83fd1d305cc8af5723d6ffbd87d98cc19f7df49.json @@ -0,0 +1,12 @@ +{ + "db_name": "MySQL", + "query": "DELETE FROM UserFriendRequest WHERE sender_id = ? AND receiver_id = ?", + "describe": { + "columns": [], + "parameters": { + "Right": 2 + }, + "nullable": [] + }, + "hash": "adf77e45e3c483ffb3c3f342a83fd1d305cc8af5723d6ffbd87d98cc19f7df49" +} diff --git a/packages/server/.sqlx/query-38a57a98598079947ef06f295b8eb77c64f4c6bc414b5ed9bf6e218efb574d49.json b/.sqlx/query-b97fb40ff69e1f72f1f04c8095458620bb49752fd9249444b8df415024b8068f.json similarity index 50% rename from packages/server/.sqlx/query-38a57a98598079947ef06f295b8eb77c64f4c6bc414b5ed9bf6e218efb574d49.json rename to .sqlx/query-b97fb40ff69e1f72f1f04c8095458620bb49752fd9249444b8df415024b8068f.json index edac773..aac1a37 100644 --- a/packages/server/.sqlx/query-38a57a98598079947ef06f295b8eb77c64f4c6bc414b5ed9bf6e218efb574d49.json +++ b/.sqlx/query-b97fb40ff69e1f72f1f04c8095458620bb49752fd9249444b8df415024b8068f.json @@ -1,6 +1,6 @@ { "db_name": "MySQL", - "query": "DELETE FROM Session WHERE user_id = ?", + "query": "DELETE FROM UserSession WHERE id = ?", "describe": { "columns": [], "parameters": { @@ -8,5 +8,5 @@ }, "nullable": [] }, - "hash": "38a57a98598079947ef06f295b8eb77c64f4c6bc414b5ed9bf6e218efb574d49" + "hash": "b97fb40ff69e1f72f1f04c8095458620bb49752fd9249444b8df415024b8068f" } diff --git a/.sqlx/query-bd67de4c2c23877db53dae948ae3ecd69c99a1fa2d04db4a3a2cd6cd10353415.json b/.sqlx/query-bd67de4c2c23877db53dae948ae3ecd69c99a1fa2d04db4a3a2cd6cd10353415.json new file mode 100644 index 0000000..96b495c --- /dev/null +++ b/.sqlx/query-bd67de4c2c23877db53dae948ae3ecd69c99a1fa2d04db4a3a2cd6cd10353415.json @@ -0,0 +1,69 @@ +{ + "db_name": "MySQL", + "query": "SELECT User.username, User.display_name,\nServerMember.nickname, ServerMember.created_at, ServerMember.user_id\nFROM ServerMember\nINNER JOIN User ON User.id=ServerMember.user_id\nWHERE ServerMember.server_id = ? AND ServerMember.user_id < ?\nORDER BY id DESC\nLIMIT ?\n", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "username", + "type_info": { + "type": "VarString", + "flags": "NOT_NULL | UNIQUE_KEY | MULTIPLE_KEY | NO_DEFAULT_VALUE", + "char_set": 224, + "max_size": 128 + } + }, + { + "ordinal": 1, + "name": "display_name", + "type_info": { + "type": "VarString", + "flags": "", + "char_set": 224, + "max_size": 128 + } + }, + { + "ordinal": 2, + "name": "nickname", + "type_info": { + "type": "VarString", + "flags": "", + "char_set": 224, + "max_size": 128 + } + }, + { + "ordinal": 3, + "name": "created_at", + "type_info": { + "type": "Timestamp", + "flags": "NOT_NULL | UNSIGNED | BINARY | TIMESTAMP", + "char_set": 63, + "max_size": 19 + } + }, + { + "ordinal": 4, + "name": "user_id", + "type_info": { + "type": "LongLong", + "flags": "NOT_NULL | PRIMARY_KEY | MULTIPLE_KEY | UNSIGNED | NO_DEFAULT_VALUE", + "char_set": 63, + "max_size": 20 + } + } + ], + "parameters": { + "Right": 3 + }, + "nullable": [ + false, + true, + true, + false, + false + ] + }, + "hash": "bd67de4c2c23877db53dae948ae3ecd69c99a1fa2d04db4a3a2cd6cd10353415" +} diff --git a/.sqlx/query-bd977dad64b7fa409c5b1ab281650a801f30344a7611e36c90e024ce2ddc93ec.json b/.sqlx/query-bd977dad64b7fa409c5b1ab281650a801f30344a7611e36c90e024ce2ddc93ec.json new file mode 100644 index 0000000..83b2b6e --- /dev/null +++ b/.sqlx/query-bd977dad64b7fa409c5b1ab281650a801f30344a7611e36c90e024ce2ddc93ec.json @@ -0,0 +1,58 @@ +{ + "db_name": "MySQL", + "query": "SELECT Sender.username AS `sender_username`, Sender.display_name AS `sender_display_name`, Receiver.username AS `receiver_username`, Receiver.display_name AS `receiver_display_name` FROM User AS Sender, User AS Receiver WHERE Sender.id = ? AND Receiver.id = ?", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "sender_username", + "type_info": { + "type": "VarString", + "flags": "NOT_NULL | UNIQUE_KEY | MULTIPLE_KEY | NO_DEFAULT_VALUE", + "char_set": 224, + "max_size": 128 + } + }, + { + "ordinal": 1, + "name": "sender_display_name", + "type_info": { + "type": "VarString", + "flags": "", + "char_set": 224, + "max_size": 128 + } + }, + { + "ordinal": 2, + "name": "receiver_username", + "type_info": { + "type": "VarString", + "flags": "NOT_NULL | UNIQUE_KEY | MULTIPLE_KEY | NO_DEFAULT_VALUE", + "char_set": 224, + "max_size": 128 + } + }, + { + "ordinal": 3, + "name": "receiver_display_name", + "type_info": { + "type": "VarString", + "flags": "", + "char_set": 224, + "max_size": 128 + } + } + ], + "parameters": { + "Right": 2 + }, + "nullable": [ + false, + true, + false, + true + ] + }, + "hash": "bd977dad64b7fa409c5b1ab281650a801f30344a7611e36c90e024ce2ddc93ec" +} diff --git a/.sqlx/query-be40259ec9953120e9f41601e50ddd6472e9c2f521b991f23c75cefa406800c6.json b/.sqlx/query-be40259ec9953120e9f41601e50ddd6472e9c2f521b991f23c75cefa406800c6.json new file mode 100644 index 0000000..03b063a --- /dev/null +++ b/.sqlx/query-be40259ec9953120e9f41601e50ddd6472e9c2f521b991f23c75cefa406800c6.json @@ -0,0 +1,12 @@ +{ + "db_name": "MySQL", + "query": "DELETE FROM UserFriend WHERE (user_id, friend_id) = (?, ?) OR (user_id, friend_id) = (?, ?)", + "describe": { + "columns": [], + "parameters": { + "Right": 4 + }, + "nullable": [] + }, + "hash": "be40259ec9953120e9f41601e50ddd6472e9c2f521b991f23c75cefa406800c6" +} diff --git a/.sqlx/query-bfae3820850b94f74c100bc7782c81c8507b5c9a2e90cbb0c6f7493054b41272.json b/.sqlx/query-bfae3820850b94f74c100bc7782c81c8507b5c9a2e90cbb0c6f7493054b41272.json new file mode 100644 index 0000000..932430c --- /dev/null +++ b/.sqlx/query-bfae3820850b94f74c100bc7782c81c8507b5c9a2e90cbb0c6f7493054b41272.json @@ -0,0 +1,12 @@ +{ + "db_name": "MySQL", + "query": "INSERT INTO ServerInvite (id, created_at, expires_at, server_id) VALUES (?, ?, ?, ?)", + "describe": { + "columns": [], + "parameters": { + "Right": 4 + }, + "nullable": [] + }, + "hash": "bfae3820850b94f74c100bc7782c81c8507b5c9a2e90cbb0c6f7493054b41272" +} diff --git a/.sqlx/query-c1b2b9fddeb1bdcbc23c7f17d469e445e6a446187ccc953ec3a7ca5f16835b2d.json b/.sqlx/query-c1b2b9fddeb1bdcbc23c7f17d469e445e6a446187ccc953ec3a7ca5f16835b2d.json new file mode 100644 index 0000000..73c2c02 --- /dev/null +++ b/.sqlx/query-c1b2b9fddeb1bdcbc23c7f17d469e445e6a446187ccc953ec3a7ca5f16835b2d.json @@ -0,0 +1,12 @@ +{ + "db_name": "MySQL", + "query": "INSERT INTO ClientRedirect (client_id, uri) VALUES (?, ?)", + "describe": { + "columns": [], + "parameters": { + "Right": 2 + }, + "nullable": [] + }, + "hash": "c1b2b9fddeb1bdcbc23c7f17d469e445e6a446187ccc953ec3a7ca5f16835b2d" +} diff --git a/.sqlx/query-c3b8c2e52a732999696dce6eaa0c36a1c16303afeb8867c7c78b42cb4cee6998.json b/.sqlx/query-c3b8c2e52a732999696dce6eaa0c36a1c16303afeb8867c7c78b42cb4cee6998.json new file mode 100644 index 0000000..41a3d8d --- /dev/null +++ b/.sqlx/query-c3b8c2e52a732999696dce6eaa0c36a1c16303afeb8867c7c78b42cb4cee6998.json @@ -0,0 +1,36 @@ +{ + "db_name": "MySQL", + "query": "SELECT user_id, scope FROM ClientUserTokens WHERE access_token = ? AND access_expires_at > NOW() AND expires_at > NOW()", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "user_id", + "type_info": { + "type": "LongLong", + "flags": "NOT_NULL | PRIMARY_KEY | UNSIGNED | NO_DEFAULT_VALUE", + "char_set": 63, + "max_size": 20 + } + }, + { + "ordinal": 1, + "name": "scope", + "type_info": { + "type": "String", + "flags": "NOT_NULL | SET | NO_DEFAULT_VALUE", + "char_set": 224, + "max_size": 436 + } + } + ], + "parameters": { + "Right": 1 + }, + "nullable": [ + false, + false + ] + }, + "hash": "c3b8c2e52a732999696dce6eaa0c36a1c16303afeb8867c7c78b42cb4cee6998" +} diff --git a/.sqlx/query-c5c002aa4a5da03a417d0fc06bedc747344e4e514d26edd0cb59dce8a34b505a.json b/.sqlx/query-c5c002aa4a5da03a417d0fc06bedc747344e4e514d26edd0cb59dce8a34b505a.json new file mode 100644 index 0000000..ae6c8fe --- /dev/null +++ b/.sqlx/query-c5c002aa4a5da03a417d0fc06bedc747344e4e514d26edd0cb59dce8a34b505a.json @@ -0,0 +1,25 @@ +{ + "db_name": "MySQL", + "query": "SELECT EXISTS(SELECT 1 FROM Client WHERE id = ? AND owner_id = ?) AS `exists: bool`", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "exists: bool", + "type_info": { + "type": "Long", + "flags": "NOT_NULL | BINARY", + "char_set": 63, + "max_size": 1 + } + } + ], + "parameters": { + "Right": 2 + }, + "nullable": [ + false + ] + }, + "hash": "c5c002aa4a5da03a417d0fc06bedc747344e4e514d26edd0cb59dce8a34b505a" +} diff --git a/.sqlx/query-c63692c5cc204a139d48a4ab3ab6769ec57bbeec53d26cfe5532d9c83829513a.json b/.sqlx/query-c63692c5cc204a139d48a4ab3ab6769ec57bbeec53d26cfe5532d9c83829513a.json new file mode 100644 index 0000000..4f63d7b --- /dev/null +++ b/.sqlx/query-c63692c5cc204a139d48a4ab3ab6769ec57bbeec53d26cfe5532d9c83829513a.json @@ -0,0 +1,36 @@ +{ + "db_name": "MySQL", + "query": "SELECT id, password FROM User WHERE username = ?", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "id", + "type_info": { + "type": "LongLong", + "flags": "NOT_NULL | PRIMARY_KEY | UNSIGNED | NO_DEFAULT_VALUE", + "char_set": 63, + "max_size": 20 + } + }, + { + "ordinal": 1, + "name": "password", + "type_info": { + "type": "VarString", + "flags": "NOT_NULL | NO_DEFAULT_VALUE", + "char_set": 224, + "max_size": 512 + } + } + ], + "parameters": { + "Right": 1 + }, + "nullable": [ + false, + false + ] + }, + "hash": "c63692c5cc204a139d48a4ab3ab6769ec57bbeec53d26cfe5532d9c83829513a" +} diff --git a/.sqlx/query-c74dc062ddc59b912b701b543fffc15d896d4dbd531dbb5ee7ab3a849d518bc8.json b/.sqlx/query-c74dc062ddc59b912b701b543fffc15d896d4dbd531dbb5ee7ab3a849d518bc8.json new file mode 100644 index 0000000..2b8173f --- /dev/null +++ b/.sqlx/query-c74dc062ddc59b912b701b543fffc15d896d4dbd531dbb5ee7ab3a849d518bc8.json @@ -0,0 +1,12 @@ +{ + "db_name": "MySQL", + "query": "UPDATE ClientUserTokens SET access_token = ?, refresh_token = ?, scope = ?, expires_at = DEFAULT, access_expires_at = DEFAULT WHERE user_id = ? AND client_id = ?", + "describe": { + "columns": [], + "parameters": { + "Right": 5 + }, + "nullable": [] + }, + "hash": "c74dc062ddc59b912b701b543fffc15d896d4dbd531dbb5ee7ab3a849d518bc8" +} diff --git a/.sqlx/query-c957dee29f4eba21b67334e428da772452e3a4ceb0cf2becac4003d20936a002.json b/.sqlx/query-c957dee29f4eba21b67334e428da772452e3a4ceb0cf2becac4003d20936a002.json new file mode 100644 index 0000000..4aee221 --- /dev/null +++ b/.sqlx/query-c957dee29f4eba21b67334e428da772452e3a4ceb0cf2becac4003d20936a002.json @@ -0,0 +1,36 @@ +{ + "db_name": "MySQL", + "query": "SELECT server_id, expires_at FROM ServerInvite WHERE id = ? AND expires_at > NOW()", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "server_id", + "type_info": { + "type": "LongLong", + "flags": "NOT_NULL | MULTIPLE_KEY | UNSIGNED | NO_DEFAULT_VALUE", + "char_set": 63, + "max_size": 20 + } + }, + { + "ordinal": 1, + "name": "expires_at", + "type_info": { + "type": "Timestamp", + "flags": "NOT_NULL | MULTIPLE_KEY | UNSIGNED | BINARY", + "char_set": 63, + "max_size": 19 + } + } + ], + "parameters": { + "Right": 1 + }, + "nullable": [ + false, + false + ] + }, + "hash": "c957dee29f4eba21b67334e428da772452e3a4ceb0cf2becac4003d20936a002" +} diff --git a/packages/server/.sqlx/query-d6ba3efed8974ec07fa1541a94794731db2c657930d2b0a14f47b48cce5284e6.json b/.sqlx/query-cce880601c8bfb24045dd62b488292c51f89598fc730b3ea7d196d3252bd19a8.json similarity index 60% rename from packages/server/.sqlx/query-d6ba3efed8974ec07fa1541a94794731db2c657930d2b0a14f47b48cce5284e6.json rename to .sqlx/query-cce880601c8bfb24045dd62b488292c51f89598fc730b3ea7d196d3252bd19a8.json index 9a79c8f..d686bd7 100644 --- a/packages/server/.sqlx/query-d6ba3efed8974ec07fa1541a94794731db2c657930d2b0a14f47b48cce5284e6.json +++ b/.sqlx/query-cce880601c8bfb24045dd62b488292c51f89598fc730b3ea7d196d3252bd19a8.json @@ -1,6 +1,6 @@ { "db_name": "MySQL", - "query": "SELECT id, created_at, name, owner_id FROM Server WHERE id = ? AND id IN (SELECT server_id FROM Member WHERE user_id = ?)", + "query": "SELECT Server.id, Server.name, Server.owner_id FROM Server INNER JOIN ServerMember ON Server.id=ServerMember.server_id WHERE ServerMember.user_id = ? AND Server.id = ?", "describe": { "columns": [ { @@ -8,23 +8,13 @@ "name": "id", "type_info": { "type": "LongLong", - "flags": "NOT_NULL | PRIMARY_KEY | UNSIGNED | AUTO_INCREMENT", + "flags": "NOT_NULL | PRIMARY_KEY | UNSIGNED | NO_DEFAULT_VALUE", "char_set": 63, "max_size": 20 } }, { "ordinal": 1, - "name": "created_at", - "type_info": { - "type": "Timestamp", - "flags": "NOT_NULL | UNSIGNED | BINARY | TIMESTAMP", - "char_set": 63, - "max_size": 19 - } - }, - { - "ordinal": 2, "name": "name", "type_info": { "type": "VarString", @@ -34,7 +24,7 @@ } }, { - "ordinal": 3, + "ordinal": 2, "name": "owner_id", "type_info": { "type": "LongLong", @@ -48,11 +38,10 @@ "Right": 2 }, "nullable": [ - false, false, false, false ] }, - "hash": "d6ba3efed8974ec07fa1541a94794731db2c657930d2b0a14f47b48cce5284e6" + "hash": "cce880601c8bfb24045dd62b488292c51f89598fc730b3ea7d196d3252bd19a8" } diff --git a/packages/server/.sqlx/query-937bacabf9e54a8f39597fd96b35997704a6e512b578ad08b5c65c25e2aeba80.json b/.sqlx/query-d30ce8710a039cad27d1208897167de46ed50839d8472884eb34dbaeca53c5f9.json similarity index 54% rename from packages/server/.sqlx/query-937bacabf9e54a8f39597fd96b35997704a6e512b578ad08b5c65c25e2aeba80.json rename to .sqlx/query-d30ce8710a039cad27d1208897167de46ed50839d8472884eb34dbaeca53c5f9.json index dc53478..10db146 100644 --- a/packages/server/.sqlx/query-937bacabf9e54a8f39597fd96b35997704a6e512b578ad08b5c65c25e2aeba80.json +++ b/.sqlx/query-d30ce8710a039cad27d1208897167de46ed50839d8472884eb34dbaeca53c5f9.json @@ -1,16 +1,16 @@ { "db_name": "MySQL", - "query": "SELECT COUNT(*) AS count FROM Invite WHERE server_id = ?", + "query": "SELECT EXISTS(SELECT 1 FROM Client WHERE id = ?) AS `exists: bool`", "describe": { "columns": [ { "ordinal": 0, - "name": "count", + "name": "exists: bool", "type_info": { - "type": "LongLong", + "type": "Long", "flags": "NOT_NULL | BINARY", "char_set": 63, - "max_size": 21 + "max_size": 1 } } ], @@ -21,5 +21,5 @@ false ] }, - "hash": "937bacabf9e54a8f39597fd96b35997704a6e512b578ad08b5c65c25e2aeba80" + "hash": "d30ce8710a039cad27d1208897167de46ed50839d8472884eb34dbaeca53c5f9" } diff --git a/.sqlx/query-d96f6dfe2b214fe64b64205ab0594827810d6870d4d1e7e38b7d183bffec3e72.json b/.sqlx/query-d96f6dfe2b214fe64b64205ab0594827810d6870d4d1e7e38b7d183bffec3e72.json new file mode 100644 index 0000000..09485f5 --- /dev/null +++ b/.sqlx/query-d96f6dfe2b214fe64b64205ab0594827810d6870d4d1e7e38b7d183bffec3e72.json @@ -0,0 +1,36 @@ +{ + "db_name": "MySQL", + "query": "SELECT user_id, scope FROM ClientUserTokens WHERE refresh_token = ? AND client_id = ? AND expires_at > NOW()", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "user_id", + "type_info": { + "type": "LongLong", + "flags": "NOT_NULL | PRIMARY_KEY | UNSIGNED | NO_DEFAULT_VALUE", + "char_set": 63, + "max_size": 20 + } + }, + { + "ordinal": 1, + "name": "scope", + "type_info": { + "type": "String", + "flags": "NOT_NULL | SET | NO_DEFAULT_VALUE", + "char_set": 224, + "max_size": 436 + } + } + ], + "parameters": { + "Right": 2 + }, + "nullable": [ + false, + false + ] + }, + "hash": "d96f6dfe2b214fe64b64205ab0594827810d6870d4d1e7e38b7d183bffec3e72" +} diff --git a/.sqlx/query-dcddf398d56fde4c0fcecf2c5ece475f1e13fc2f8127b5fcfee663ae6d0b1c45.json b/.sqlx/query-dcddf398d56fde4c0fcecf2c5ece475f1e13fc2f8127b5fcfee663ae6d0b1c45.json new file mode 100644 index 0000000..8d19480 --- /dev/null +++ b/.sqlx/query-dcddf398d56fde4c0fcecf2c5ece475f1e13fc2f8127b5fcfee663ae6d0b1c45.json @@ -0,0 +1,12 @@ +{ + "db_name": "MySQL", + "query": "DELETE FROM Server WHERE id = ? AND owner_id = ?", + "describe": { + "columns": [], + "parameters": { + "Right": 2 + }, + "nullable": [] + }, + "hash": "dcddf398d56fde4c0fcecf2c5ece475f1e13fc2f8127b5fcfee663ae6d0b1c45" +} diff --git a/.sqlx/query-dd0d75d133e3ee210f6e69e5df5bff81c2e7788b02a204b041f8e7b1a81b6a5e.json b/.sqlx/query-dd0d75d133e3ee210f6e69e5df5bff81c2e7788b02a204b041f8e7b1a81b6a5e.json new file mode 100644 index 0000000..8eaf3dc --- /dev/null +++ b/.sqlx/query-dd0d75d133e3ee210f6e69e5df5bff81c2e7788b02a204b041f8e7b1a81b6a5e.json @@ -0,0 +1,12 @@ +{ + "db_name": "MySQL", + "query": "INSERT INTO DMChannelRecipient (channel_id, user_id) VALUES (?, ?), (?, ?)", + "describe": { + "columns": [], + "parameters": { + "Right": 4 + }, + "nullable": [] + }, + "hash": "dd0d75d133e3ee210f6e69e5df5bff81c2e7788b02a204b041f8e7b1a81b6a5e" +} diff --git a/.sqlx/query-e0240c8326e110368444ea16a3499f999b221bb2ec71a80f4dcdd6a414c92c84.json b/.sqlx/query-e0240c8326e110368444ea16a3499f999b221bb2ec71a80f4dcdd6a414c92c84.json new file mode 100644 index 0000000..7caf85f --- /dev/null +++ b/.sqlx/query-e0240c8326e110368444ea16a3499f999b221bb2ec71a80f4dcdd6a414c92c84.json @@ -0,0 +1,12 @@ +{ + "db_name": "MySQL", + "query": "INSERT INTO Channel (id, name, kind, server_id) VALUES (?, ?, 'text', ?)", + "describe": { + "columns": [], + "parameters": { + "Right": 3 + }, + "nullable": [] + }, + "hash": "e0240c8326e110368444ea16a3499f999b221bb2ec71a80f4dcdd6a414c92c84" +} diff --git a/.sqlx/query-e522a6ee2a810b31998680aa0633d9a93c53b1308bd799af49086ce9c4dbd1de.json b/.sqlx/query-e522a6ee2a810b31998680aa0633d9a93c53b1308bd799af49086ce9c4dbd1de.json new file mode 100644 index 0000000..1f3d07d --- /dev/null +++ b/.sqlx/query-e522a6ee2a810b31998680aa0633d9a93c53b1308bd799af49086ce9c4dbd1de.json @@ -0,0 +1,12 @@ +{ + "db_name": "MySQL", + "query": "INSERT INTO ChannelMessage (id, updated_at, content, kind, channel_id, user_id) VALUES (?, NULL, ?, 'text', ?, ?)", + "describe": { + "columns": [], + "parameters": { + "Right": 4 + }, + "nullable": [] + }, + "hash": "e522a6ee2a810b31998680aa0633d9a93c53b1308bd799af49086ce9c4dbd1de" +} diff --git a/.sqlx/query-e654ab753473d4eedccbb4ee301f48aa8a57ab3d7e701ad3f9929d9f2dabf014.json b/.sqlx/query-e654ab753473d4eedccbb4ee301f48aa8a57ab3d7e701ad3f9929d9f2dabf014.json new file mode 100644 index 0000000..93f3281 --- /dev/null +++ b/.sqlx/query-e654ab753473d4eedccbb4ee301f48aa8a57ab3d7e701ad3f9929d9f2dabf014.json @@ -0,0 +1,91 @@ +{ + "db_name": "MySQL", + "query": "SELECT Client.id, Client.name, Client.owner_id, Client.client_uri, Client.tos_uri, Client.policy_uri, ClientRedirect.uri FROM Client LEFT JOIN ClientRedirect ON ClientRedirect.client_id=Client.id WHERE Client.id = ?", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "id", + "type_info": { + "type": "LongLong", + "flags": "NOT_NULL | PRIMARY_KEY | UNSIGNED | NO_DEFAULT_VALUE", + "char_set": 63, + "max_size": 20 + } + }, + { + "ordinal": 1, + "name": "name", + "type_info": { + "type": "VarString", + "flags": "NOT_NULL | NO_DEFAULT_VALUE", + "char_set": 224, + "max_size": 96 + } + }, + { + "ordinal": 2, + "name": "owner_id", + "type_info": { + "type": "LongLong", + "flags": "NOT_NULL | MULTIPLE_KEY | UNSIGNED | NO_DEFAULT_VALUE", + "char_set": 63, + "max_size": 20 + } + }, + { + "ordinal": 3, + "name": "client_uri", + "type_info": { + "type": "VarString", + "flags": "", + "char_set": 224, + "max_size": 1020 + } + }, + { + "ordinal": 4, + "name": "tos_uri", + "type_info": { + "type": "VarString", + "flags": "", + "char_set": 224, + "max_size": 1020 + } + }, + { + "ordinal": 5, + "name": "policy_uri", + "type_info": { + "type": "VarString", + "flags": "", + "char_set": 224, + "max_size": 1020 + } + }, + { + "ordinal": 6, + "name": "uri", + "type_info": { + "type": "VarString", + "flags": "PRIMARY_KEY | NO_DEFAULT_VALUE", + "char_set": 224, + "max_size": 1020 + } + } + ], + "parameters": { + "Right": 1 + }, + "nullable": [ + false, + false, + false, + true, + true, + true, + true + ] + }, + "hash": "e654ab753473d4eedccbb4ee301f48aa8a57ab3d7e701ad3f9929d9f2dabf014" +} diff --git a/packages/server/.sqlx/query-10a7f8fb2c07a5dc5b89873278e91bd444369f5f1b65dd1f2b7852731969ef30.json b/.sqlx/query-e683334bc7b2f0c6fe49ed13a392bc58dc4e1b179085a936b4e40dd7cd4cd371.json similarity index 53% rename from packages/server/.sqlx/query-10a7f8fb2c07a5dc5b89873278e91bd444369f5f1b65dd1f2b7852731969ef30.json rename to .sqlx/query-e683334bc7b2f0c6fe49ed13a392bc58dc4e1b179085a936b4e40dd7cd4cd371.json index ddd638c..e7815f5 100644 --- a/packages/server/.sqlx/query-10a7f8fb2c07a5dc5b89873278e91bd444369f5f1b65dd1f2b7852731969ef30.json +++ b/.sqlx/query-e683334bc7b2f0c6fe49ed13a392bc58dc4e1b179085a936b4e40dd7cd4cd371.json @@ -1,6 +1,6 @@ { "db_name": "MySQL", - "query": "SELECT Message.id, Message.created_at, Message.content, Message.kind AS `kind: _`, Message.channel_id, Message.user_id, User.created_at AS user_created_at, User.username AS user_username, Member.id as member_id, Member.created_at AS member_created_at, Member.server_id AS member_server_id, Member.nickname AS member_nickname FROM Message LEFT JOIN User ON User.id = Message.user_id LEFT JOIN Member ON Member.server_id = (SELECT server_id FROM Channel WHERE id = Message.channel_id) AND Member.user_id = Message.user_id WHERE Message.id = ? AND Message.channel_id = ?", + "query": "SELECT ChannelMessage.id, ChannelMessage.updated_at, ChannelMessage.content, ChannelMessage.kind, ChannelMessage.channel_id, ChannelMessage.user_id,\nUser.username, User.display_name,\nServerMember.nickname, ServerMember.created_at\nFROM ChannelMessage\nINNER JOIN User ON User.id=ChannelMessage.user_id\nLEFT JOIN ServerMember ON ServerMember.user_id=ChannelMessage.user_id AND ServerMember.server_id=?\nWHERE ChannelMessage.id = ? AND ChannelMessage.channel_id = ?\n", "describe": { "columns": [ { @@ -8,17 +8,17 @@ "name": "id", "type_info": { "type": "LongLong", - "flags": "NOT_NULL | PRIMARY_KEY | UNSIGNED | AUTO_INCREMENT", + "flags": "NOT_NULL | PRIMARY_KEY | UNSIGNED | NO_DEFAULT_VALUE", "char_set": 63, "max_size": 20 } }, { "ordinal": 1, - "name": "created_at", + "name": "updated_at", "type_info": { "type": "Timestamp", - "flags": "NOT_NULL | UNSIGNED | BINARY | TIMESTAMP", + "flags": "UNSIGNED | BINARY", "char_set": 63, "max_size": 19 } @@ -35,7 +35,7 @@ }, { "ordinal": 3, - "name": "kind: _", + "name": "kind", "type_info": { "type": "String", "flags": "NOT_NULL | ENUM | NO_DEFAULT_VALUE", @@ -58,76 +58,58 @@ "name": "user_id", "type_info": { "type": "LongLong", - "flags": "MULTIPLE_KEY | UNSIGNED", + "flags": "NOT_NULL | MULTIPLE_KEY | UNSIGNED | NO_DEFAULT_VALUE", "char_set": 63, "max_size": 20 } }, { "ordinal": 6, - "name": "user_created_at", + "name": "username", "type_info": { - "type": "Timestamp", - "flags": "UNSIGNED | BINARY | TIMESTAMP", - "char_set": 63, - "max_size": 19 + "type": "VarString", + "flags": "NOT_NULL | UNIQUE_KEY | MULTIPLE_KEY | NO_DEFAULT_VALUE", + "char_set": 224, + "max_size": 128 } }, { "ordinal": 7, - "name": "user_username", + "name": "display_name", "type_info": { "type": "VarString", - "flags": "MULTIPLE_KEY | NO_DEFAULT_VALUE", + "flags": "", "char_set": 224, - "max_size": 64 + "max_size": 128 } }, { "ordinal": 8, - "name": "member_id", + "name": "nickname", "type_info": { - "type": "LongLong", - "flags": "PRIMARY_KEY | UNSIGNED | AUTO_INCREMENT", - "char_set": 63, - "max_size": 20 + "type": "VarString", + "flags": "", + "char_set": 224, + "max_size": 128 } }, { "ordinal": 9, - "name": "member_created_at", + "name": "created_at", "type_info": { "type": "Timestamp", "flags": "UNSIGNED | BINARY | TIMESTAMP", "char_set": 63, "max_size": 19 } - }, - { - "ordinal": 10, - "name": "member_server_id", - "type_info": { - "type": "LongLong", - "flags": "MULTIPLE_KEY | UNSIGNED | NO_DEFAULT_VALUE", - "char_set": 63, - "max_size": 20 - } - }, - { - "ordinal": 11, - "name": "member_nickname", - "type_info": { - "type": "VarString", - "flags": "", - "char_set": 224, - "max_size": 128 - } } ], "parameters": { - "Right": 2 + "Right": 3 }, "nullable": [ + false, + true, false, false, false, @@ -135,12 +117,8 @@ false, true, true, - true, - true, - true, - true, true ] }, - "hash": "10a7f8fb2c07a5dc5b89873278e91bd444369f5f1b65dd1f2b7852731969ef30" + "hash": "e683334bc7b2f0c6fe49ed13a392bc58dc4e1b179085a936b4e40dd7cd4cd371" } diff --git a/.sqlx/query-ea015afc56448ddfc65e3c5c0670a3b534f4c18911ff828a9a4dc871d49c4770.json b/.sqlx/query-ea015afc56448ddfc65e3c5c0670a3b534f4c18911ff828a9a4dc871d49c4770.json new file mode 100644 index 0000000..6cf82a4 --- /dev/null +++ b/.sqlx/query-ea015afc56448ddfc65e3c5c0670a3b534f4c18911ff828a9a4dc871d49c4770.json @@ -0,0 +1,47 @@ +{ + "db_name": "MySQL", + "query": "SELECT id, name, kind FROM Channel WHERE server_id = ?", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "id", + "type_info": { + "type": "LongLong", + "flags": "NOT_NULL | PRIMARY_KEY | UNSIGNED | NO_DEFAULT_VALUE", + "char_set": 63, + "max_size": 20 + } + }, + { + "ordinal": 1, + "name": "name", + "type_info": { + "type": "VarString", + "flags": "NOT_NULL | NO_DEFAULT_VALUE", + "char_set": 224, + "max_size": 128 + } + }, + { + "ordinal": 2, + "name": "kind", + "type_info": { + "type": "String", + "flags": "NOT_NULL | ENUM | NO_DEFAULT_VALUE", + "char_set": 224, + "max_size": 16 + } + } + ], + "parameters": { + "Right": 1 + }, + "nullable": [ + false, + false, + false + ] + }, + "hash": "ea015afc56448ddfc65e3c5c0670a3b534f4c18911ff828a9a4dc871d49c4770" +} diff --git a/.sqlx/query-ea36c3ce8434541374b872bbb3de1a6c01028a77e8b42764645fc60d08997e53.json b/.sqlx/query-ea36c3ce8434541374b872bbb3de1a6c01028a77e8b42764645fc60d08997e53.json new file mode 100644 index 0000000..8445a21 --- /dev/null +++ b/.sqlx/query-ea36c3ce8434541374b872bbb3de1a6c01028a77e8b42764645fc60d08997e53.json @@ -0,0 +1,12 @@ +{ + "db_name": "MySQL", + "query": "UPDATE User SET began_deletion_at = NOW() WHERE id = ?", + "describe": { + "columns": [], + "parameters": { + "Right": 1 + }, + "nullable": [] + }, + "hash": "ea36c3ce8434541374b872bbb3de1a6c01028a77e8b42764645fc60d08997e53" +} diff --git a/.sqlx/query-f28838fef895007dab20147d5919553ae6781a503eaf67c0a55f8a9d2ad931c8.json b/.sqlx/query-f28838fef895007dab20147d5919553ae6781a503eaf67c0a55f8a9d2ad931c8.json new file mode 100644 index 0000000..382d6f9 --- /dev/null +++ b/.sqlx/query-f28838fef895007dab20147d5919553ae6781a503eaf67c0a55f8a9d2ad931c8.json @@ -0,0 +1,12 @@ +{ + "db_name": "MySQL", + "query": "REPLACE INTO ClientUserTokens (user_id, client_id, created_at, access_expires_at, expires_at, auth_code, access_token, refresh_token, scope) VALUES (?, ?, DEFAULT, DEFAULT, DEFAULT, ?, ?, ?, ?)", + "describe": { + "columns": [], + "parameters": { + "Right": 6 + }, + "nullable": [] + }, + "hash": "f28838fef895007dab20147d5919553ae6781a503eaf67c0a55f8a9d2ad931c8" +} diff --git a/.sqlx/query-f8ca974a48169c1bee200b4e20e8eeca131119e8b2c65f86651135a011f69217.json b/.sqlx/query-f8ca974a48169c1bee200b4e20e8eeca131119e8b2c65f86651135a011f69217.json new file mode 100644 index 0000000..49828ea --- /dev/null +++ b/.sqlx/query-f8ca974a48169c1bee200b4e20e8eeca131119e8b2c65f86651135a011f69217.json @@ -0,0 +1,12 @@ +{ + "db_name": "MySQL", + "query": "INSERT INTO Channel (id, name, kind, server_id) VALUES (?, '', 'DM', NULL)", + "describe": { + "columns": [], + "parameters": { + "Right": 1 + }, + "nullable": [] + }, + "hash": "f8ca974a48169c1bee200b4e20e8eeca131119e8b2c65f86651135a011f69217" +} diff --git a/.sqlx/query-fb01700465102dd75862f7b6b93665545fa40bb5e56f862a5ecc206a8755aac0.json b/.sqlx/query-fb01700465102dd75862f7b6b93665545fa40bb5e56f862a5ecc206a8755aac0.json new file mode 100644 index 0000000..f546a7a --- /dev/null +++ b/.sqlx/query-fb01700465102dd75862f7b6b93665545fa40bb5e56f862a5ecc206a8755aac0.json @@ -0,0 +1,12 @@ +{ + "db_name": "MySQL", + "query": "DELETE FROM ClientRedirect WHERE client_id = ?", + "describe": { + "columns": [], + "parameters": { + "Right": 1 + }, + "nullable": [] + }, + "hash": "fb01700465102dd75862f7b6b93665545fa40bb5e56f862a5ecc206a8755aac0" +} diff --git a/packages/server/.sqlx/query-70158dd99f50fd5e545dadf05f9bb38ac2109485d43bec427866cc664d64bd88.json b/.sqlx/query-fc63d3cf8560da2607855a939acbfae9e29b308329921776f6763080f20ef965.json similarity index 51% rename from packages/server/.sqlx/query-70158dd99f50fd5e545dadf05f9bb38ac2109485d43bec427866cc664d64bd88.json rename to .sqlx/query-fc63d3cf8560da2607855a939acbfae9e29b308329921776f6763080f20ef965.json index ecb6e4b..056f7d6 100644 --- a/packages/server/.sqlx/query-70158dd99f50fd5e545dadf05f9bb38ac2109485d43bec427866cc664d64bd88.json +++ b/.sqlx/query-fc63d3cf8560da2607855a939acbfae9e29b308329921776f6763080f20ef965.json @@ -1,54 +1,54 @@ { "db_name": "MySQL", - "query": "SELECT id, created_at, name, kind AS `kind: _`, server_id FROM Channel WHERE server_id IS NULL AND id IN (SELECT channel_id FROM ChannelRecipient WHERE user_id = ?) AND id = ?", + "query": "SELECT User.username, User.display_name,\nServerMember.nickname, ServerMember.created_at, ServerMember.user_id\nFROM ServerMember\nINNER JOIN User ON User.id=ServerMember.user_id\nWHERE ServerMember.server_id = ? AND ServerMember.user_id = ?\n", "describe": { "columns": [ { "ordinal": 0, - "name": "id", + "name": "username", "type_info": { - "type": "LongLong", - "flags": "NOT_NULL | PRIMARY_KEY | UNSIGNED | AUTO_INCREMENT", - "char_set": 63, - "max_size": 20 + "type": "VarString", + "flags": "NOT_NULL | UNIQUE_KEY | MULTIPLE_KEY | NO_DEFAULT_VALUE", + "char_set": 224, + "max_size": 128 } }, { "ordinal": 1, - "name": "created_at", + "name": "display_name", "type_info": { - "type": "Timestamp", - "flags": "NOT_NULL | UNSIGNED | BINARY | TIMESTAMP", - "char_set": 63, - "max_size": 19 + "type": "VarString", + "flags": "", + "char_set": 224, + "max_size": 128 } }, { "ordinal": 2, - "name": "name", + "name": "nickname", "type_info": { "type": "VarString", - "flags": "NOT_NULL | NO_DEFAULT_VALUE", + "flags": "", "char_set": 224, "max_size": 128 } }, { "ordinal": 3, - "name": "kind: _", + "name": "created_at", "type_info": { - "type": "String", - "flags": "NOT_NULL | ENUM | NO_DEFAULT_VALUE", - "char_set": 224, - "max_size": 16 + "type": "Timestamp", + "flags": "NOT_NULL | UNSIGNED | BINARY | TIMESTAMP", + "char_set": 63, + "max_size": 19 } }, { "ordinal": 4, - "name": "server_id", + "name": "user_id", "type_info": { "type": "LongLong", - "flags": "MULTIPLE_KEY | UNSIGNED", + "flags": "NOT_NULL | PRIMARY_KEY | MULTIPLE_KEY | UNSIGNED | NO_DEFAULT_VALUE", "char_set": 63, "max_size": 20 } @@ -59,11 +59,11 @@ }, "nullable": [ false, + true, + true, false, - false, - false, - true + false ] }, - "hash": "70158dd99f50fd5e545dadf05f9bb38ac2109485d43bec427866cc664d64bd88" + "hash": "fc63d3cf8560da2607855a939acbfae9e29b308329921776f6763080f20ef965" } diff --git a/.vscode/settings.json b/.vscode/settings.json index d7d1881..782ecdb 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,8 +1,6 @@ { - "rust-analyzer.linkedProjects": [ - "packages/server/Cargo.toml", - ".\\packages\\server\\Cargo.toml" - ], "prettier.prettierPath": "node_modules/prettier/index.cjs", - "prettier.configPath": "packages/client/.prettierrc", + "cSpell.enableFiletypes": [ + "!json" + ], } \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index f8e65fc..136398e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8,38 +8,13 @@ version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" -[[package]] -name = "actix" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cba56612922b907719d4a01cf11c8d5b458e7d3dba946d0435f20f58d6795ed2" -dependencies = [ - "actix-macros", - "actix-rt", - "actix_derive", - "bitflags 2.4.1", - "bytes", - "crossbeam-channel", - "futures-core", - "futures-sink", - "futures-task", - "futures-util", - "log", - "once_cell", - "parking_lot", - "pin-project-lite", - "smallvec", - "tokio", - "tokio-util", -] - [[package]] name = "actix-codec" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "617a8268e3537fe1d8c9ead925fca49ef6400927ee7bc26750e90ecee14ce4b8" +checksum = "5f7b0a21988c1bf877cf4759ef5ddaac04c1c9fe808c9142ecb78ba97d97a28a" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.5.0", "bytes", "futures-core", "futures-sink", @@ -52,9 +27,9 @@ dependencies = [ [[package]] name = "actix-cors" -version = "0.6.5" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0346d8c1f762b41b458ed3145eea914966bb9ad20b9be0d6d463b20d45586370" +checksum = "f9e772b3bcafe335042b5db010ab7c09013dad6eac4915c91d8d50902769f331" dependencies = [ "actix-utils", "actix-web", @@ -65,19 +40,31 @@ dependencies = [ "smallvec", ] +[[package]] +name = "actix-governor" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2e7b88f3804e01bd4191fdb08650430bbfcb43d3d9b2890064df3551ec7d25b" +dependencies = [ + "actix-http", + "actix-web", + "futures", + "governor", +] + [[package]] name = "actix-http" -version = "3.4.0" +version = "3.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a92ef85799cba03f76e4f7c10f533e66d87c9a7e7055f3391f09000ad8351bc9" +checksum = "4eb9843d84c775696c37d9a418bbb01b932629d01870722c0f13eb3f95e2536d" dependencies = [ "actix-codec", "actix-rt", "actix-service", "actix-utils", "ahash", - "base64 0.21.5", - "bitflags 2.4.1", + "base64 0.22.1", + "bitflags 2.5.0", "brotli", "bytes", "bytestring", @@ -86,7 +73,7 @@ dependencies = [ "flate2", "futures-core", "h2", - "http", + "http 0.2.12", "httparse", "httpdate", "itoa", @@ -111,18 +98,58 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e01ed3140b2f8d422c68afa1ed2e85d996ea619c988ac834d255db32138655cb" dependencies = [ "quote", - "syn 2.0.39", + "syn 2.0.65", +] + +[[package]] +name = "actix-multipart" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b960e2aea75f49c8f069108063d12a48d329fc8b60b786dfc7552a9d5918d2d" +dependencies = [ + "actix-multipart-derive", + "actix-utils", + "actix-web", + "bytes", + "derive_more", + "futures-core", + "futures-util", + "httparse", + "local-waker", + "log", + "memchr", + "mime", + "serde", + "serde_json", + "serde_plain", + "tempfile", + "tokio", +] + +[[package]] +name = "actix-multipart-derive" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a0a77f836d869f700e5b47ac7c3c8b9c8bc82e4aec861954c6198abee3ebd4d" +dependencies = [ + "darling", + "parse-size", + "proc-macro2", + "quote", + "syn 2.0.65", ] [[package]] name = "actix-router" -version = "0.5.1" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d66ff4d247d2b160861fa2866457e85706833527840e4133f8f49aa423a38799" +checksum = "13d324164c51f63867b57e73ba5936ea151b8a41a1d23d1031eeb9f70d0236f8" dependencies = [ "bytestring", - "http", + "cfg-if", + "http 0.2.12", "regex", + "regex-lite", "serde", "tracing", ] @@ -165,24 +192,6 @@ dependencies = [ "pin-project-lite", ] -[[package]] -name = "actix-session" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e6a28f813a6671e1847d005cad0be36ae4d016287690f765c303379837c13d6" -dependencies = [ - "actix", - "actix-service", - "actix-utils", - "actix-web", - "anyhow", - "async-trait", - "derive_more", - "serde", - "serde_json", - "tracing", -] - [[package]] name = "actix-utils" version = "3.0.1" @@ -195,9 +204,9 @@ dependencies = [ [[package]] name = "actix-web" -version = "4.4.0" +version = "4.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e4a5b5e29603ca8c94a77c65cf874718ceb60292c5a5c3e5f4ace041af462b9" +checksum = "b1cf67dadb19d7c95e5a299e2dda24193b89d5d4f33a3b9800888ede9e19aa32" dependencies = [ "actix-codec", "actix-http", @@ -224,6 +233,7 @@ dependencies = [ "once_cell", "pin-project-lite", "regex", + "regex-lite", "serde", "serde_json", "serde_urlencoded", @@ -233,24 +243,6 @@ dependencies = [ "url", ] -[[package]] -name = "actix-web-actors" -version = "4.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf6e9ccc371cfddbed7aa842256a4abc7a6dcac9f3fce392fe1d0f68cfd136b2" -dependencies = [ - "actix", - "actix-codec", - "actix-http", - "actix-web", - "bytes", - "bytestring", - "futures-core", - "pin-project-lite", - "tokio", - "tokio-util", -] - [[package]] name = "actix-web-codegen" version = "4.2.2" @@ -260,33 +252,69 @@ dependencies = [ "actix-router", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.65", ] [[package]] -name = "actix-web-httpauth" -version = "0.8.1" +name = "actix-web-lab" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d613edf08a42ccc6864c941d30fe14e1b676a77d16f1dbadc1174d065a0a775" +checksum = "7675c1a84eec1b179c844cdea8488e3e409d8e4984026e92fa96c87dd86f33c6" dependencies = [ + "actix-http", + "actix-router", + "actix-service", "actix-utils", "actix-web", - "base64 0.21.5", + "actix-web-lab-derive", + "ahash", + "arc-swap", + "async-trait", + "bytes", + "bytestring", + "csv", + "derive_more", "futures-core", "futures-util", - "log", + "http 0.2.12", + "impl-more", + "itertools", + "local-channel", + "mediatype", + "mime", + "once_cell", "pin-project-lite", + "regex", + "serde", + "serde_html_form", + "serde_json", + "tokio", + "tokio-stream", + "tracing", ] [[package]] -name = "actix_derive" -version = "0.6.1" +name = "actix-web-lab-derive" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c7db3d5a9718568e4cf4a537cfd7070e6e6ff7481510d0237fb529ac850f6d3" +checksum = "9aa0b287c8de4a76b691f29dbb5451e8dd5b79d777eaf87350c9b0cbfdb5e968" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.65", +] + +[[package]] +name = "actix-ws" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "535aec173810be3ca6f25dd5b4d431ae7125d62000aa3cbae1ec739921b02cf3" +dependencies = [ + "actix-codec", + "actix-http", + "actix-web", + "futures-core", + "tokio", ] [[package]] @@ -304,46 +332,11 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" -[[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.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2" -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.6" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", "getrandom", @@ -354,9 +347,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" dependencies = [ "memchr", ] @@ -378,9 +371,9 @@ dependencies = [ [[package]] name = "allocator-api2" -version = "0.2.16" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" +checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" [[package]] name = "android-tzdata" @@ -398,20 +391,32 @@ dependencies = [ ] [[package]] -name = "anyhow" -version = "1.0.75" +name = "arc-swap" +version = "1.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457" + +[[package]] +name = "argon2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" +checksum = "3c3610892ee6e0cbce8ae2700349fcf8f98adb0dbfbee85aec3c9179d29cc072" +dependencies = [ + "base64ct", + "blake2", + "cpufeatures", + "password-hash", +] [[package]] name = "async-trait" -version = "0.1.74" +version = "0.1.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" +checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.65", ] [[package]] @@ -424,26 +429,54 @@ dependencies = [ ] [[package]] -name = "atomic-write-file" -version = "0.1.2" +name = "autocfg" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edcdbedc2236483ab103a53415653d6b4442ea6141baf1ffa85df29635e88436" -dependencies = [ - "nix", - "rand", -] +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] -name = "autocfg" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +name = "backend" +version = "0.2.0" +dependencies = [ + "actix-cors", + "actix-governor", + "actix-multipart", + "actix-web", + "actix-web-lab", + "actix-ws", + "base64 0.22.1", + "chrono", + "cuid2", + "dashmap", + "dotenvy", + "futures", + "indexmap 2.2.6", + "log", + "once_cell", + "password-auth", + "pretty_env_logger", + "rusty-s3", + "sentry", + "sentry-actix", + "sentry-log", + "serde", + "serde_json", + "serde_with", + "sha2", + "snowflaked", + "sqlx", + "thiserror", + "tokio", + "ts-rs", + "url", + "validator", +] [[package]] name = "backtrace" -version = "0.3.69" +version = "0.3.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" dependencies = [ "addr2line", "cc", @@ -456,15 +489,15 @@ dependencies = [ [[package]] name = "base64" -version = "0.20.0" +version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ea22880d78093b0cbe17c89f64a7d457941e65759157ec6cb31a31d652b05e5" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] name = "base64" -version = "0.21.5" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "base64ct" @@ -472,47 +505,6 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" -[[package]] -name = "bcrypt" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d1c9c15093eb224f0baa400f38fcd713fc1391a6f1c389d886beef146d60a3" -dependencies = [ - "base64 0.21.5", - "blowfish", - "getrandom", - "subtle", - "zeroize", -] - -[[package]] -name = "biasdo_server" -version = "0.0.0" -dependencies = [ - "actix", - "actix-cors", - "actix-session", - "actix-web", - "actix-web-actors", - "actix-web-httpauth", - "bcrypt", - "chrono", - "cuid2", - "dashmap", - "derive_more", - "dotenvy", - "env_logger", - "futures-util", - "indexmap", - "log", - "native-tls", - "serde", - "serde_json", - "sqlx", - "ts-rs", - "validator", -] - [[package]] name = "bitflags" version = "1.3.2" @@ -521,37 +513,36 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" dependencies = [ "serde", ] [[package]] -name = "block-buffer" -version = "0.10.4" +name = "blake2" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" dependencies = [ - "generic-array", + "digest", ] [[package]] -name = "blowfish" -version = "0.9.1" +name = "block-buffer" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e412e2cd0f2b2d93e02543ceae7917b3c70331573df19ee046bcbc35e45e87d7" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ - "byteorder", - "cipher", + "generic-array", ] [[package]] name = "brotli" -version = "3.4.0" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "516074a47ef4bce09577a3b379392300159ce5b1ba2e501ff1c819950066100f" +checksum = "74f7971dbd9326d58187408ab83117d8ac1bb9c17b085fdacd1cf2f598719b6b" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -560,9 +551,9 @@ dependencies = [ [[package]] name = "brotli-decompressor" -version = "2.5.1" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e2e4afe60d7dd600fdd3de8d0f08c2b7ec039712e3b6137ff98b7004e82de4f" +checksum = "e6221fe77a248b9117d431ad93761222e1cf8ff282d9d1d5d9f53d6299a1cf76" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -570,9 +561,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.14.0" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "byteorder" @@ -582,9 +573,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.5.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" +checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" [[package]] name = "bytestring" @@ -597,12 +588,13 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.83" +version = "1.0.98" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +checksum = "41c270e7540d725e65ac7f1b212ac8ce349719624d7bcff99f8e2e488e8cf03f" dependencies = [ "jobserver", "libc", + "once_cell", ] [[package]] @@ -613,9 +605,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.31" +version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" dependencies = [ "android-tzdata", "iana-time-zone", @@ -623,24 +615,14 @@ dependencies = [ "num-traits", "serde", "wasm-bindgen", - "windows-targets 0.48.5", -] - -[[package]] -name = "cipher" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" -dependencies = [ - "crypto-common", - "inout", + "windows-targets 0.52.5", ] [[package]] name = "const-oid" -version = "0.9.5" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28c122c3980598d243d63d9a704629a2d748d101f278052ff068be5a4423ab6f" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" [[package]] name = "convert_case" @@ -654,14 +636,7 @@ version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e859cd57d0710d9e06c381b550c06e76992472a8c6d527aecd2fc673dcc231fb" dependencies = [ - "aes-gcm", - "base64 0.20.0", - "hkdf", - "hmac", "percent-encoding", - "rand", - "sha2", - "subtle", "time", "version_check", ] @@ -684,18 +659,18 @@ checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" [[package]] name = "cpufeatures" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" dependencies = [ "libc", ] [[package]] name = "crc" -version = "3.0.1" +version = "3.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86ec7a15cbe22e59248fc7eadb1907dab5ba09372595da4d73dd805ed4417dfe" +checksum = "69e6e4d7b33a94f0991c26729976b10ebde1d34c3ee82408fb536164fa10d636" dependencies = [ "crc-catalog", ] @@ -708,41 +683,27 @@ checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" [[package]] name = "crc32fast" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "crossbeam-channel" -version = "0.5.8" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" dependencies = [ "cfg-if", - "crossbeam-utils", ] [[package]] name = "crossbeam-queue" -version = "0.3.8" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1cfb3ea8a53f37c40dea2c7bedcbd88bdfae54f5e2175d6ecaff1c988353add" +checksum = "df0346b5d5e76ac2fe4e327c5fd1118d6be7c51dfb18f9b7922923f287471e35" dependencies = [ - "cfg-if", "crossbeam-utils", ] [[package]] name = "crossbeam-utils" -version = "0.8.16" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" -dependencies = [ - "cfg-if", -] +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" [[package]] name = "crypto-common" @@ -751,19 +712,30 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ "generic-array", - "rand_core", "typenum", ] [[package]] -name = "ctr" -version = "0.9.2" +name = "csv" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" +checksum = "ac574ff4d437a7b5ad237ef331c17ccca63c46479e5b5453eb8e10bb99a759fe" dependencies = [ - "cipher", -] - + "csv-core", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "csv-core" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5efa2b3d7902f4b634a20cae3c9c4e6209dc4779feb6863329607560143efa70" +dependencies = [ + "memchr", +] + [[package]] name = "cuid-util" version = "0.1.0" @@ -782,6 +754,41 @@ dependencies = [ "sha3", ] +[[package]] +name = "darling" +version = "0.20.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83b2eb4d90d12bdda5ed17de686c2acb4c57914f8f921b8da7e112b5a36f3fe1" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.20.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "622687fe0bac72a04e5599029151f5796111b90f1baaa9b544d807a5e31cd120" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 2.0.65", +] + +[[package]] +name = "darling_macro" +version = "0.20.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "733cabb43482b1a1b53eee8583c2b9e8684d592215ea83efd305dd31bc2f0178" +dependencies = [ + "darling_core", + "quote", + "syn 2.0.65", +] + [[package]] name = "dashmap" version = "5.5.3" @@ -789,17 +796,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" dependencies = [ "cfg-if", - "hashbrown", + "hashbrown 0.14.5", "lock_api", "once_cell", "parking_lot_core", ] +[[package]] +name = "debugid" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef552e6f588e446098f6ba40d89ac146c8c7b64aade83c051ee00bb5d2bc18d" +dependencies = [ + "serde", + "uuid", +] + [[package]] name = "der" -version = "0.7.8" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" +checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" dependencies = [ "const-oid", "pem-rfc7468", @@ -808,11 +825,12 @@ dependencies = [ [[package]] name = "deranged" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eb30d70a07a3b04884d2677f06bec33509dc67ca60d92949e5535352d3191dc" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" dependencies = [ "powerfmt", + "serde", ] [[package]] @@ -848,27 +866,27 @@ checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" [[package]] name = "either" -version = "1.9.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" +checksum = "3dca9240753cf90908d7e4aac30f630662b02aebaa1b58a3cadabdb23385b58b" dependencies = [ "serde", ] [[package]] name = "encoding_rs" -version = "0.8.33" +version = "0.8.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" +checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" dependencies = [ "cfg-if", ] [[package]] name = "env_logger" -version = "0.10.1" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95b3f3e67048839cb0d0781f445682a35113da7121f7c949db0e2be96a4fbece" +checksum = "4cd405aab171cb85d6735e5c8d9db038c17d3ca007a4d2c25f337935c3d90580" dependencies = [ "humantime", "is-terminal", @@ -885,9 +903,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" dependencies = [ "libc", "windows-sys 0.52.0", @@ -912,9 +930,21 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] name = "fastrand" -version = "2.0.1" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" + +[[package]] +name = "findshlibs" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" +checksum = "40b9e59cd0f7e0806cca4be089683ecb6434e602038df21fe6bf6711b2f07f64" +dependencies = [ + "cc", + "lazy_static", + "libc", + "winapi", +] [[package]] name = "finl_unicode" @@ -924,9 +954,9 @@ checksum = "8fcfdc7a0362c9f4444381a9e697c79d435fe65b52a37466fc2c1184cee9edc6" [[package]] name = "flate2" -version = "1.0.28" +version = "1.0.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" +checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" dependencies = [ "crc32fast", "miniz_oxide", @@ -973,11 +1003,26 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "futures" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + [[package]] name = "futures-channel" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff4dd66668b557604244583e3e1e1eada8c5c2e96a6d0d6653ede395b78bbacb" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" dependencies = [ "futures-core", "futures-sink", @@ -985,15 +1030,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" [[package]] name = "futures-executor" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f4fb8693db0cf099eadcca0efe2a5a22e4550f98ed16aba6c48700da29597bc" +checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" dependencies = [ "futures-core", "futures-task", @@ -1013,39 +1058,46 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" [[package]] name = "futures-macro" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" +checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.65", ] [[package]] name = "futures-sink" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" [[package]] name = "futures-task" -version = "0.3.29" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" + +[[package]] +name = "futures-timer" +version = "3.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2" +checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" [[package]] name = "futures-util" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" dependencies = [ + "futures-channel", "futures-core", "futures-io", "futures-macro", @@ -1057,6 +1109,19 @@ dependencies = [ "slab", ] +[[package]] +name = "generator" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cc16584ff22b460a382b7feec54b23d2908d858152e5739a120b949293bd74e" +dependencies = [ + "cc", + "libc", + "log", + "rustversion", + "windows 0.48.0", +] + [[package]] name = "generic-array" version = "0.14.7" @@ -1069,23 +1134,15 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.11" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", + "js-sys", "libc", "wasi", -] - -[[package]] -name = "ghash" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d930750de5717d2dd0b8c0d42c076c0e884c81a73e6cab859bbd2339c71e3e40" -dependencies = [ - "opaque-debug", - "polyval", + "wasm-bindgen", ] [[package]] @@ -1094,19 +1151,39 @@ version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +[[package]] +name = "governor" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68a7f542ee6b35af73b06abc0dad1c1bae89964e4e253bc4b587b91c9637867b" +dependencies = [ + "cfg-if", + "dashmap", + "futures", + "futures-timer", + "no-std-compat", + "nonzero_ext", + "parking_lot", + "portable-atomic", + "quanta", + "rand", + "smallvec", + "spinning_top", +] + [[package]] name = "h2" -version = "0.3.22" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d6250322ef6e60f93f9a2162799302cd6f68f79f6e5d85c8c16f14d1d958178" +checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" dependencies = [ "bytes", "fnv", "futures-core", "futures-sink", "futures-util", - "http", - "indexmap", + "http 0.2.12", + "indexmap 2.2.6", "slab", "tokio", "tokio-util", @@ -1115,9 +1192,15 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.14.3" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[package]] +name = "hashbrown" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" dependencies = [ "ahash", "allocator-api2", @@ -1129,7 +1212,7 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" dependencies = [ - "hashbrown", + "hashbrown 0.14.5", ] [[package]] @@ -1143,9 +1226,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.3.3" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" [[package]] name = "hex" @@ -1155,9 +1238,9 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hkdf" -version = "0.12.3" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "791a029f6b9fc27657f6f188ec6e5e43f6911f6f878e0dc5501396e09809d437" +checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" dependencies = [ "hmac", ] @@ -1173,24 +1256,69 @@ dependencies = [ [[package]] name = "home" -version = "0.5.5" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.52.0", +] + +[[package]] +name = "hostname" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9c7c7c8ac16c798734b8a24560c1362120597c40d5e1459f09498f8f6c8f2ba" +dependencies = [ + "cfg-if", + "libc", + "windows 0.52.0", ] [[package]] name = "http" -version = "0.2.11" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" +checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" dependencies = [ "bytes", "fnv", "itoa", ] +[[package]] +name = "http-body" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" +dependencies = [ + "bytes", + "http 1.1.0", +] + +[[package]] +name = "http-body-util" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0475f8b2ac86659c21b64320d5d653f9efe42acd2a4e560073ec61a155a34f1d" +dependencies = [ + "bytes", + "futures-core", + "http 1.1.0", + "http-body", + "pin-project-lite", +] + [[package]] name = "httparse" version = "1.8.0" @@ -1209,11 +1337,66 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" +[[package]] +name = "hyper" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe575dd17d0862a9a33781c8c4696a55c320909004a67a00fb286ba8b1bc496d" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "http 1.1.0", + "http-body", + "httparse", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-tls" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" +dependencies = [ + "bytes", + "http-body-util", + "hyper", + "hyper-util", + "native-tls", + "tokio", + "tokio-native-tls", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca38ef113da30126bbff9cd1705f9273e15d45498615d138b0c20279ac7a76aa" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "http 1.1.0", + "http-body", + "hyper", + "pin-project-lite", + "socket2", + "tokio", + "tower", + "tower-service", + "tracing", +] + [[package]] name = "iana-time-zone" -version = "0.1.58" +version = "0.1.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20" +checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -1233,14 +1416,10 @@ dependencies = [ ] [[package]] -name = "idna" -version = "0.4.0" +name = "ident_case" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" -dependencies = [ - "unicode-bidi", - "unicode-normalization", -] +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" @@ -1253,79 +1432,88 @@ dependencies = [ ] [[package]] -name = "if_chain" -version = "1.0.2" +name = "impl-more" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb56e1aa765b4b4f3aadfab769793b7087bb03a4ea4920644a6d238e2df5b9ed" +checksum = "206ca75c9c03ba3d4ace2460e57b189f39f43de612c2f85836e65c929701bb2d" [[package]] name = "indexmap" -version = "2.1.0" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ - "equivalent", - "hashbrown", + "autocfg", + "hashbrown 0.12.3", + "serde", ] [[package]] -name = "inout" -version = "0.1.3" +name = "indexmap" +version = "2.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ - "generic-array", + "equivalent", + "hashbrown 0.14.5", + "serde", ] +[[package]] +name = "ipnet" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" + [[package]] name = "is-terminal" -version = "0.4.9" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" +checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" dependencies = [ "hermit-abi", - "rustix", - "windows-sys 0.48.0", + "libc", + "windows-sys 0.52.0", ] [[package]] name = "itertools" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25db6b064527c5d482d0423354fcd07a89a2dfe07b67892e62411946db7f07b0" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" dependencies = [ "either", ] [[package]] name = "itoa" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "jobserver" -version = "0.1.27" +version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" +checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" dependencies = [ "libc", ] [[package]] name = "js-sys" -version = "0.3.66" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cee9c64da59eae3b50095c18d3e74f8b73c0b86d2792824ff01bbce68ba229ca" +checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" dependencies = [ "wasm-bindgen", ] [[package]] name = "keccak" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f6d5ed8676d904364de097082f4e7d240b571b67989ced0240f08b7f966f940" +checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" dependencies = [ "cpufeatures", ] @@ -1347,9 +1535,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.150" +version = "0.2.155" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" +checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" [[package]] name = "libm" @@ -1370,9 +1558,9 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.4.12" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" [[package]] name = "local-channel" @@ -1393,9 +1581,9 @@ checksum = "4d873d7c67ce09b42110d801813efbc9364414e356be9935700d368351657487" [[package]] name = "lock_api" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" dependencies = [ "autocfg", "scopeguard", @@ -1403,9 +1591,31 @@ dependencies = [ [[package]] name = "log" -version = "0.4.20" +version = "0.4.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" + +[[package]] +name = "loom" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff50ecb28bb86013e935fb6683ab1f6d3a20016f123c76fd4c27470076ac30f5" +dependencies = [ + "cfg-if", + "generator", + "scoped-tls", + "tracing", + "tracing-subscriber", +] + +[[package]] +name = "matchers" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +dependencies = [ + "regex-automata 0.1.10", +] [[package]] name = "md-5" @@ -1417,11 +1627,17 @@ dependencies = [ "digest", ] +[[package]] +name = "mediatype" +version = "0.19.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8878cd8d1b3c8c8ae4b2ba0a36652b7cf192f618a599a7fbdfa25cffd4ea72dd" + [[package]] name = "memchr" -version = "2.6.4" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" +checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" [[package]] name = "mime" @@ -1437,18 +1653,18 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.1" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +checksum = "87dfd01fe195c66b572b37921ad8803d010623c0aca821bea2302239d155cdae" dependencies = [ "adler", ] [[package]] name = "mio" -version = "0.8.10" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" +checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" dependencies = [ "libc", "log", @@ -1475,15 +1691,10 @@ dependencies = [ ] [[package]] -name = "nix" -version = "0.27.1" +name = "no-std-compat" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" -dependencies = [ - "bitflags 2.4.1", - "cfg-if", - "libc", -] +checksum = "b93853da6d84c2e3c7d730d6473e8817692dd89be387eb01b94d7f108ecb5b8c" [[package]] name = "nom" @@ -1495,11 +1706,27 @@ dependencies = [ "minimal-lexical", ] +[[package]] +name = "nonzero_ext" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38bf9645c8b145698bb0b18a4637dcacbc421ea49bef2317e4fd8065a387cf21" + +[[package]] +name = "nu-ansi-term" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +dependencies = [ + "overload", + "winapi", +] + [[package]] name = "num" -version = "0.4.1" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b05180d69e3da0e530ba2a1dae5110317e49e3b7f3d41be227dc5f92e49ee7af" +checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" dependencies = [ "num-bigint", "num-complex", @@ -1511,11 +1738,10 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +checksum = "c165a9ab64cf766f73521c0dd2cfdff64f488b8f0b3e621face3462d3db536d7" dependencies = [ - "autocfg", "num-integer", "num-traits", ] @@ -1539,28 +1765,33 @@ dependencies = [ [[package]] name = "num-complex" -version = "0.4.4" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ba157ca0885411de85d6ca030ba7e2a83a28636056c7c699b07c8b6f7383214" +checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" dependencies = [ "num-traits", ] +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + [[package]] name = "num-integer" -version = "0.1.45" +version = "0.1.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" dependencies = [ - "autocfg", "num-traits", ] [[package]] name = "num-iter" -version = "0.1.43" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252" +checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" dependencies = [ "autocfg", "num-integer", @@ -1569,11 +1800,10 @@ dependencies = [ [[package]] name = "num-rational" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" +checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" dependencies = [ - "autocfg", "num-bigint", "num-integer", "num-traits", @@ -1581,19 +1811,29 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.17" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", "libm", ] +[[package]] +name = "num_cpus" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +dependencies = [ + "hermit-abi", + "libc", +] + [[package]] name = "object" -version = "0.32.1" +version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" +checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" dependencies = [ "memchr", ] @@ -1604,19 +1844,13 @@ version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" -[[package]] -name = "opaque-debug" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" - [[package]] name = "openssl" -version = "0.10.61" +version = "0.10.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b8419dc8cc6d866deb801274bba2e6f8f6108c1bb7fcc10ee5ab864931dbb45" +checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.5.0", "cfg-if", "foreign-types", "libc", @@ -1633,7 +1867,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.65", ] [[package]] @@ -1644,9 +1878,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.97" +version = "0.9.102" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3eaad34cdd97d81de97964fc7f29e2d104f483840d906ef56daa1912338460b" +checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2" dependencies = [ "cc", "libc", @@ -1654,11 +1888,28 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "os_info" +version = "3.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae99c7fa6dd38c7cafe1ec085e804f8f555a2f8659b0dbe03f1f9963a9b51092" +dependencies = [ + "log", + "serde", + "windows-sys 0.52.0", +] + +[[package]] +name = "overload" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" + [[package]] name = "parking_lot" -version = "0.12.1" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +checksum = "7e4af0ca4f6caed20e900d564c242b8e5d4903fdacf31d3daf527b66fe6f42fb" dependencies = [ "lock_api", "parking_lot_core", @@ -1666,22 +1917,51 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.9" +version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall", + "redox_syscall 0.5.1", "smallvec", - "windows-targets 0.48.5", + "windows-targets 0.52.5", +] + +[[package]] +name = "parse-size" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "944553dd59c802559559161f9816429058b869003836120e262e8caec061b7ae" + +[[package]] +name = "password-auth" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a2a4764cc1f8d961d802af27193c6f4f0124bd0e76e8393cf818e18880f0524" +dependencies = [ + "argon2", + "getrandom", + "password-hash", + "rand_core", +] + +[[package]] +name = "password-hash" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "346f04948ba92c43e8469c1ee6736c7563d71012b17d40745260fe106aac2166" +dependencies = [ + "base64ct", + "rand_core", + "subtle", ] [[package]] name = "paste" -version = "1.0.14" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] name = "pem-rfc7468" @@ -1698,11 +1978,31 @@ version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" +[[package]] +name = "pin-project" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.65", +] + [[package]] name = "pin-project-lite" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" [[package]] name = "pin-utils" @@ -1733,21 +2033,15 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.27" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[package]] -name = "polyval" -version = "0.6.1" +name = "portable-atomic" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52cff9d1d4dee5fe6d03729099f4a310a41179e0a10dbf542039873f2e826fb" -dependencies = [ - "cfg-if", - "cpufeatures", - "opaque-debug", - "universal-hash", -] +checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" [[package]] name = "powerfmt" @@ -1761,6 +2055,16 @@ version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +[[package]] +name = "pretty_env_logger" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "865724d4dbe39d9f3dd3b52b88d859d66bcb2d6a0acfd5ea68a65fb66d4bdc1c" +dependencies = [ + "env_logger", + "log", +] + [[package]] name = "proc-macro-error" version = "1.0.4" @@ -1787,18 +2091,43 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.70" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39278fbbf5fb4f646ce651690877f89d1c5811a3d4acb27700c1cb3cdb78fd3b" +checksum = "0b33eb56c327dec362a9e55b3ad14f9d2f0904fb5a5b03b513ab5465399e9f43" dependencies = [ "unicode-ident", ] +[[package]] +name = "quanta" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5167a477619228a0b284fac2674e3c388cba90631d7b7de620e6f1fcd08da5" +dependencies = [ + "crossbeam-utils", + "libc", + "once_cell", + "raw-cpuid", + "wasi", + "web-sys", + "winapi", +] + +[[package]] +name = "quick-xml" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eff6510e86862b57b210fd8cbe8ed3f0d7d600b9c2863cd4549a2e033c66e956" +dependencies = [ + "memchr", + "serde", +] + [[package]] name = "quote" -version = "1.0.33" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] @@ -1833,6 +2162,15 @@ dependencies = [ "getrandom", ] +[[package]] +name = "raw-cpuid" +version = "11.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e29830cbb1290e404f24c73af91c5d8d631ce7e128691e9477556b540cd01ecd" +dependencies = [ + "bitflags 2.5.0", +] + [[package]] name = "redox_syscall" version = "0.4.1" @@ -1842,34 +2180,119 @@ dependencies = [ "bitflags 1.3.2", ] +[[package]] +name = "redox_syscall" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e" +dependencies = [ + "bitflags 2.5.0", +] + [[package]] name = "regex" -version = "1.10.2" +version = "1.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" +checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" dependencies = [ "aho-corasick", "memchr", - "regex-automata", - "regex-syntax", + "regex-automata 0.4.6", + "regex-syntax 0.8.3", ] [[package]] name = "regex-automata" -version = "0.4.3" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +dependencies = [ + "regex-syntax 0.6.29", +] + +[[package]] +name = "regex-automata" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" dependencies = [ "aho-corasick", "memchr", - "regex-syntax", + "regex-syntax 0.8.3", ] +[[package]] +name = "regex-lite" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30b661b2f27137bdbc16f00eda72866a92bb28af1753ffbd56744fb6e2e9cd8e" + [[package]] name = "regex-syntax" -version = "0.8.2" +version = "0.6.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" + +[[package]] +name = "regex-syntax" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" + +[[package]] +name = "reqwest" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "566cafdd92868e0939d3fb961bd0dc25fcfaaed179291093b3d43e6b3150ea10" +dependencies = [ + "base64 0.22.1", + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "http 1.1.0", + "http-body", + "http-body-util", + "hyper", + "hyper-tls", + "hyper-util", + "ipnet", + "js-sys", + "log", + "mime", + "native-tls", + "once_cell", + "percent-encoding", + "pin-project-lite", + "rustls-pemfile 2.1.2", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tokio-native-tls", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "winreg", +] + +[[package]] +name = "ring" +version = "0.17.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" +dependencies = [ + "cc", + "cfg-if", + "getrandom", + "libc", + "spin 0.9.8", + "untrusted", + "windows-sys 0.52.0", +] [[package]] name = "rsa" @@ -1893,9 +2316,9 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustc_version" @@ -1908,45 +2331,132 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.27" +version = "0.38.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfeae074e687625746172d639330f1de242a178bf3189b51e35a7a21573513ac" +checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.5.0", "errno", "libc", "linux-raw-sys", "windows-sys 0.52.0", ] +[[package]] +name = "rustls" +version = "0.21.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" +dependencies = [ + "ring", + "rustls-webpki", + "sct", +] + +[[package]] +name = "rustls-pemfile" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" +dependencies = [ + "base64 0.21.7", +] + +[[package]] +name = "rustls-pemfile" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29993a25686778eb88d4189742cd713c9bce943bc54251a33509dc63cbacf73d" +dependencies = [ + "base64 0.22.1", + "rustls-pki-types", +] + +[[package]] +name = "rustls-pki-types" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" + +[[package]] +name = "rustls-webpki" +version = "0.101.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "rustversion" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" + +[[package]] +name = "rusty-s3" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31aa883f1b986a5249641e574ca0e11ac4fb9970b009c6fbb96fedaf4fa78db8" +dependencies = [ + "base64 0.21.7", + "hmac", + "md-5", + "percent-encoding", + "quick-xml", + "serde", + "serde_json", + "sha2", + "time", + "url", + "zeroize", +] + [[package]] name = "ryu" -version = "1.0.15" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "schannel" -version = "0.1.22" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" +checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] +[[package]] +name = "scoped-tls" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" + [[package]] name = "scopeguard" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" +[[package]] +name = "sct" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" +dependencies = [ + "ring", + "untrusted", +] + [[package]] name = "security-framework" -version = "2.9.2" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" +checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.5.0", "core-foundation", "core-foundation-sys", "libc", @@ -1955,9 +2465,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.9.1" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" +checksum = "317936bbbd05227752583946b9e66d7ce3b489f84e11a94a510b4437fef407d7" dependencies = [ "core-foundation-sys", "libc", @@ -1965,41 +2475,192 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.20" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" + +[[package]] +name = "sentry" +version = "0.32.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" +checksum = "00421ed8fa0c995f07cde48ba6c89e80f2b312f74ff637326f392fbfd23abe02" +dependencies = [ + "httpdate", + "native-tls", + "reqwest", + "sentry-backtrace", + "sentry-contexts", + "sentry-core", + "sentry-debug-images", + "sentry-panic", + "sentry-tracing", + "tokio", + "ureq", +] + +[[package]] +name = "sentry-actix" +version = "0.32.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1986312ea8425a28299262ead2483ca8f0e167994f9239848d5718041abcd49" +dependencies = [ + "actix-web", + "futures-util", + "sentry-core", +] + +[[package]] +name = "sentry-backtrace" +version = "0.32.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a79194074f34b0cbe5dd33896e5928bbc6ab63a889bd9df2264af5acb186921e" +dependencies = [ + "backtrace", + "once_cell", + "regex", + "sentry-core", +] + +[[package]] +name = "sentry-contexts" +version = "0.32.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eba8870c5dba2bfd9db25c75574a11429f6b95957b0a78ac02e2970dd7a5249a" +dependencies = [ + "hostname", + "libc", + "os_info", + "rustc_version", + "sentry-core", + "uname", +] + +[[package]] +name = "sentry-core" +version = "0.32.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46a75011ea1c0d5c46e9e57df03ce81f5c7f0a9e199086334a1f9c0a541e0826" +dependencies = [ + "once_cell", + "rand", + "sentry-types", + "serde", + "serde_json", +] + +[[package]] +name = "sentry-debug-images" +version = "0.32.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ec2a486336559414ab66548da610da5e9626863c3c4ffca07d88f7dc71c8de8" +dependencies = [ + "findshlibs", + "once_cell", + "sentry-core", +] + +[[package]] +name = "sentry-log" +version = "0.32.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e74b7261245ff17a8c48e8f3e1e96fb6b84146870121af880d53aef6a5b4f784" +dependencies = [ + "log", + "sentry-core", +] + +[[package]] +name = "sentry-panic" +version = "0.32.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2eaa3ecfa3c8750c78dcfd4637cfa2598b95b52897ed184b4dc77fcf7d95060d" +dependencies = [ + "sentry-backtrace", + "sentry-core", +] + +[[package]] +name = "sentry-tracing" +version = "0.32.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f715932bf369a61b7256687c6f0554141b7ce097287e30e3f7ed6e9de82498fe" +dependencies = [ + "sentry-backtrace", + "sentry-core", + "tracing-core", + "tracing-subscriber", +] + +[[package]] +name = "sentry-types" +version = "0.32.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4519c900ce734f7a0eb7aba0869dfb225a7af8820634a7dd51449e3b093cfb7c" +dependencies = [ + "debugid", + "hex", + "rand", + "serde", + "serde_json", + "thiserror", + "time", + "url", + "uuid", +] [[package]] name = "serde" -version = "1.0.193" +version = "1.0.202" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" +checksum = "226b61a0d411b2ba5ff6d7f73a476ac4f8bb900373459cd00fab8512828ba395" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.193" +version = "1.0.202" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" +checksum = "6048858004bcff69094cd972ed40a32500f153bd3be9f716b2eed2e8217c4838" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.65", +] + +[[package]] +name = "serde_html_form" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de514ef58196f1fc96dcaef80fe6170a1ce6215df9687a93fe8300e773fefc5" +dependencies = [ + "form_urlencoded", + "indexmap 2.2.6", + "itoa", + "ryu", + "serde", ] [[package]] name = "serde_json" -version = "1.0.108" +version = "1.0.117" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" +checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" dependencies = [ "itoa", "ryu", "serde", ] +[[package]] +name = "serde_plain" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce1fc6db65a611022b23a0dec6975d63fb80a302cb3388835ff02c097258d50" +dependencies = [ + "serde", +] + [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -2012,6 +2673,36 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_with" +version = "3.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ad483d2ab0149d5a5ebcd9972a3852711e0153d863bf5a5d0391d28883c4a20" +dependencies = [ + "base64 0.22.1", + "chrono", + "hex", + "indexmap 1.9.3", + "indexmap 2.2.6", + "serde", + "serde_derive", + "serde_json", + "serde_with_macros", + "time", +] + +[[package]] +name = "serde_with_macros" +version = "3.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65569b702f41443e8bc8bbb1c5779bd0450bbe723b56198980e80ec45780bce2" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 2.0.65", +] + [[package]] name = "sha1" version = "0.10.6" @@ -2044,11 +2735,20 @@ dependencies = [ "keccak", ] +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + [[package]] name = "signal-hook-registry" -version = "1.4.1" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" +checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" dependencies = [ "libc", ] @@ -2074,18 +2774,27 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.11.2" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" + +[[package]] +name = "snowflaked" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" +checksum = "398d462c4c454399be452039b24b0aa0ecb4c7a57f6ae615f5d25de2b032f850" +dependencies = [ + "loom", +] [[package]] name = "socket2" -version = "0.5.5" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" +checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" dependencies = [ "libc", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -2103,6 +2812,15 @@ dependencies = [ "lock_api", ] +[[package]] +name = "spinning_top" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d96d2d1d716fb500937168cc09353ffdc7a012be8475ac7308e1bdf0e3923300" +dependencies = [ + "lock_api", +] + [[package]] name = "spki" version = "0.7.3" @@ -2126,9 +2844,9 @@ dependencies = [ [[package]] name = "sqlx" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dba03c279da73694ef99763320dea58b51095dfe87d001b1d4b5fe78ba8763cf" +checksum = "c9a2ccff1a000a5a59cd33da541d9f2fdcd9e6e8229cc200565942bff36d0aaa" dependencies = [ "sqlx-core", "sqlx-macros", @@ -2139,9 +2857,9 @@ dependencies = [ [[package]] name = "sqlx-core" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d84b0a3c3739e220d94b3239fd69fb1f74bc36e16643423bd99de3b43c21bfbd" +checksum = "24ba59a9342a3d9bab6c56c118be528b27c9b60e490080e9711a04dccac83ef6" dependencies = [ "ahash", "atoi", @@ -2150,7 +2868,6 @@ dependencies = [ "chrono", "crc", "crossbeam-queue", - "dotenvy", "either", "event-listener", "futures-channel", @@ -2160,13 +2877,14 @@ dependencies = [ "futures-util", "hashlink", "hex", - "indexmap", + "indexmap 2.2.6", "log", "memchr", - "native-tls", "once_cell", "paste", "percent-encoding", + "rustls", + "rustls-pemfile 1.0.4", "serde", "serde_json", "sha2", @@ -2177,13 +2895,14 @@ dependencies = [ "tokio-stream", "tracing", "url", + "webpki-roots", ] [[package]] name = "sqlx-macros" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89961c00dc4d7dffb7aee214964b065072bff69e36ddb9e2c107541f75e4f2a5" +checksum = "4ea40e2345eb2faa9e1e5e326db8c34711317d2b5e08d0d5741619048a803127" dependencies = [ "proc-macro2", "quote", @@ -2194,11 +2913,10 @@ dependencies = [ [[package]] name = "sqlx-macros-core" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0bd4519486723648186a08785143599760f7cc81c52334a55d6a83ea1e20841" +checksum = "5833ef53aaa16d860e92123292f1f6a3d53c34ba8b1969f152ef1a7bb803f3c8" dependencies = [ - "atomic-write-file", "dotenvy", "either", "heck", @@ -2221,13 +2939,13 @@ dependencies = [ [[package]] name = "sqlx-mysql" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e37195395df71fd068f6e2082247891bc11e3289624bbc776a0cdfa1ca7f1ea4" +checksum = "1ed31390216d20e538e447a7a9b959e06ed9fc51c37b514b46eb758016ecd418" dependencies = [ "atoi", - "base64 0.21.5", - "bitflags 2.4.1", + "base64 0.21.7", + "bitflags 2.5.0", "byteorder", "bytes", "chrono", @@ -2264,13 +2982,13 @@ dependencies = [ [[package]] name = "sqlx-postgres" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6ac0ac3b7ccd10cc96c7ab29791a7dd236bd94021f31eec7ba3d46a74aa1c24" +checksum = "7c824eb80b894f926f89a0b9da0c7f435d27cdd35b8c655b114e58223918577e" dependencies = [ "atoi", - "base64 0.21.5", - "bitflags 2.4.1", + "base64 0.21.7", + "bitflags 2.5.0", "byteorder", "chrono", "crc", @@ -2292,7 +3010,6 @@ dependencies = [ "rand", "serde", "serde_json", - "sha1", "sha2", "smallvec", "sqlx-core", @@ -2304,9 +3021,9 @@ dependencies = [ [[package]] name = "sqlx-sqlite" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "210976b7d948c7ba9fced8ca835b11cbb2d677c59c79de41ac0d397e14547490" +checksum = "b244ef0a8414da0bed4bb1910426e890b19e5e9bccc27ada6b797d05c55ae0aa" dependencies = [ "atoi", "chrono", @@ -2337,6 +3054,12 @@ dependencies = [ "unicode-normalization", ] +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + [[package]] name = "subtle" version = "2.5.0" @@ -2356,65 +3079,81 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.39" +version = "2.0.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" +checksum = "d2863d96a84c6439701d7a38f9de935ec562c8832cc55d1dde0f513b52fad106" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] +[[package]] +name = "sync_wrapper" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" + [[package]] name = "tempfile" -version = "3.8.1" +version = "3.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef1adac450ad7f4b3c28589471ade84f25f731a7a0fe30d71dfa9f60fd808e5" +checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" dependencies = [ "cfg-if", "fastrand", - "redox_syscall", "rustix", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "termcolor" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff1bc3d3f05aff0403e8ac0d92ced918ec05b666a43f83297ccef5bea8a3d449" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" dependencies = [ "winapi-util", ] [[package]] name = "thiserror" -version = "1.0.50" +version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" +checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.50" +version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" +checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.65", +] + +[[package]] +name = "thread_local" +version = "1.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" +dependencies = [ + "cfg-if", + "once_cell", ] [[package]] name = "time" -version = "0.3.30" +version = "0.3.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" dependencies = [ "deranged", "itoa", + "num-conv", "powerfmt", "serde", "time-core", @@ -2429,10 +3168,11 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.15" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" dependencies = [ + "num-conv", "time-core", ] @@ -2453,26 +3193,49 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.35.0" +version = "1.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "841d45b238a16291a4e1584e61820b8ae57d696cc5015c459c229ccc6990cc1c" +checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" dependencies = [ "backtrace", "bytes", "libc", "mio", + "num_cpus", "parking_lot", "pin-project-lite", "signal-hook-registry", "socket2", + "tokio-macros", "windows-sys 0.48.0", ] +[[package]] +name = "tokio-macros" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.65", +] + +[[package]] +name = "tokio-native-tls" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" +dependencies = [ + "native-tls", + "tokio", +] + [[package]] name = "tokio-stream" -version = "0.1.14" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" +checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" dependencies = [ "futures-core", "pin-project-lite", @@ -2481,18 +3244,45 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.10" +version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" +checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" dependencies = [ "bytes", "futures-core", "futures-sink", "pin-project-lite", "tokio", +] + +[[package]] +name = "tower" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +dependencies = [ + "futures-core", + "futures-util", + "pin-project", + "pin-project-lite", + "tokio", + "tower-layer", + "tower-service", "tracing", ] +[[package]] +name = "tower-layer" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" + +[[package]] +name = "tower-service" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" + [[package]] name = "tracing" version = "0.1.40" @@ -2513,7 +3303,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.65", ] [[package]] @@ -2523,29 +3313,66 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", + "valuable", +] + +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +dependencies = [ + "matchers", + "nu-ansi-term", + "once_cell", + "regex", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log", ] +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + [[package]] name = "ts-rs" -version = "7.0.0" +version = "8.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1ff1f8c90369bc172200013ac17ae86e7b5def580687df4e6127883454ff2b0" +checksum = "09d3fa4606cdab1e9b668cc65ce2545941d01f52bc27536a195c66c55b91cb84" dependencies = [ "chrono", "thiserror", "ts-rs-macros", + "url", ] [[package]] name = "ts-rs-macros" -version = "7.0.0" +version = "8.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6f41cc0aeb7a4a55730188e147d3795a7349b501f8334697fd37629b896cdc2" +checksum = "f86ae36cbb2d58b86677ad413054feeb0712e382e822131cf9a4a1e580c419b5" dependencies = [ "Inflector", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.65", "termcolor", ] @@ -2555,11 +3382,20 @@ version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" +[[package]] +name = "uname" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b72f89f0ca32e4db1c04e2a72f5345d59796d4866a1ee0609084569f73683dc8" +dependencies = [ + "libc", +] + [[package]] name = "unicode-bidi" -version = "0.3.14" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f2528f27a9eb2b21e69c95319b30bd0efd85d09c379741b0f78ea1d86be2416" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" [[package]] name = "unicode-ident" @@ -2569,18 +3405,18 @@ checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" -version = "0.1.22" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" dependencies = [ "tinyvec", ] [[package]] name = "unicode-segmentation" -version = "1.10.1" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" +checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" [[package]] name = "unicode_categories" @@ -2589,13 +3425,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" [[package]] -name = "universal-hash" -version = "0.5.1" +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "ureq" +version = "2.9.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" +checksum = "d11a831e3c0b56e438a28308e7c810799e3c118417f342d30ecec080105395cd" dependencies = [ - "crypto-common", - "subtle", + "base64 0.22.1", + "log", + "native-tls", + "once_cell", + "url", ] [[package]] @@ -2605,8 +3450,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" dependencies = [ "form_urlencoded", - "idna 0.5.0", + "idna", "percent-encoding", + "serde", ] [[package]] @@ -2615,14 +3461,23 @@ version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" +[[package]] +name = "uuid" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a183cf7feeba97b4dd1c0d46788634f6221d87fa961b305bed08c851829efcc0" +dependencies = [ + "serde", +] + [[package]] name = "validator" -version = "0.16.1" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b92f40481c04ff1f4f61f304d61793c7b56ff76ac1469f1beb199b1445b253bd" +checksum = "db79c75af171630a3148bd3e6d7c4f42b6a9a014c2945bc5ed0020cbb8d9478e" dependencies = [ - "idna 0.4.0", - "lazy_static", + "idna", + "once_cell", "regex", "serde", "serde_derive", @@ -2633,29 +3488,23 @@ dependencies = [ [[package]] name = "validator_derive" -version = "0.16.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc44ca3088bb3ba384d9aecf40c6a23a676ce23e09bdaca2073d99c207f864af" +checksum = "55591299b7007f551ed1eb79a684af7672c19c3193fb9e0a31936987bb2438ec" dependencies = [ - "if_chain", - "lazy_static", + "darling", + "once_cell", "proc-macro-error", "proc-macro2", "quote", - "regex", - "syn 1.0.109", - "validator_types", + "syn 2.0.65", ] [[package]] -name = "validator_types" -version = "0.16.0" +name = "valuable" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "111abfe30072511849c5910134e8baf8dc05de4c0e5903d681cbd5c9c4d611e3" -dependencies = [ - "proc-macro2", - "syn 1.0.109", -] +checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" [[package]] name = "vcpkg" @@ -2669,17 +3518,32 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +[[package]] +name = "wasite" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b" + [[package]] name = "wasm-bindgen" -version = "0.2.89" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ed0d4f68a3015cc185aff4db9506a015f4b96f95303897bfa23f846db54064e" +checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -2687,24 +3551,36 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.89" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b56f625e64f3a1084ded111c4d5f477df9f8c92df113852fa5a374dbda78826" +checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.65", "wasm-bindgen-shared", ] +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +dependencies = [ + "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", +] + [[package]] name = "wasm-bindgen-macro" -version = "0.2.89" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0162dbf37223cd2afce98f3d0785506dcb8d266223983e4b5b525859e6e182b2" +checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2712,28 +3588,48 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.89" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" +checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.65", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.89" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" + +[[package]] +name = "web-sys" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webpki-roots" +version = "0.25.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ab9b36309365056cd639da3134bf87fa8f3d86008abf99e612384a6eecd459f" +checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" [[package]] name = "whoami" -version = "1.4.1" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22fc3756b8a9133049b26c7f61ab35416c130e8c09b660f5b3958b446f52cc50" +checksum = "a44ab49fad634e88f55bf8f9bb3abd2f27d7204172a112c7c9987e01c1c94ea9" +dependencies = [ + "redox_syscall 0.4.1", + "wasite", +] [[package]] name = "winapi" @@ -2753,11 +3649,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.6" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" +checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" dependencies = [ - "winapi", + "windows-sys 0.52.0", ] [[package]] @@ -2767,14 +3663,33 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] -name = "windows-core" -version = "0.51.1" +name = "windows" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" +checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" dependencies = [ "windows-targets 0.48.5", ] +[[package]] +name = "windows" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" +dependencies = [ + "windows-core", + "windows-targets 0.52.5", +] + +[[package]] +name = "windows-core" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +dependencies = [ + "windows-targets 0.52.5", +] + [[package]] name = "windows-sys" version = "0.48.0" @@ -2790,7 +3705,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.0", + "windows-targets 0.52.5", ] [[package]] @@ -2810,17 +3725,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" dependencies = [ - "windows_aarch64_gnullvm 0.52.0", - "windows_aarch64_msvc 0.52.0", - "windows_i686_gnu 0.52.0", - "windows_i686_msvc 0.52.0", - "windows_x86_64_gnu 0.52.0", - "windows_x86_64_gnullvm 0.52.0", - "windows_x86_64_msvc 0.52.0", + "windows_aarch64_gnullvm 0.52.5", + "windows_aarch64_msvc 0.52.5", + "windows_i686_gnu 0.52.5", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.5", + "windows_x86_64_gnu 0.52.5", + "windows_x86_64_gnullvm 0.52.5", + "windows_x86_64_msvc 0.52.5", ] [[package]] @@ -2831,9 +3747,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" +checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" [[package]] name = "windows_aarch64_msvc" @@ -2843,9 +3759,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" +checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" [[package]] name = "windows_i686_gnu" @@ -2855,9 +3771,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" +checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" [[package]] name = "windows_i686_msvc" @@ -2867,9 +3789,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" +checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" [[package]] name = "windows_x86_64_gnu" @@ -2879,9 +3801,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" +checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" [[package]] name = "windows_x86_64_gnullvm" @@ -2891,9 +3813,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" +checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" [[package]] name = "windows_x86_64_msvc" @@ -2903,28 +3825,38 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" + +[[package]] +name = "winreg" version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" +checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", +] [[package]] name = "zerocopy" -version = "0.7.30" +version = "0.7.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "306dca4455518f1f31635ec308b6b3e4eb1b11758cefafc782827d0aa7acb5c7" +checksum = "ae87e3fcd617500e5d106f0380cf7b77f3c6092aae37191433159dda23cfb087" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.30" +version = "0.7.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be912bf68235a88fbefd1b73415cb218405958d1655b2ece9035a19920bdf6ba" +checksum = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.65", ] [[package]] @@ -2935,28 +3867,27 @@ checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" [[package]] name = "zstd" -version = "0.12.4" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a27595e173641171fc74a1232b7b1c7a7cb6e18222c11e9dfb9888fa424c53c" +checksum = "2d789b1514203a1120ad2429eae43a7bd32b90976a7bb8a05f7ec02fa88cc23a" dependencies = [ "zstd-safe", ] [[package]] name = "zstd-safe" -version = "6.0.6" +version = "7.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee98ffd0b48ee95e6c5168188e44a54550b1564d9d530ee21d5f0eaed1069581" +checksum = "1cd99b45c6bc03a018c8b8a86025678c87e55526064e38f9df301989dce7ec0a" dependencies = [ - "libc", "zstd-sys", ] [[package]] name = "zstd-sys" -version = "2.0.9+zstd.1.5.5" +version = "2.0.10+zstd.1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" +checksum = "c253a4914af5bafc8fa8c86ee400827e83cf6ec01195ec1f1ed8441bf00d65aa" dependencies = [ "cc", "pkg-config", diff --git a/Cargo.toml b/Cargo.toml index e3c396e..85a6b96 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,4 +1,54 @@ -[workspace] -resolver = "2" +[package] +name = "backend" +version = "0.2.0" +edition = "2021" +license = "MIT" -members = ["packages/server"] +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +actix-web = "4.6.0" +actix-web-lab = "0.20.2" +actix-cors = "0.7.0" +actix-ws = "0.2.5" +actix-governor = "0.5.0" +actix-multipart = "0.6.1" + +tokio = { version = "1.37.0", default-features = false } + +once_cell = "1.19.0" +url = { version = "2.5.0", features = ["serde"] } + +rusty-s3 = "0.5.0" + +serde = "1.0.202" +serde_json = "1.0.117" +serde_with = "3.8.1" + +sqlx = { version = "0.7.4", features = [ + "mysql", + "runtime-tokio", + "tls-rustls", + "chrono", +] } +sha2 = "0.10.8" +base64 = "0.22.1" +password-auth = "1.0.0" +cuid2 = "0.1.2" +snowflaked = "1.0.3" + +thiserror = "1.0.61" +dotenvy = "0.15.7" +futures = "0.3.30" + +chrono = { version = "0.4.38", features = ["serde"] } +validator = { version = "0.18.1", features = ["derive"] } +ts-rs = { version = "8.1.0", features = ["chrono-impl", "url-impl"] } + +sentry = "0.32.3" +sentry-log = "0.32.3" +sentry-actix = "0.32.3" +log = "0.4.21" +pretty_env_logger = "0.5.0" +indexmap = "2.2.6" +dashmap = { version = "5.5.3", features = ["inline"] } diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..3be8afa --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +FROM rust:1.77-bullseye AS builder + +WORKDIR /usr/src/backend + +COPY . . + +RUN cargo build --release + +FROM debian:bullseye-slim + +COPY --from=builder /usr/src/backend/target/release/backend /usr/local/bin/ + +CMD ["/usr/local/bin/backend"] diff --git a/README.md b/README.md index 8cac838..d05d8cc 100644 --- a/README.md +++ b/README.md @@ -1,35 +1,38 @@ -# biasdo +
+ +
+ +biasdo + +
+ +
biasdo is an open source chat app made for users, by users. -## Stack +## Technologies -biasdo is built with the following technologies: +biasdo uses technologies made by the open source community, and a +detailed list can be found in the [root package.json](package.json), [client package.json](packages/client/package.json), and [backend Cargo.toml](Cargo.toml), but the core technologies are: -- actix-web -- sqlx -- MariaDB -- Svelte -- SvelteKit -- TypeScript -- TailwindCSS +- [SvelteKit](https://kit.svelte.dev) for the frontend +- [actix-web](https://actix.rs) for the backend +- [SQLx](https://github.com/launchbadge/sqlx) for the type-safe database queries +- [MariaDB](https://mariadb.org) as the database -## Host +## Public instance -biasdo is hosted by [fly.io](https://fly.io) and [Vercel](https://vercel.com). +The official public biasdo instance is hosted by [fly.io](https://fly.io) (backend) and [Vercel](https://vercel.com) (frontend). The instance is available at [biasdo.daimond113.com](https://biasdo.daimond113.com), and it's api at [api.biasdo.daimond113.com](https://api.biasdo.daimond113.com). ## Self-hosting -A public instance of biasdo is available at [biasdo.daimond113.com](https://biasdo.daimond113.com), and it's api at [biasdo-api.daimond113.com](https://biasdo-api.daimond113.com). If you want to self-host biasdo, you can follow the instructions below. - ### Client 1. Clone the repository 2. Go into the `packages/client` directory and create a `.env` file with the following contents: ```sh -VITE_API_URL= # the url of the api, for example https://biasdo-api.daimond113.com (IMPORTANT: do not include a trailing slash) -VITE_APP_NAME=biasdo # although you can change this to whatever you want, it would be nice if you kept it as biasdo +VITE_API_URL= # the url of the api, for example https://api.biasdo.daimond113.com/v0 (IMPORTANT: do not include a trailing slash) ``` 3. Install the dependencies @@ -38,17 +41,15 @@ VITE_APP_NAME=biasdo # although you can change this to whatever you want, it wou ### API 1. Clone the repository -2. Go into the `packages/server` directory and create a `.env` file with the following contents: +2. Create a `.env` file with the following contents: ```sh -DATABASE_URL= # the url of the database, for example mysql://root:password@localhost:3306/biasdo (IMPORTANT: the app uses MariaDB, and will NOT work with MySQL as it uses the RETURNING keyword) +DATABASE_URL= # the url of the database, for example mysql://root:password@localhost:3306/biasdo (IMPORTANT: biasdo uses MariaDB, and has not been tested with MySQL) ``` 3. Install the dependencies -4. Install the sqlx CLI by running `cargo install sqlx-cli` -5. Run `cargo sqlx database create` to create the database -6. Run `cargo sqlx migrate run` to run the migrations -7. Now you can build and run the app like any other cargo project +4. Create the database using `CREATE DATABASE `; +5. Now you can build and run the app like any other Cargo project ## Contributing diff --git a/biasdo-maria/fly.toml b/biasdo-maria/fly.toml index 80d6dd8..20babfb 100644 --- a/biasdo-maria/fly.toml +++ b/biasdo-maria/fly.toml @@ -14,8 +14,8 @@ source = "mariadbdata" destination = "/data" [env] -MYSQL_DATABASE = "biasdo" -MYSQL_USER = "biasdo-server" +MYSQL_DATABASE = "biasdo-v2" +MYSQL_USER = "biasdo-backend" [build] diff --git a/build.rs b/build.rs new file mode 100644 index 0000000..d506869 --- /dev/null +++ b/build.rs @@ -0,0 +1,5 @@ +// generated by `sqlx migrate build-script` +fn main() { + // trigger recompilation when a new migration is added + println!("cargo:rerun-if-changed=migrations"); +} diff --git a/packages/server/docker-compose.yaml b/docker-compose.yaml similarity index 60% rename from packages/server/docker-compose.yaml rename to docker-compose.yaml index e6b2efd..178cdd8 100644 --- a/packages/server/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,4 +1,4 @@ -name: biasdo-server +name: biasdo-backend services: mysql: image: mariadb:latest @@ -10,14 +10,6 @@ services: - backend restart: unless-stopped -# redis: -# image: redis:latest -# ports: -# - '6379:6379' -# networks: -# - backend -# restart: unless-stopped - networks: backend: driver: bridge diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 0000000..90ba7f8 --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,94 @@ +import eslintConfigPrettier from "eslint-config-prettier" +import eslintPluginPrettier from "eslint-plugin-prettier/recommended" +import eslintPluginSvelte from "eslint-plugin-svelte" +import eslintPluginTailwindcss from "eslint-plugin-tailwindcss" +import svelteParser from "svelte-eslint-parser" +import tsEslint from "typescript-eslint" + +export default [ + ...tsEslint.configs.recommended, + ...eslintPluginSvelte.configs["flat/recommended"], + ...eslintPluginSvelte.configs["flat/prettier"], + eslintPluginPrettier, + eslintConfigPrettier, + { + name: "tailwindcss:base", + plugins: { + get tailwindcss() { + return eslintPluginTailwindcss + }, + }, + languageOptions: { + parserOptions: { + ecmaFeatures: { + jsx: true, + }, + }, + }, + }, + { + rules: { + "sort-imports": [ + "error", + { + allowSeparatedGroups: true, + }, + ], + }, + }, + { + name: "tailwindcss:rules", + rules: { + "tailwindcss/classnames-order": "warn", + "tailwindcss/enforces-negative-arbitrary-values": "warn", + "tailwindcss/enforces-shorthand": "warn", + "tailwindcss/migration-from-tailwind-2": "warn", + "tailwindcss/no-arbitrary-value": "off", + "tailwindcss/no-custom-classname": [ + "warn", + { + whitelist: [], + }, + ], + "tailwindcss/no-contradicting-classname": "error", + "tailwindcss/no-unnecessary-arbitrary-value": "warn", + }, + }, + { + files: ["**/*.svelte"], + languageOptions: { + parser: svelteParser, + parserOptions: { + parser: tsEslint.parser, + }, + }, + rules: { + "svelte/no-target-blank": "error", + "svelte/no-at-debug-tags": "error", + "svelte/no-reactive-functions": "error", + "svelte/no-reactive-literals": "error", + }, + }, + { + files: ["**/*.ts", "**/*.tsx"], + languageOptions: { + parser: tsEslint.parser, + }, + }, + { + plugins: { + "@typescript-eslint": tsEslint.plugin, + }, + }, + { + ignores: [ + ".DS_Store", + "node_modules", + ".svelte-kit", + ".env", + ".env.*", + "!.env.example", + "pnpm-lock.yaml", + ], + }, +] diff --git a/packages/server/fly.toml b/fly.toml similarity index 100% rename from packages/server/fly.toml rename to fly.toml diff --git a/migrations/20240427130855_init.sql b/migrations/20240427130855_init.sql new file mode 100644 index 0000000..581dcb5 --- /dev/null +++ b/migrations/20240427130855_init.sql @@ -0,0 +1,196 @@ +CREATE TABLE User +( + id BIGINT UNSIGNED PRIMARY KEY, + -- ci is very important for case-insensitive comparison in the unique constraint + username VARCHAR(32) COLLATE utf8mb4_unicode_ci NOT NULL UNIQUE, + display_name VARCHAR(32), + password VARCHAR(128) NOT NULL, + email VARCHAR(255) COLLATE utf8mb4_unicode_ci NOT NULL UNIQUE, + email_verified BOOLEAN NOT NULL DEFAULT FALSE, + began_deletion_at TIMESTAMP +); + +CREATE INDEX User_username ON User (username); + +CREATE TABLE UserFriendRequest +( + sender_id BIGINT UNSIGNED NOT NULL, + receiver_id BIGINT UNSIGNED NOT NULL, + created_at TIMESTAMP NOT NULL DEFAULT NOW(), + PRIMARY KEY (sender_id, receiver_id), + FOREIGN KEY (sender_id) REFERENCES User (id) ON DELETE CASCADE, + FOREIGN KEY (receiver_id) REFERENCES User (id) ON DELETE CASCADE +); + +CREATE TABLE UserFriend +( + user_id BIGINT UNSIGNED NOT NULL, + friend_id BIGINT UNSIGNED NOT NULL, + created_at TIMESTAMP NOT NULL DEFAULT NOW(), + PRIMARY KEY (user_id, friend_id), + FOREIGN KEY (user_id) REFERENCES User (id) ON DELETE CASCADE, + FOREIGN KEY (friend_id) REFERENCES User (id) ON DELETE CASCADE +); + +CREATE TABLE UserSession +( + id CHAR(64) PRIMARY KEY, + user_id BIGINT UNSIGNED NOT NULL, + created_at TIMESTAMP NOT NULL DEFAULT NOW(), + expires_at TIMESTAMP NOT NULL DEFAULT (TIMESTAMPADD(DAY, 30, NOW())), + FOREIGN KEY (user_id) REFERENCES User (id) ON DELETE CASCADE +); + +CREATE INDEX UserSession_user_id ON UserSession (user_id); +CREATE INDEX UserSession_expires_at ON UserSession (expires_at); + +CREATE TABLE Client +( + id BIGINT UNSIGNED PRIMARY KEY, + name VARCHAR(24) NOT NULL, + secret CHAR(64) UNIQUE, + owner_id BIGINT UNSIGNED NOT NULL, + client_uri VARCHAR(255), + tos_uri VARCHAR(255), + policy_uri VARCHAR(255), + FOREIGN KEY (owner_id) REFERENCES User (id) ON DELETE CASCADE +); + +CREATE TABLE ClientRedirect +( + client_id BIGINT UNSIGNED NOT NULL, + uri VARCHAR(255) NOT NULL, + PRIMARY KEY (client_id, uri), + FOREIGN KEY (client_id) REFERENCES Client (id) ON DELETE CASCADE +); + +CREATE TABLE ClientToken +( + access_token CHAR(66) PRIMARY KEY, + client_id BIGINT UNSIGNED NOT NULL, + created_at TIMESTAMP NOT NULL DEFAULT NOW(), + expires_at TIMESTAMP NOT NULL DEFAULT (TIMESTAMPADD(MINUTE, 10, NOW())), + scope SET ('profile.read', 'profile.write', 'servers.read', 'servers.write', 'messages.read', 'messages.write', 'friends.read', 'friends.write') NOT NULL, + FOREIGN KEY (client_id) REFERENCES Client (id) ON DELETE CASCADE +); + +CREATE INDEX ClientToken_expires_at ON ClientToken (expires_at); + +CREATE TABLE AuthorizationCode +( + id CHAR(32) PRIMARY KEY, + created_at TIMESTAMP NOT NULL DEFAULT NOW(), + expires_at TIMESTAMP NOT NULL DEFAULT (TIMESTAMPADD(MINUTE, 10, NOW())), + client_id BIGINT UNSIGNED NOT NULL, + user_id BIGINT UNSIGNED NOT NULL, + scope SET ('profile.read', 'profile.write', 'servers.read', 'servers.write', 'messages.read', 'messages.write', 'friends.read', 'friends.write') NOT NULL, + code_challenge VARCHAR(128), + code_challenge_method ENUM ('plain', 'S256') NOT NULL, + FOREIGN KEY (client_id) REFERENCES Client (id) ON DELETE CASCADE, + FOREIGN KEY (user_id) REFERENCES User (id) ON DELETE CASCADE +); + +CREATE INDEX AuthorizationCode_expires_at ON AuthorizationCode (expires_at); + +CREATE TABLE ClientUserTokens +( + user_id BIGINT UNSIGNED NOT NULL, + client_id BIGINT UNSIGNED NOT NULL, + created_at TIMESTAMP NOT NULL DEFAULT NOW(), + access_expires_at TIMESTAMP NOT NULL DEFAULT (TIMESTAMPADD(MINUTE, 10, NOW())), + expires_at TIMESTAMP NOT NULL DEFAULT (TIMESTAMPADD(DAY, 30, NOW())), + auth_code CHAR(32) UNIQUE, + access_token CHAR(66) NOT NULL UNIQUE, + refresh_token CHAR(66) NOT NULL UNIQUE, + scope SET ('profile.read', 'profile.write', 'servers.read', 'servers.write', 'messages.read', 'messages.write', 'friends.read', 'friends.write') NOT NULL, + PRIMARY KEY (user_id, client_id), + FOREIGN KEY (user_id) REFERENCES User (id) ON DELETE CASCADE, + FOREIGN KEY (client_id) REFERENCES Client (id) ON DELETE CASCADE, + FOREIGN KEY (auth_code) REFERENCES AuthorizationCode (id) ON DELETE SET NULL +); + +CREATE INDEX ClientUserTokens_access_token ON ClientUserTokens (access_token, access_expires_at); +CREATE INDEX ClientUserTokens_refresh_token ON ClientUserTokens (refresh_token); +CREATE INDEX ClientUserTokens_expires_at ON ClientUserTokens (expires_at); + +CREATE TABLE Server +( + id BIGINT UNSIGNED PRIMARY KEY, + name VARCHAR(32) NOT NULL, + owner_id BIGINT UNSIGNED NOT NULL, + FOREIGN KEY (owner_id) REFERENCES User (id) ON DELETE CASCADE +); + +CREATE TABLE ServerMember +( + server_id BIGINT UNSIGNED NOT NULL, + user_id BIGINT UNSIGNED NOT NULL, + created_at TIMESTAMP NOT NULL DEFAULT NOW(), + nickname VARCHAR(32), + PRIMARY KEY (server_id, user_id), + FOREIGN KEY (server_id) REFERENCES Server (id) ON DELETE CASCADE, + FOREIGN KEY (user_id) REFERENCES User (id) ON DELETE CASCADE +); + +CREATE TABLE Channel +( + id BIGINT UNSIGNED PRIMARY KEY, + name VARCHAR(32) NOT NULL, + kind ENUM ('text', 'DM') NOT NULL, + server_id BIGINT UNSIGNED, + FOREIGN KEY (server_id) REFERENCES Server (id) ON DELETE CASCADE +); + +CREATE TABLE DMChannelRecipient +( + channel_id BIGINT UNSIGNED NOT NULL, + user_id BIGINT UNSIGNED NOT NULL, + PRIMARY KEY (channel_id, user_id), + FOREIGN KEY (channel_id) REFERENCES Channel (id) ON DELETE CASCADE, + FOREIGN KEY (user_id) REFERENCES User (id) ON DELETE CASCADE +); + +CREATE TABLE ChannelMessage +( + id BIGINT UNSIGNED PRIMARY KEY, + updated_at TIMESTAMP, + content TEXT NOT NULL, + kind ENUM ('text') NOT NULL, + channel_id BIGINT UNSIGNED NOT NULL, + user_id BIGINT UNSIGNED NOT NULL, + FOREIGN KEY (channel_id) REFERENCES Channel (id) ON DELETE CASCADE, + FOREIGN KEY (user_id) REFERENCES User (id) ON DELETE CASCADE +); + +CREATE TABLE ServerInvite +( + id CHAR(24) PRIMARY KEY, + created_at TIMESTAMP NOT NULL DEFAULT NOW(), + expires_at TIMESTAMP NOT NULL DEFAULT (TIMESTAMPADD(DAY, 7, NOW())), + server_id BIGINT UNSIGNED NOT NULL, + FOREIGN KEY (server_id) REFERENCES Server (id) ON DELETE CASCADE +); + +CREATE INDEX Invite_expires_at ON ServerInvite (expires_at); + +CREATE EVENT expires_at_cleanup + ON SCHEDULE EVERY 1 DAY + DO + BEGIN + DELETE FROM UserSession WHERE expires_at <= NOW(); + DELETE FROM ClientToken WHERE expires_at <= NOW(); + DELETE FROM AuthorizationCode WHERE expires_at <= NOW(); + DELETE FROM ClientUserTokens WHERE expires_at <= NOW(); + DELETE FROM ServerInvite WHERE expires_at <= NOW(); + END; + +CREATE EVENT user_deletion_cleanup + ON SCHEDULE EVERY 8 HOUR + DO + BEGIN + DELETE User, Channel + FROM User + INNER JOIN DMChannelRecipient ON DMChannelRecipient.user_id = User.id + INNER JOIN Channel ON Channel.id = DMChannelRecipient.channel_id + WHERE User.began_deletion_at <= NOW() - INTERVAL 7 DAY; + END; \ No newline at end of file diff --git a/package.json b/package.json index 20fd323..94fd9f8 100644 --- a/package.json +++ b/package.json @@ -1,14 +1,25 @@ { - "name": "@biasdo/core", + "name": "@biasdo/root", "license": "MIT", + "type": "module", "devDependencies": { - "turbo": "^1.11.1" + "eslint": "^9.3.0", + "eslint-config-prettier": "^9.1.0", + "eslint-plugin-prettier": "^5.1.3", + "eslint-plugin-svelte": "^2.39.0", + "eslint-plugin-tailwindcss": "^3.17.0", + "prettier": "^3.2.5", + "prettier-plugin-svelte": "^3.2.3", + "prettier-plugin-tailwindcss": "^0.5.14", + "svelte-eslint-parser": "^0.36.0", + "typescript": "^5.4.5", + "typescript-eslint": "^7.10.0" }, "pnpm": { "patchedDependencies": { - "svelte-portal@2.2.0": "patches/svelte-portal@2.2.0.patch", "svelte-virtual-scroll-list@1.3.0": "patches/svelte-virtual-scroll-list@1.3.0.patch", - "markdown-it-shikiji@0.9.7": "patches/markdown-it-shikiji@0.9.7.patch" + "carta-md@4.0.4": "patches/carta-md@4.0.4.patch", + "svelte-portal@2.2.1": "patches/svelte-portal@2.2.1.patch" } } } \ No newline at end of file diff --git a/packages/client/.eslintignore b/packages/client/.eslintignore deleted file mode 100644 index 3897265..0000000 --- a/packages/client/.eslintignore +++ /dev/null @@ -1,13 +0,0 @@ -.DS_Store -node_modules -/build -/.svelte-kit -/package -.env -.env.* -!.env.example - -# Ignore files for PNPM, NPM and YARN -pnpm-lock.yaml -package-lock.json -yarn.lock diff --git a/packages/client/.eslintrc.cjs b/packages/client/.eslintrc.cjs deleted file mode 100644 index ebc1958..0000000 --- a/packages/client/.eslintrc.cjs +++ /dev/null @@ -1,30 +0,0 @@ -module.exports = { - root: true, - extends: [ - 'eslint:recommended', - 'plugin:@typescript-eslint/recommended', - 'plugin:svelte/recommended', - 'prettier' - ], - parser: '@typescript-eslint/parser', - plugins: ['@typescript-eslint'], - parserOptions: { - sourceType: 'module', - ecmaVersion: 2020, - extraFileExtensions: ['.svelte'] - }, - env: { - browser: true, - es2017: true, - node: true - }, - overrides: [ - { - files: ['*.svelte'], - parser: 'svelte-eslint-parser', - parserOptions: { - parser: '@typescript-eslint/parser' - } - } - ] -}; diff --git a/packages/client/.gitignore b/packages/client/.gitignore deleted file mode 100644 index 6635cf5..0000000 --- a/packages/client/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -.DS_Store -node_modules -/build -/.svelte-kit -/package -.env -.env.* -!.env.example -vite.config.js.timestamp-* -vite.config.ts.timestamp-* diff --git a/packages/client/.prettierrc b/packages/client/.prettierrc deleted file mode 100644 index 3eb0b79..0000000 --- a/packages/client/.prettierrc +++ /dev/null @@ -1,21 +0,0 @@ -{ - "semi": false, - "useTabs": true, - "singleQuote": true, - "trailingComma": "none", - "printWidth": 100, - "plugins": [ - "prettier-plugin-svelte" - ], - "pluginSearchDirs": [ - "." - ], - "overrides": [ - { - "files": "*.svelte", - "options": { - "parser": "svelte" - } - } - ] -} \ No newline at end of file diff --git a/packages/client/README.md b/packages/client/README.md deleted file mode 100644 index 5c91169..0000000 --- a/packages/client/README.md +++ /dev/null @@ -1,38 +0,0 @@ -# create-svelte - -Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte). - -## Creating a project - -If you're seeing this, you've probably already done this step. Congrats! - -```bash -# create a new project in the current directory -npm create svelte@latest - -# create a new project in my-app -npm create svelte@latest my-app -``` - -## Developing - -Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: - -```bash -npm run dev - -# or start the server and open the app in a new browser tab -npm run dev -- --open -``` - -## Building - -To create a production version of your app: - -```bash -npm run build -``` - -You can preview the production build with `npm run preview`. - -> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment. diff --git a/packages/client/package.json b/packages/client/package.json index bd933f9..fd33820 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,59 +1,50 @@ { - "name": "@biasdo/client", - "version": "0.0.1", - "private": true, - "license": "MIT", - "scripts": { - "dev": "vite dev", - "build": "vite build", - "preview": "vite preview", - "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", - "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", - "lint": "prettier --plugin-search-dir . --check . && eslint .", - "format": "prettier --plugin-search-dir . --write ." - }, - "devDependencies": { - "@biasdo/server-utils": "workspace:*", - "@sveltejs/adapter-vercel": "^4.0.0", - "@sveltejs/kit": "^2.0.0", - "@sveltejs/vite-plugin-svelte": "^3.0.0", - "@types/dompurify": "^3.0.5", - "@types/markdown-it": "^13.0.7", - "@typescript-eslint/eslint-plugin": "^6.14.0", - "@typescript-eslint/parser": "^6.14.0", - "autoprefixer": "^10.4.16", - "eslint": "^8.56.0", - "eslint-config-prettier": "^9.1.0", - "eslint-plugin-svelte": "^2.35.1", - "postcss": "^8.4.32", - "prettier": "^3.1.1", - "prettier-plugin-svelte": "^3.1.2", - "svelte": "^4.2.8", - "svelte-check": "^3.6.2", - "tailwindcss": "^3.3.6", - "tslib": "^2.6.2", - "typescript": "^5.3.3", - "vite": "^5.0.10", - "vite-plugin-inspect": "^0.8.1" - }, - "type": "module", - "dependencies": { - "@felte/validator-zod": "^1.0.17", - "@floating-ui/core": "^1.5.2", - "@fontsource-variable/inter": "^5.0.16", - "@fontsource/rammetto-one": "^5.0.18", - "clsx": "^2.0.0", - "dompurify": "^3.0.6", - "felte": "^1.2.12", - "katex": "^0.16.9", - "markdown-it": "^14.0.0", - "markdown-it-katex": "github:zackw/markdown-it-katex", - "markdown-it-shikiji": "^0.9.7", - "shikiji": "^0.9.7", - "svelte-floating-ui": "^1.5.8", - "svelte-portal": "^2.2.0", - "svelte-virtual-scroll-list": "^1.3.0", - "tailwind-merge": "^2.1.0", - "zod": "^3.22.4" - } + "name": "@biasdo/client", + "version": "0.0.1", + "private": true, + "license": "MIT", + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview", + "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", + "lint": "prettier --plugin-search-dir . --check . && eslint .", + "format": "prettier --plugin-search-dir . --write ." + }, + "devDependencies": { + "@biasdo/server-utils": "workspace:*", + "@sveltejs/adapter-vercel": "^5.3.0", + "@sveltejs/kit": "^2.5.10", + "@sveltejs/vite-plugin-svelte": "^3.0.0", + "@types/dompurify": "^3.0.5", + "autoprefixer": "^10.4.16", + "postcss": "^8.4.32", + "sass": "^1.77.2", + "svelte": "^4.2.17", + "svelte-check": "^3.7.1", + "tailwindcss": "^3.3.6", + "tslib": "^2.6.2", + "typescript": "^5.3.3", + "vite": "^5.2.11", + "vite-plugin-inspect": "^0.8.1" + }, + "type": "module", + "dependencies": { + "@cartamd/plugin-code": "^4.0.5", + "@cartamd/plugin-math": "^4.0.3", + "@floating-ui/core": "^1.6.2", + "@fontsource-variable/inter": "^5.0.16", + "@tailwindcss/typography": "^0.5.13", + "carta-md": "^4.0.4", + "dompurify": "^3.1.4", + "felte": "^1.2.12", + "katex": "^0.16.9", + "lucide-svelte": "^0.379.0", + "sorted-btree": "^1.8.1", + "svelte-floating-ui": "^1.5.8", + "svelte-portal": "^2.2.1", + "svelte-virtual-scroll-list": "^1.3.0", + "tailwind-merge": "^2.1.0" + } } \ No newline at end of file diff --git a/packages/client/src/app.css b/packages/client/src/app.css deleted file mode 100644 index deb9b9b..0000000 --- a/packages/client/src/app.css +++ /dev/null @@ -1,99 +0,0 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; - -:root { - --root-background: #131c14; - --text-color: #c6d8c8; - --link-color: #55eb69; - - --paper-level-1-rgb: 66 98 70; - --paper-level-1-transparency: 20%; - --paper-level-1: rgb(var(--paper-level-1-rgb) / var(--paper-level-1-transparency)); - --paper-level-1-outline: #426246; - - --secondary-button-active: rgb(66 98 70 / 0.8); - --secondary-button-active-outline: #8fb393; - - --text-field: transparent; - --text-field-outline: #527a57; - --text-field-placeholder: rgb(198 216 200 / 0.6); - - --primary-button: rgb(38 103 46 / 0.8); - --primary-button-outline: #5ee46d; - --primary-button-text: #bbf9c3; - - --error-paper: rgb(53 8 8 / 0.8); - --error-paper-outline: rgb(155 24 24); - --error-paper-text: #ffb8b8; - - --modal-background: color-mix( - in srgb, - var(--root-background) 100%, - rgb(var(--paper-level-1-rgb)) var(--paper-level-1-transparency) - ); - - --error-button: rgb(227 16 16 / 0.3); - --error-button-outline: #fe5555; - - --logo-font: 'Rammetto One', sans-serif; - - --scrollbar-track: #527a57; - --scrollbar-thumb: #c6d8c8; - --scrollbar-thumb-hover: #55eb69; - - scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track); -} - -::backdrop { - --modal-backdrop: rgb(4 28 2 / 0.25); -} - -dialog { - color: var(--text-color); -} - -html { - background-color: var(--root-background); - color: var(--text-color); -} - -a:not([data-not-standard]) { - color: var(--link-color); - text-decoration: none; -} - -::-webkit-scrollbar { - width: 8px; - height: 8px; -} - -::-webkit-scrollbar-track { - background: var(--scrollbar-track); - border-radius: 4px; -} - -::-webkit-scrollbar-thumb { - background: var(--scrollbar-thumb); - border-radius: 4px; -} - -::-webkit-scrollbar-thumb:hover { - background: var(--scrollbar-thumb-hover); -} - -@layer utilities { - @supports (height: 1svh) { - .h-screen { - height: 100svh; - } - } -} - -h1 { - @apply font-bold text-2xl; -} - -h2 { - @apply font-semibold text-xl; -} diff --git a/packages/client/src/app.d.ts b/packages/client/src/app.d.ts index f59b884..bf6daa3 100644 --- a/packages/client/src/app.d.ts +++ b/packages/client/src/app.d.ts @@ -9,4 +9,4 @@ declare global { } } -export {}; +export {} diff --git a/packages/client/src/app.html b/packages/client/src/app.html index 59c9ff0..7b06f7a 100644 --- a/packages/client/src/app.html +++ b/packages/client/src/app.html @@ -1,16 +1,18 @@ - + - - - - - - - + + + + + + + + + biasdo %sveltekit.head% diff --git a/packages/client/src/app.scss b/packages/client/src/app.scss new file mode 100644 index 0000000..eb558fd --- /dev/null +++ b/packages/client/src/app.scss @@ -0,0 +1,141 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; + +@layer utilities { + @supports (height: 1svh) { + .h-screen { + height: 100svh; + } + } + + .overflow-text { + @apply min-w-0 overflow-hidden text-ellipsis whitespace-nowrap; + } + + .no-scrollbar { + scrollbar-width: none; /* Firefox */ + + &::-webkit-scrollbar { + background: transparent; /* Chrome/Safari/Webkit */ + width: 0px; + } + } +} + +.markdown-body { + @apply prose prose-biasdo lg:max-w-[100ch]; + + & > *:first-child { + @apply mt-0; + } + + & > *:last-child { + @apply mb-0; + } +} + +.virtual-scroll-root { + width: 100% !important; + height: 100% !important; +} + +.carta-theme__biasdo { + &.carta-editor { + @apply bg-paper-2-bg w-full rounded-md; + + ::placeholder { + @apply text-placeholder-text; + } + + .carta-wrapper { + @apply grow overflow-y-auto px-3 py-2; + + .carta-container { + @apply max-h-60; + } + } + + .carta-font-code { + @apply caret-text font-mono; + } + + .carta-toolbar { + @apply hidden; + } + } +} + +:root { + scrollbar-color: theme("colors.scrollbar.thumb") + theme("colors.scrollbar.track"); +} + +dialog { + @apply text-text; +} + +html { + @apply bg-background text-text; +} + +a:not([data-not-standard]) { + @apply text-link no-underline; +} + +::-webkit-scrollbar { + width: 8px; + height: 8px; +} + +::-webkit-scrollbar-track { + @apply bg-scrollbar-track; + border-radius: 4px; +} + +::-webkit-scrollbar-thumb { + @apply bg-scrollbar-thumb; + border-radius: 4px; +} + +::-webkit-scrollbar-thumb:hover { + @apply bg-scrollbar-thumb-hover; +} + +h1 { + @apply text-2xl font-bold; +} + +h2 { + @apply text-xl font-semibold; +} + +dialog[open] { + @apply scale-100; +} + +dialog { + @apply scale-0; + transition: all 250ms allow-discrete; +} + +@starting-style { + dialog[open] { + @apply scale-0; + } +} + +dialog::backdrop { + @apply bg-paper-1-bg/0; + transition: all 250ms allow-discrete; +} + +dialog[open]::backdrop { + @apply bg-paper-1-bg/75; +} + +@starting-style { + dialog[open]::backdrop { + @apply bg-paper-1-bg/0; + } +} diff --git a/packages/client/src/lib/BoxLayout.svelte b/packages/client/src/lib/BoxLayout.svelte new file mode 100644 index 0000000..3d9a28a --- /dev/null +++ b/packages/client/src/lib/BoxLayout.svelte @@ -0,0 +1,25 @@ + + +
+
+
+ + {@html logo} +
+
+ +
+
+
diff --git a/packages/client/src/lib/Button.svelte b/packages/client/src/lib/Button.svelte index 10c4e8d..59a4bd8 100644 --- a/packages/client/src/lib/Button.svelte +++ b/packages/client/src/lib/Button.svelte @@ -1,33 +1,39 @@ {#if href} - + {:else} diff --git a/packages/client/src/lib/ErrorPage.svelte b/packages/client/src/lib/ErrorPage.svelte new file mode 100644 index 0000000..466766a --- /dev/null +++ b/packages/client/src/lib/ErrorPage.svelte @@ -0,0 +1,8 @@ + + +
+

{error.message}

+
diff --git a/packages/client/src/lib/LoadingSpinner.svelte b/packages/client/src/lib/LoadingSpinner.svelte new file mode 100644 index 0000000..bb099b4 --- /dev/null +++ b/packages/client/src/lib/LoadingSpinner.svelte @@ -0,0 +1,8 @@ + + +
Loading...
+
+ +
diff --git a/packages/client/src/lib/Modal.svelte b/packages/client/src/lib/Modal.svelte index 20dbd07..b149924 100644 --- a/packages/client/src/lib/Modal.svelte +++ b/packages/client/src/lib/Modal.svelte @@ -1,16 +1,19 @@ @@ -18,41 +21,16 @@ bind:this={dialog} on:close={() => (showModal = false)} on:click|self={() => dialog.close()} - class={cn('backdrop:bg-[var(--modal-backdrop)] bg-transparent min-w-[24rem]', className)} + class="w-full max-w-96 bg-transparent md:max-w-[32rem] lg:max-w-[48rem]" >
- - diff --git a/packages/client/src/lib/Paper.svelte b/packages/client/src/lib/Paper.svelte deleted file mode 100644 index 2630ac2..0000000 --- a/packages/client/src/lib/Paper.svelte +++ /dev/null @@ -1,16 +0,0 @@ - - -
- -
diff --git a/packages/client/src/lib/SidebarButton.svelte b/packages/client/src/lib/SidebarButton.svelte index afee676..2ef0b8d 100644 --- a/packages/client/src/lib/SidebarButton.svelte +++ b/packages/client/src/lib/SidebarButton.svelte @@ -1,37 +1,37 @@ -{#if notButton} -
+{#if onClick} +
-{:else if href} - - - + {:else} - + {/if} diff --git a/packages/client/src/lib/SidebarDivider.svelte b/packages/client/src/lib/SidebarDivider.svelte deleted file mode 100644 index e510cd6..0000000 --- a/packages/client/src/lib/SidebarDivider.svelte +++ /dev/null @@ -1,3 +0,0 @@ -
diff --git a/packages/client/src/lib/TextField.svelte b/packages/client/src/lib/TextField.svelte index 76cdfbc..79671b2 100644 --- a/packages/client/src/lib/TextField.svelte +++ b/packages/client/src/lib/TextField.svelte @@ -3,102 +3,44 @@ -
+
{#if !withoutLabel} - + {/if} -
- {#if asTextarea} -