diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..c4d70a6 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,3 @@ +.cuddle/ +.git/ +target/ diff --git a/.drone.yml b/.drone.yml index 1bc39c0..5ac87d0 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,88 +1,5 @@ -kind: pipeline -name: default -type: docker - -steps: - - name: load_secret - image: debian:buster-slim - volumes: - - name: ssh - path: /root/.ssh/ - environment: - SSH_KEY: - from_secret: gitea_id_ed25519 - commands: - - mkdir -p $HOME/.ssh/ - - echo "$SSH_KEY" | base64 -d > $HOME/.ssh/id_ed25519 - - - name: build - image: kasperhermansen/cuddle:latest - pull: always - volumes: - - name: ssh - path: /root/.ssh/ - - name: dockersock - path: /var/run - commands: - - apk add bash git - - git remote set-url origin $DRONE_GIT_SSH_URL - - cuddle_cli x setup_ssh - - cuddle_cli x start_deployment - - cuddle_cli x render_templates - - cuddle_cli x render_como_templates - - cuddle_cli x build_release - - cuddle_cli x push_release - - cuddle_cli x deploy_release - environment: - DOCKER_BUILDKIT: 1 - DOCKER_USERNAME: - from_secret: docker_username - DOCKER_PASSWORD: - from_secret: docker_password - SSH_KEY: - from_secret: gitea_id_ed25519 - - - name: push_tags - image: kasperhermansen/drone-semantic-release:latest - pull: always - volumes: - - name: ssh - path: /root/.ssh/ - - name: dockersock - path: /var/run - commands: - - semantic-release --no-ci - environment: - DOCKER_BUILDKIT: 1 - SSH_KEY: - from_secret: gitea_id_ed25519 - depends_on: - - build - - - name: send telegram notification - image: appleboy/drone-telegram - settings: - token: - from_secret: telegram_token - to: 2129601481 - format: markdown - depends_on: - - build - - push_tags - when: - status: [failure, success] - -services: -- name: docker - image: docker:dind - privileged: true - volumes: - - name: dockersock - path: /var/run -volumes: - - name: ssh - temp: {} - - name: dockersock - temp: {} - - +kind: template +load: bust_rustbin_default_template.yaml +name: como +data: + binName: como_bin diff --git a/.env b/.env index 43d682a..f085e71 100644 --- a/.env +++ b/.env @@ -3,6 +3,7 @@ POSTGRES_USER=como POSTGRES_PASSWORD=somenotverysecurepassword DATABASE_URL="postgres://como:somenotverysecurepassword@localhost:5432/como" +SQLX_OFFLINE=true RUST_LOG=como_api=info,como_bin=info,como_core=info,como_domain=info,como_gql=info,como_infrastructure=info,sqlx=debug,tower_http=debug TOKEN_SECRET=something API_PORT=3001 diff --git a/Cargo.lock b/Cargo.lock index 427de5d..4a28616 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -97,26 +97,17 @@ dependencies = [ "libc", ] -[[package]] -name = "ansi_term" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" -dependencies = [ - "winapi", -] - [[package]] name = "anyhow" -version = "1.0.60" +version = "1.0.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c794e162a5eff65c72ef524dfe393eb923c354e350bb78b9c7383df13f3bc142" +checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" [[package]] name = "argon2" -version = "0.4.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db4ce4441f99dbd377ca8a8f57b698c44d0d6e712d8329b5040da5a64aa1ce73" +checksum = "95c2fcf79ad1932ac6269a738109997a83c227c09b75842ae564dc8ede6a861c" dependencies = [ "base64ct", "blake2", @@ -159,21 +150,23 @@ dependencies = [ "memchr", "pin-project-lite", "tokio", + "zstd", + "zstd-safe", ] [[package]] name = "async-graphql" -version = "4.0.6" +version = "4.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84ecd9edbd48b68e44f81b720d83e670d876dce440856feee6c892c8cd3f6798" +checksum = "d9ed522678d412d77effe47b3c82314ac36952a35e6e852093dd48287c421f80" dependencies = [ - "async-graphql-derive", - "async-graphql-parser", - "async-graphql-value", + "async-graphql-derive 4.0.16", + "async-graphql-parser 4.0.16", + "async-graphql-value 4.0.16", "async-stream", "async-trait", + "base64 0.13.0", "bytes", - "fast_chemail", "fnv", "futures-util", "http", @@ -186,6 +179,40 @@ dependencies = [ "regex", "serde", "serde_json", + "serde_urlencoded", + "static_assertions", + "tempfile", + "thiserror", +] + +[[package]] +name = "async-graphql" +version = "5.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "364423936c4b828ac1615ce325e528c5afbe6e6995d799ee5683c7d36720dfa4" +dependencies = [ + "async-graphql-derive 5.0.9", + "async-graphql-parser 5.0.9", + "async-graphql-value 5.0.9", + "async-stream", + "async-trait", + "base64 0.13.0", + "bytes", + "fast_chemail", + "fnv", + "futures-util", + "handlebars", + "http", + "indexmap", + "mime", + "multer", + "num-traits", + "once_cell", + "pin-project-lite", + "regex", + "serde", + "serde_json", + "serde_urlencoded", "static_assertions", "tempfile", "thiserror", @@ -198,9 +225,9 @@ version = "4.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c7a55a393b11b95d952a8f6614c9db55e1875138c364ec34ca40b38e15c7ee71" dependencies = [ - "async-graphql", + "async-graphql 4.0.16", "async-trait", - "axum", + "axum 0.5.17", "bytes", "futures-util", "http-body", @@ -212,27 +239,55 @@ dependencies = [ [[package]] name = "async-graphql-derive" -version = "4.0.6" +version = "4.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8801127f6a7b3af410498d2f971ee6da8f12f9b0b784473da636ce04e5ac565" +checksum = "c121a894495d7d3fc3d4e15e0a9843e422e4d1d9e3c514d8062a1c94b35b005d" dependencies = [ "Inflector", - "async-graphql-parser", + "async-graphql-parser 4.0.16", "darling", "proc-macro-crate", "proc-macro2", "quote", - "syn", + "syn 1.0.99", + "thiserror", +] + +[[package]] +name = "async-graphql-derive" +version = "5.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23a06320343bbe0a1f2e29ec6d1ed34e0460f10e6827b3154a78e4ccc039dbc4" +dependencies = [ + "Inflector", + "async-graphql-parser 5.0.9", + "darling", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 1.0.99", "thiserror", ] [[package]] name = "async-graphql-parser" -version = "4.0.6" +version = "4.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4097e2e3e313a9220df25485046b7749f4b8d749aba8ed7e09e929d60a643e3" +checksum = "6b6c386f398145c6180206c1869c2279f5a3d45db5be4e0266148c6ac5c6ad68" dependencies = [ - "async-graphql-value", + "async-graphql-value 4.0.16", + "pest", + "serde", + "serde_json", +] + +[[package]] +name = "async-graphql-parser" +version = "5.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46ce3b4b57e2a4630ea5e69eeb02fb5ee3c5f48754fcf7fd6a7bf3b4f96538f0" +dependencies = [ + "async-graphql-value 5.0.9", "pest", "serde", "serde_json", @@ -240,9 +295,21 @@ dependencies = [ [[package]] name = "async-graphql-value" -version = "4.0.6" +version = "4.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cbb3f5e2eb77fbe173b102e3a9321a5f93a491f9c5ef3850e1155ae83c49e88" +checksum = "7a941b499fead4a3fb5392cabf42446566d18c86313f69f2deab69560394d65f" +dependencies = [ + "bytes", + "indexmap", + "serde", + "serde_json", +] + +[[package]] +name = "async-graphql-value" +version = "5.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "637c6b5a755133d47c9829df04b7a5e2f1856fe4c1101f581650c93198eba103" dependencies = [ "bytes", "indexmap", @@ -268,7 +335,7 @@ dependencies = [ "anyhow", "async-lock", "async-trait", - "base64", + "base64 0.13.0", "bincode", "blake3", "chrono", @@ -298,27 +365,18 @@ checksum = "10f203db73a71dfa2fb6dd22763990fa26f3d2625a6da2da900d23b87d26be27" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.99", ] [[package]] name = "async-trait" -version = "0.1.57" +version = "0.1.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76464446b8bc32758d7e88ee1a804d9914cd9b1cb264c029899680b0be29826f" +checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" dependencies = [ "proc-macro2", "quote", - "syn", -] - -[[package]] -name = "atoi" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "616896e05fc0e2649463a93a15183c6a16bf03413a7af88ef1285ddedfa9cda5" -dependencies = [ - "num-traits", + "syn 2.0.16", ] [[package]] @@ -349,13 +407,13 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "axum" -version = "0.5.15" +version = "0.5.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9de18bc5f2e9df8f52da03856bf40e29b747de5a84e43aefff90e3dc4a21529b" +checksum = "acee9fd5073ab6b045a275b3e709c163dd36c90685219cb21804a147b58dba43" dependencies = [ "async-trait", - "axum-core", - "base64", + "axum-core 0.2.9", + "base64 0.13.0", "bitflags", "bytes", "futures-util", @@ -364,7 +422,7 @@ dependencies = [ "http-body", "hyper", "itoa", - "matchit", + "matchit 0.5.0", "memchr", "mime", "percent-encoding", @@ -377,16 +435,48 @@ dependencies = [ "tokio", "tokio-tungstenite", "tower", - "tower-http", + "tower-http 0.3.4", + "tower-layer", + "tower-service", +] + +[[package]] +name = "axum" +version = "0.6.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8175979259124331c1d7bf6586ee7e0da434155e4b2d48ec2c8386281d8df39" +dependencies = [ + "async-trait", + "axum-core 0.3.4", + "bitflags", + "bytes", + "futures-util", + "http", + "http-body", + "hyper", + "itoa", + "matchit 0.7.0", + "memchr", + "mime", + "percent-encoding", + "pin-project-lite", + "rustversion", + "serde", + "serde_json", + "serde_path_to_error", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tower", "tower-layer", "tower-service", ] [[package]] name = "axum-core" -version = "0.2.7" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4f44a0e6200e9d11a1cdc989e4b358f6e3d354fbf48478f345a17f4e43f8635" +checksum = "37e5939e02c56fecd5c017c37df4238c0a839fa76b7f97acdd7efb804fd181cc" dependencies = [ "async-trait", "bytes", @@ -394,6 +484,25 @@ dependencies = [ "http", "http-body", "mime", + "tower-layer", + "tower-service", +] + +[[package]] +name = "axum-core" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" +dependencies = [ + "async-trait", + "bytes", + "futures-util", + "http", + "http-body", + "mime", + "rustversion", + "tower-layer", + "tower-service", ] [[package]] @@ -402,16 +511,16 @@ version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69034b3b0fd97923eee2ce8a47540edb21e07f48f87f67d44bb4271cec622bdb" dependencies = [ - "axum", + "axum 0.5.17", "bytes", - "cookie", + "cookie 0.16.1", "futures-util", "http", "mime", "pin-project-lite", "tokio", "tower", - "tower-http", + "tower-http 0.3.4", "tower-layer", "tower-service", ] @@ -423,7 +532,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9edac5a983d2aa76c3764a3e0a59e5fa885f5af468de4e4ce2f9182223cf281c" dependencies = [ "async-session", - "axum", + "axum 0.5.17", "axum-extra", "futures", "http-body", @@ -432,18 +541,24 @@ dependencies = [ "tracing", ] -[[package]] -name = "base-x" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cbbc9d0964165b47557570cce6c952866c2678457aca742aafc9fb771d30270" - [[package]] name = "base64" version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" +[[package]] +name = "base64" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ea22880d78093b0cbe17c89f64a7d457941e65759157ec6cb31a31d652b05e5" + +[[package]] +name = "base64" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f1e31e207a6b8fb791a38ea3105e6cb541f55e4d029902d3039a4ad07cc4105" + [[package]] name = "base64ct" version = "1.5.2" @@ -467,9 +582,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "blake2" -version = "0.10.4" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9cf849ee05b2ee5fba5e36f97ff8ec2533916700fc0758d40d92136a42f3388" +checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" dependencies = [ "digest 0.10.3", ] @@ -565,6 +680,9 @@ name = "cc" version = "1.0.73" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" +dependencies = [ + "jobserver", +] [[package]] name = "cfg-if" @@ -603,39 +721,37 @@ dependencies = [ [[package]] name = "clap" -version = "3.2.22" +version = "4.0.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86447ad904c7fb335a790c9d7fe3d0d971dc523b8ccd1561a520de9a85302750" +checksum = "389ca505fd2c00136e0d0cd34bcd8b6bd0b59d5779aab396054b716334230c1c" dependencies = [ "atty", "bitflags", "clap_derive", "clap_lex", - "indexmap", "once_cell", "strsim", "termcolor", - "textwrap", ] [[package]] name = "clap_derive" -version = "3.2.18" +version = "4.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea0c8bce528c4be4da13ea6fead8965e95b6073585a2f05204bd8f4119f82a65" +checksum = "0177313f9f02afc995627906bbd8967e2be069f5261954222dac78290c2b9014" dependencies = [ "heck", "proc-macro-error", "proc-macro2", "quote", - "syn", + "syn 1.0.99", ] [[package]] name = "clap_lex" -version = "0.2.4" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" +checksum = "0d4198f73e42b4936b35b5bb248d81d2b595ecb170da0bac7655c54eedfa8da8" dependencies = [ "os_str_bytes", ] @@ -646,24 +762,24 @@ version = "0.1.0" dependencies = [ "anyhow", "argon2", - "async-graphql", + "async-graphql 5.0.9", "async-graphql-axum", - "axum", + "axum 0.6.18", "axum-extra", "axum-sessions", "como_core", "como_domain", "como_gql", "como_infrastructure", - "cookie", + "cookie 0.17.0", "dotenv", "rand_core", "serde", "serde_json", - "sqlx 0.6.1", + "sqlx", "tokio", "tower", - "tower-http", + "tower-http 0.4.0", "tracing", "tracing-subscriber", "uuid", @@ -675,9 +791,9 @@ version = "0.1.0" dependencies = [ "anyhow", "argon2", - "async-graphql", + "async-graphql 5.0.9", "async-graphql-axum", - "axum", + "axum 0.6.18", "axum-extra", "axum-sessions", "clap", @@ -686,14 +802,14 @@ dependencies = [ "como_domain", "como_gql", "como_infrastructure", - "cookie", + "cookie 0.17.0", "dotenv", "rand_core", "serde", "serde_json", - "sqlx 0.6.1", + "sqlx", "tokio", - "tower-http", + "tower-http 0.4.0", "tracing", "tracing-subscriber", "uuid", @@ -705,7 +821,7 @@ version = "0.1.0" dependencies = [ "anyhow", "async-trait", - "axum", + "axum 0.6.18", "clap", "como_domain", "dotenv", @@ -713,9 +829,9 @@ dependencies = [ "rust-argon2", "serde", "serde_json", - "sqlx 0.5.13", + "sqlx", "thiserror", - "time 0.2.27", + "time", "tokio", "tracing", "tracing-subscriber", @@ -727,7 +843,7 @@ name = "como_domain" version = "0.1.0" dependencies = [ "anyhow", - "async-graphql", + "async-graphql 5.0.9", "serde", "serde_json", "uuid", @@ -739,22 +855,22 @@ version = "0.1.0" dependencies = [ "anyhow", "argon2", - "async-graphql", + "async-graphql 5.0.9", "async-graphql-axum", - "axum", + "axum 0.6.18", "axum-extra", "axum-sessions", "como_core", "como_domain", "como_infrastructure", - "cookie", + "cookie 0.17.0", "dotenv", "rand_core", "serde", "serde_json", - "sqlx 0.6.1", + "sqlx", "tokio", - "tower-http", + "tower-http 0.4.0", "tracing", "tracing-subscriber", "uuid", @@ -766,33 +882,27 @@ version = "0.1.0" dependencies = [ "anyhow", "argon2", - "async-graphql", + "async-graphql 5.0.9", "async-graphql-axum", - "axum", + "axum 0.6.18", "axum-extra", "axum-sessions", "clap", "como_core", "como_domain", - "cookie", + "cookie 0.17.0", "dotenv", "rand_core", "serde", "serde_json", - "sqlx 0.6.1", + "sqlx", "tokio", - "tower-http", + "tower-http 0.4.0", "tracing", "tracing-subscriber", "uuid", ] -[[package]] -name = "const_fn" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbdcdcb6d86f71c5e97409ad45898af11cbc995b4ee8112d59095a28d376c935" - [[package]] name = "constant_time_eq" version = "0.1.5" @@ -806,14 +916,31 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "344adc371239ef32293cb1c4fe519592fcf21206c79c02854320afcdf3ab4917" dependencies = [ "aes-gcm", - "base64", + "base64 0.13.0", + "hmac 0.12.1", + "percent-encoding", + "rand", + "sha2 0.10.2", + "subtle", + "time", + "version_check", +] + +[[package]] +name = "cookie" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7efb37c3e1ccb1ff97164ad95ac1606e8ccd35b3fa0a7d99a304c7f4a428cc24" +dependencies = [ + "aes-gcm", + "base64 0.21.1", "hkdf", "hmac 0.12.1", "percent-encoding", "rand", "sha2 0.10.2", "subtle", - "time 0.3.14", + "time", "version_check", ] @@ -832,30 +959,15 @@ dependencies = [ "libc", ] -[[package]] -name = "crc" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49fc9a695bca7f35f5f4c15cddc84415f66a74ea78eef08e90c5024f2b540e23" -dependencies = [ - "crc-catalog 1.1.1", -] - [[package]] name = "crc" version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53757d12b596c16c78b83458d732a5d1a17ab3f53f2f7412f6fb57cc8a140ab3" dependencies = [ - "crc-catalog 2.1.0", + "crc-catalog", ] -[[package]] -name = "crc-catalog" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccaeedb56da03b09f598226e25e80088cb4cd25f316e6e4df7d695f0feeb1403" - [[package]] name = "crc-catalog" version = "2.1.0" @@ -952,7 +1064,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn", + "syn 1.0.99", ] [[package]] @@ -963,7 +1075,7 @@ checksum = "ddfc69c5bfcbd2fc09a0f38451d2daf0e372e367986a83906d1b0dbc88134fb5" dependencies = [ "darling_core", "quote", - "syn", + "syn 1.0.99", ] [[package]] @@ -1012,12 +1124,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "discard" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0" - [[package]] name = "dotenv" version = "0.15.0" @@ -1118,9 +1224,9 @@ dependencies = [ [[package]] name = "fragile" -version = "1.2.1" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85dcb89d2b10c5f6133de2efd8c11959ce9dbb46a2f7a4cab208c4eeda6ce1ab" +checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "futures" @@ -1189,7 +1295,7 @@ checksum = "42cd15d1c7456c04dbdf7e88bcd69760d74f3a798d6444e16974b505b0e62f17" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.99", ] [[package]] @@ -1254,12 +1360,17 @@ dependencies = [ ] [[package]] -name = "hashbrown" -version = "0.11.2" +name = "handlebars" +version = "4.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" +checksum = "83c3372087601b532857d332f5957cbae686da52bb7810bf038c3e3c3cc2fa0d" dependencies = [ - "ahash", + "log", + "pest", + "pest_derive", + "serde", + "serde_json", + "thiserror", ] [[package]] @@ -1271,22 +1382,13 @@ dependencies = [ "ahash", ] -[[package]] -name = "hashlink" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7249a3129cbc1ffccd74857f81464a323a152173cdb134e0fd81bc803b29facf" -dependencies = [ - "hashbrown 0.11.2", -] - [[package]] name = "hashlink" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d452c155cb93fecdfb02a73dd57b5d8e442c2063bd7aac72f1bc5e4263a43086" dependencies = [ - "hashbrown 0.12.3", + "hashbrown", ] [[package]] @@ -1295,14 +1397,14 @@ version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3e372db8e5c0d213e0cd0b9be18be2aca3d44cf2fe30a9d46a65581cd454584" dependencies = [ - "base64", + "base64 0.13.0", "bitflags", "bytes", "headers-core", "http", "httpdate", "mime", - "sha1 0.10.4", + "sha1", ] [[package]] @@ -1368,9 +1470,9 @@ dependencies = [ [[package]] name = "http" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" +checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" dependencies = [ "bytes", "fnv", @@ -1396,9 +1498,9 @@ checksum = "0bfe8eed0a9285ef776bb792479ea3834e8b94e13d615c2f66d03dd50a435a29" [[package]] name = "httparse" -version = "1.7.1" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "496ce29bb5a52785b44e0f7ca2847ae0bb839c9bd28f69acac9b99d461c0c04c" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] name = "httpdate" @@ -1408,9 +1510,9 @@ checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" [[package]] name = "hyper" -version = "0.14.20" +version = "0.14.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02c929dc5c39e335a03c405292728118860721b10190d98c2a0f0efd5baafbac" +checksum = "ab302d72a6f11a3b910431ff93aae7e773078c769f0a3ef15fb9ec692ed147d4" dependencies = [ "bytes", "futures-channel", @@ -1472,7 +1574,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e" dependencies = [ "autocfg", - "hashbrown 0.12.3", + "hashbrown", "serde", ] @@ -1496,11 +1598,12 @@ dependencies = [ [[package]] name = "iri-string" -version = "0.4.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f0f7638c1e223529f1bfdc48c8b133b9e0b434094d1d28473161ee48b235f78" +checksum = "21859b667d66a4c1dacd9df0863b3efb65785474255face87f5bca39dd8407c0" dependencies = [ - "nom", + "memchr", + "serde", ] [[package]] @@ -1514,9 +1617,18 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.3" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8af84674fe1f223a982c933a0ee1086ac4d4052aa0fb8060c12c6ad838e754" +checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" + +[[package]] +name = "jobserver" +version = "0.1.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "936cfd212a0155903bcbc060e316fb6cc7cbf2e1907329391ebadc1fe0ce77c2" +dependencies = [ + "libc", +] [[package]] name = "js-sys" @@ -1535,9 +1647,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.127" +version = "0.2.144" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "505e71a4706fa491e9b1b55f51b95d4037d0821ee40131190475f692b35b009b" +checksum = "2b00cc1c228a6782d0f076e7b232802e0c5689d41bb5df366f2a6b6621cfdfe1" [[package]] name = "lock_api" @@ -1579,6 +1691,12 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73cbba799671b762df5a175adf59ce145165747bb891505c43d09aefbbf38beb" +[[package]] +name = "matchit" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b87248edafb776e59e6ee64a79086f65890d3510f2c656c000bf2a7e8a0aea40" + [[package]] name = "md-5" version = "0.10.1" @@ -1634,14 +1752,14 @@ dependencies = [ "libc", "log", "wasi", - "windows-sys", + "windows-sys 0.36.1", ] [[package]] name = "mockall" -version = "0.11.2" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2be9a9090bc1cac2930688fa9478092a64c6a92ddc6ae0692d46b37d9cab709" +checksum = "4c84490118f2ee2d74570d114f3d0493cbf02790df303d2707606c3e14e07c96" dependencies = [ "cfg-if 1.0.0", "downcast", @@ -1654,14 +1772,14 @@ dependencies = [ [[package]] name = "mockall_derive" -version = "0.11.2" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86d702a0530a0141cf4ed147cf5ec7be6f2c187d4e37fcbefc39cf34116bfe8f" +checksum = "22ce75669015c4f47b289fd4d4f56e894e4c96003ffdf3ac51313126f94c6cbb" dependencies = [ "cfg-if 1.0.0", "proc-macro2", "quote", - "syn", + "syn 1.0.99", ] [[package]] @@ -1698,6 +1816,16 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" +[[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-integer" version = "0.1.45" @@ -1754,6 +1882,12 @@ version = "6.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ff7415e9ae3fff1225851df9e0d9e4e5479f947619774677a63572e55e80eff" +[[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.11.2" @@ -1799,14 +1933,14 @@ dependencies = [ "libc", "redox_syscall", "smallvec", - "windows-sys", + "windows-sys 0.36.1", ] [[package]] name = "password-hash" -version = "0.4.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700" +checksum = "346f04948ba92c43e8469c1ee6736c7563d71012b17d40745260fe106aac2166" dependencies = [ "base64ct", "rand_core", @@ -1827,14 +1961,48 @@ checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" [[package]] name = "pest" -version = "2.2.1" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69486e2b8c2d2aeb9762db7b4e00b0331156393555cff467f4163ff06821eef8" +checksum = "e68e84bfb01f0507134eac1e9b410a12ba379d064eab48c50ba4ce329a527b70" dependencies = [ "thiserror", "ucd-trie", ] +[[package]] +name = "pest_derive" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b79d4c71c865a25a4322296122e3924d30bc8ee0834c8bfc8b95f7f054afbfb" +dependencies = [ + "pest", + "pest_generator", +] + +[[package]] +name = "pest_generator" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c435bf1076437b851ebc8edc3a18442796b30f1728ffea6262d59bbe28b077e" +dependencies = [ + "pest", + "pest_meta", + "proc-macro2", + "quote", + "syn 2.0.16", +] + +[[package]] +name = "pest_meta" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "745a452f8eb71e39ffd8ee32b3c5f51d03845f99786fa9b68db6ff509c505411" +dependencies = [ + "once_cell", + "pest", + "sha2 0.10.2", +] + [[package]] name = "pin-project" version = "1.0.11" @@ -1852,7 +2020,7 @@ checksum = "710faf75e1b33345361201d36d04e98ac1ed8909151a017ed384700836104c74" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.99", ] [[package]] @@ -1867,6 +2035,12 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +[[package]] +name = "pkg-config" +version = "0.3.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" + [[package]] name = "polyval" version = "0.6.0" @@ -1935,7 +2109,7 @@ dependencies = [ "proc-macro-error-attr", "proc-macro2", "quote", - "syn", + "syn 1.0.99", "version_check", ] @@ -1950,26 +2124,20 @@ dependencies = [ "version_check", ] -[[package]] -name = "proc-macro-hack" -version = "0.5.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" - [[package]] name = "proc-macro2" -version = "1.0.43" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a2ca2c61bc9f3d74d2886294ab7b9853abd9c1ad903a3ac7815c58989bb7bab" +checksum = "fa1fb82fc0c281dd9671101b66b771ebbe1eaf967b96ac8740dcba4b70005ca8" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.21" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" +checksum = "8f4f29d145265ec1c483c7c654450edde0bfe043d3938d6972630663356d9500" dependencies = [ "proc-macro2", ] @@ -1997,9 +2165,9 @@ dependencies = [ [[package]] name = "rand_core" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ "getrandom", ] @@ -2080,34 +2248,12 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b50162d19404029c1ceca6f6980fe40d45c8b369f6f44446fa14bb39573b5bb9" dependencies = [ - "base64", + "base64 0.13.0", "blake2b_simd", "constant_time_eq", "crossbeam-utils", ] -[[package]] -name = "rustc_version" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" -dependencies = [ - "semver", -] - -[[package]] -name = "rustls" -version = "0.19.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" -dependencies = [ - "base64", - "log", - "ring", - "sct 0.6.1", - "webpki 0.21.4", -] - [[package]] name = "rustls" version = "0.20.6" @@ -2116,8 +2262,8 @@ checksum = "5aab8ee6c7097ed6057f43c187a62418d0c05a4bd5f18b3571db50ee0f9ce033" dependencies = [ "log", "ring", - "sct 0.7.0", - "webpki 0.22.0", + "sct", + "webpki", ] [[package]] @@ -2126,9 +2272,15 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0864aeff53f8c05aa08d86e5ef839d3dfcf07aeba2db32f12db0ef716e87bd55" dependencies = [ - "base64", + "base64 0.13.0", ] +[[package]] +name = "rustversion" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" + [[package]] name = "ryu" version = "1.0.11" @@ -2141,16 +2293,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" -[[package]] -name = "sct" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce" -dependencies = [ - "ring", - "untrusted", -] - [[package]] name = "sct" version = "0.7.0" @@ -2161,52 +2303,46 @@ dependencies = [ "untrusted", ] -[[package]] -name = "semver" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" -dependencies = [ - "semver-parser", -] - -[[package]] -name = "semver-parser" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" - [[package]] name = "serde" -version = "1.0.142" +version = "1.0.163" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e590c437916fb6b221e1d00df6e3294f3fccd70ca7e92541c475d6ed6ef5fee2" +checksum = "2113ab51b87a539ae008b5c6c02dc020ffa39afd2d83cffcb3f4eb2722cebec2" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.142" +version = "1.0.163" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34b5b8d809babe02f538c2cfec6f2c1ed10804c0e5a6a041a049a4f5588ccc2e" +checksum = "8c805777e3930c8883389c602315a24224bcc738b63905ef87cd1420353ea93e" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.16", ] [[package]] name = "serde_json" -version = "1.0.83" +version = "1.0.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38dd04e3c8279e75b31ef29dbdceebfe5ad89f4d0937213c53f7d49d01b3d5a7" +checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" dependencies = [ "itoa", "ryu", "serde", ] +[[package]] +name = "serde_path_to_error" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7f05c1d5476066defcdfacce1f52fc3cae3af1d3089727100c02ae92e5abbe0" +dependencies = [ + "serde", +] + [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -2230,15 +2366,6 @@ dependencies = [ "digest 0.10.3", ] -[[package]] -name = "sha1" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1da05c97445caa12d05e848c4a4fcbbea29e748ac28f7e80e9b010392063770" -dependencies = [ - "sha1_smol", -] - [[package]] name = "sha1" version = "0.10.4" @@ -2250,12 +2377,6 @@ dependencies = [ "digest 0.10.3", ] -[[package]] -name = "sha1_smol" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012" - [[package]] name = "sha2" version = "0.9.9" @@ -2315,9 +2436,9 @@ checksum = "2fd0db749597d91ff862fd1d55ea87f7855a744a8425a64695b6fca237d1dad1" [[package]] name = "socket2" -version = "0.4.4" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66d72b759436ae32898a2af0a14218dbf55efde3feeb170eb623637db85ee1e0" +checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" dependencies = [ "libc", "winapi", @@ -2346,77 +2467,14 @@ dependencies = [ "unicode_categories", ] -[[package]] -name = "sqlx" -version = "0.5.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "551873805652ba0d912fec5bbb0f8b4cdd96baf8e2ebf5970e5671092966019b" -dependencies = [ - "sqlx-core 0.5.13", - "sqlx-macros 0.5.13", -] - [[package]] name = "sqlx" version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "788841def501aabde58d3666fcea11351ec3962e6ea75dbcd05c84a71d68bcd1" dependencies = [ - "sqlx-core 0.6.1", - "sqlx-macros 0.6.1", -] - -[[package]] -name = "sqlx-core" -version = "0.5.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e48c61941ccf5ddcada342cd59e3e5173b007c509e1e8e990dafc830294d9dc5" -dependencies = [ - "ahash", - "atoi 0.4.0", - "base64", - "bitflags", - "byteorder", - "bytes", - "crc 2.1.0", - "crossbeam-queue", - "dirs", - "either", - "event-listener", - "futures-channel", - "futures-core", - "futures-intrusive", - "futures-util", - "hashlink 0.7.0", - "hex", - "hkdf", - "hmac 0.12.1", - "indexmap", - "itoa", - "libc", - "log", - "md-5", - "memchr", - "once_cell", - "paste", - "percent-encoding", - "rand", - "rustls 0.19.1", - "serde", - "serde_json", - "sha-1", - "sha2 0.10.2", - "smallvec", - "sqlformat", - "sqlx-rt 0.5.13", - "stringprep", - "thiserror", - "time 0.2.27", - "tokio-stream", - "url", - "webpki 0.21.4", - "webpki-roots 0.21.1", - "whoami", + "sqlx-core", + "sqlx-macros", ] [[package]] @@ -2426,12 +2484,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c21d3b5e7cadfe9ba7cdc1295f72cc556c750b4419c27c219c0693198901f8e" dependencies = [ "ahash", - "atoi 1.0.0", - "base64", + "atoi", + "base64 0.13.0", "bitflags", "byteorder", "bytes", - "crc 3.0.0", + "crc", "crossbeam-queue", "dirs", "dotenvy", @@ -2441,7 +2499,7 @@ dependencies = [ "futures-core", "futures-intrusive", "futures-util", - "hashlink 0.8.0", + "hashlink", "hex", "hkdf", "hmac 0.12.1", @@ -2455,7 +2513,7 @@ dependencies = [ "paste", "percent-encoding", "rand", - "rustls 0.20.6", + "rustls", "rustls-pemfile", "serde", "serde_json", @@ -2463,35 +2521,17 @@ dependencies = [ "sha2 0.10.2", "smallvec", "sqlformat", - "sqlx-rt 0.6.1", + "sqlx-rt", "stringprep", "thiserror", + "time", "tokio-stream", "url", "uuid", - "webpki-roots 0.22.4", + "webpki-roots", "whoami", ] -[[package]] -name = "sqlx-macros" -version = "0.5.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc0fba2b0cae21fc00fe6046f8baa4c7fcb49e379f0f592b04696607f69ed2e1" -dependencies = [ - "dotenv", - "either", - "heck", - "once_cell", - "proc-macro2", - "quote", - "sha2 0.10.2", - "sqlx-core 0.5.13", - "sqlx-rt 0.5.13", - "syn", - "url", -] - [[package]] name = "sqlx-macros" version = "0.6.1" @@ -2508,23 +2548,12 @@ dependencies = [ "serde", "serde_json", "sha2 0.10.2", - "sqlx-core 0.6.1", - "sqlx-rt 0.6.1", - "syn", + "sqlx-core", + "sqlx-rt", + "syn 1.0.99", "url", ] -[[package]] -name = "sqlx-rt" -version = "0.5.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4db708cd3e459078f85f39f96a00960bd841f66ee2a669e90bf36907f5a79aae" -dependencies = [ - "once_cell", - "tokio", - "tokio-rustls 0.22.0", -] - [[package]] name = "sqlx-rt" version = "0.6.1" @@ -2533,16 +2562,7 @@ checksum = "7be52fc7c96c136cedea840ed54f7d446ff31ad670c9dea95ebcb998530971a3" dependencies = [ "once_cell", "tokio", - "tokio-rustls 0.23.4", -] - -[[package]] -name = "standback" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e113fb6f3de07a243d434a56ec6f186dfd51cb08448239fe7bcae73f87ff28ff" -dependencies = [ - "version_check", + "tokio-rustls", ] [[package]] @@ -2551,55 +2571,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" -[[package]] -name = "stdweb" -version = "0.4.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d022496b16281348b52d0e30ae99e01a73d737b2f45d38fed4edf79f9325a1d5" -dependencies = [ - "discard", - "rustc_version", - "stdweb-derive", - "stdweb-internal-macros", - "stdweb-internal-runtime", - "wasm-bindgen", -] - -[[package]] -name = "stdweb-derive" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c87a60a40fccc84bef0652345bbbbbe20a605bf5d0ce81719fc476f5c03b50ef" -dependencies = [ - "proc-macro2", - "quote", - "serde", - "serde_derive", - "syn", -] - -[[package]] -name = "stdweb-internal-macros" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58fa5ff6ad0d98d1ffa8cb115892b6e69d67799f6763e162a1c9db421dc22e11" -dependencies = [ - "base-x", - "proc-macro2", - "quote", - "serde", - "serde_derive", - "serde_json", - "sha1 0.6.1", - "syn", -] - -[[package]] -name = "stdweb-internal-runtime" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "213701ba3370744dcd1a12960caa4843b3d68b4d1c0a5d575e0d65b2ee9d16c0" - [[package]] name = "stringprep" version = "0.1.2" @@ -2633,6 +2604,17 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "syn" +version = "2.0.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6f671d4b5ffdb8eadec19c0ae67fe2639df8684bd7bc4b83d986b8db549cf01" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + [[package]] name = "sync_wrapper" version = "0.1.1" @@ -2668,30 +2650,24 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "507e9898683b6c43a9aa55b64259b721b52ba226e0f3779137e50ad114a4c90b" -[[package]] -name = "textwrap" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "949517c0cf1bf4ee812e2e07e08ab448e3ae0d23472aee8a06c985f0c8815b16" - [[package]] name = "thiserror" -version = "1.0.32" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5f6586b7f764adc0231f4c79be7b920e766bb2f3e51b3661cdb263828f19994" +checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.32" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12bafc5b54507e0149cdf1b145a5d80ab80a90bcd9275df43d4fff68460f6c21" +checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.16", ] [[package]] @@ -2703,21 +2679,6 @@ dependencies = [ "once_cell", ] -[[package]] -name = "time" -version = "0.2.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4752a97f8eebd6854ff91f1c1824cd6160626ac4bd44287f7f4ea2035a02a242" -dependencies = [ - "const_fn", - "libc", - "standback", - "stdweb", - "time-macros 0.1.1", - "version_check", - "winapi", -] - [[package]] name = "time" version = "0.3.14" @@ -2727,17 +2688,7 @@ dependencies = [ "itoa", "libc", "num_threads", - "time-macros 0.2.4", -] - -[[package]] -name = "time-macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "957e9c6e26f12cb6d0dd7fc776bb67a706312e7299aed74c8dd5b17ebb27e2f1" -dependencies = [ - "proc-macro-hack", - "time-macros-impl", + "time-macros", ] [[package]] @@ -2746,19 +2697,6 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42657b1a6f4d817cda8e7a0ace261fe0cc946cf3a80314390b22cc61ae080792" -[[package]] -name = "time-macros-impl" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd3c141a1b43194f3f56a1411225df8646c55781d5f26db825b3d98507eb482f" -dependencies = [ - "proc-macro-hack", - "proc-macro2", - "quote", - "standback", - "syn", -] - [[package]] name = "tinyvec" version = "1.6.0" @@ -2776,45 +2714,32 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "1.20.1" +version = "1.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a8325f63a7d4774dd041e363b2409ed1c5cbbd0f867795e661df066b2b0a581" +checksum = "0aa32867d44e6f2ce3385e89dceb990188b8bb0fb25b0cf576647a6f98ac5105" dependencies = [ "autocfg", "bytes", "libc", - "memchr", "mio", "num_cpus", - "once_cell", "parking_lot 0.12.1", "pin-project-lite", "signal-hook-registry", "socket2", "tokio-macros", - "winapi", + "windows-sys 0.48.0", ] [[package]] name = "tokio-macros" -version = "1.8.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9724f9a975fb987ef7a3cd9be0350edcbe130698af5b8f7a631e23d42d052484" +checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn", -] - -[[package]] -name = "tokio-rustls" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc6844de72e57df1980054b38be3a9f4702aba4858be64dd700181a8a6d0e1b6" -dependencies = [ - "rustls 0.19.1", - "tokio", - "webpki 0.21.4", + "syn 2.0.16", ] [[package]] @@ -2823,9 +2748,9 @@ version = "0.23.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" dependencies = [ - "rustls 0.20.6", + "rustls", "tokio", - "webpki 0.22.0", + "webpki", ] [[package]] @@ -2895,9 +2820,28 @@ name = "tower-http" version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c530c8675c1dbf98facee631536fa116b5fb6382d7dd6dc1b118d970eafe3ba" +dependencies = [ + "bitflags", + "bytes", + "futures-core", + "futures-util", + "http", + "http-body", + "http-range-header", + "pin-project-lite", + "tower", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-http" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d1d42a9b3f3ec46ba828e8d376aec14592ea199f70a06a548587ecd1c4ab658" dependencies = [ "async-compression", - "base64", + "base64 0.20.0", "bitflags", "bytes", "futures-core", @@ -2922,9 +2866,9 @@ dependencies = [ [[package]] name = "tower-layer" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "343bc9466d3fe6b0f960ef45960509f84480bf4fd96f92901afe7ff3df9d3a62" +checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" [[package]] name = "tower-service" @@ -2934,9 +2878,9 @@ checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] name = "tracing" -version = "0.1.36" +version = "0.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fce9567bd60a67d08a16488756721ba392f24f29006402881e43b19aac64307" +checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" dependencies = [ "cfg-if 1.0.0", "log", @@ -2947,20 +2891,20 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.22" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11c75893af559bc8e10716548bdef5cb2b983f8e637db9d0e15126b61b484ee2" +checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.99", ] [[package]] name = "tracing-core" -version = "0.1.29" +version = "0.1.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aeea4303076558a00714b823f9ad67d58a3bbda1df83d8827d21193156e22f7" +checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" dependencies = [ "once_cell", "valuable", @@ -2979,12 +2923,12 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.15" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60db860322da191b40952ad9affe65ea23e7dd6a5c442c2c42865810c6ab8e6b" +checksum = "30a651bc37f915e81f087d86e62a18eec5f79550c7faff886f7090b4ea757c77" dependencies = [ - "ansi_term", "matchers", + "nu-ansi-term", "once_cell", "regex", "sharded-slab", @@ -3007,7 +2951,7 @@ version = "0.17.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e27992fd6a8c29ee7eef28fc78349aa244134e10ad447ce3b9f0ac0ed0fa4ce0" dependencies = [ - "base64", + "base64 0.13.0", "byteorder", "bytes", "http", @@ -3028,9 +2972,9 @@ checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" [[package]] name = "ucd-trie" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89570599c4fe5585de2b388aab47e99f7fa4e9238a1399f707a02e356058141c" +checksum = "9e79c4d996edb816c91e4308506774452e55e95c3c9de07b6729e17e15a5ef81" [[package]] name = "unicase" @@ -3110,9 +3054,9 @@ checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" [[package]] name = "uuid" -version = "1.1.2" +version = "1.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd6469f4314d5f1ffec476e05f17cc9a78bc7a27a6a857842170bdf8d6f98d2f" +checksum = "345444e32442451b267fc254ae85a209c64be56d2890e601a0c37ff0c3c5ecd2" dependencies = [ "getrandom", "rand", @@ -3121,9 +3065,9 @@ dependencies = [ [[package]] name = "validator" -version = "0.15.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f07b0a1390e01c0fc35ebb26b28ced33c9a3808f7f9fbe94d3cc01e233bfeed5" +checksum = "32ad5bf234c7d3ad1042e5252b7eddb2c4669ee23f32c7dd0e9b7705f07ef591" dependencies = [ "idna", "lazy_static", @@ -3137,9 +3081,9 @@ dependencies = [ [[package]] name = "validator_derive" -version = "0.15.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea7ed5e8cf2b6bdd64a6c4ce851da25388a89327b17b88424ceced6bd5017923" +checksum = "bc44ca3088bb3ba384d9aecf40c6a23a676ce23e09bdaca2073d99c207f864af" dependencies = [ "if_chain", "lazy_static", @@ -3147,18 +3091,18 @@ dependencies = [ "proc-macro2", "quote", "regex", - "syn", + "syn 1.0.99", "validator_types", ] [[package]] name = "validator_types" -version = "0.15.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2ddf34293296847abfc1493b15c6e2f5d3cd19f57ad7d22673bf4c6278da329" +checksum = "111abfe30072511849c5910134e8baf8dc05de4c0e5903d681cbd5c9c4d611e3" dependencies = [ "proc-macro2", - "syn", + "syn 1.0.99", ] [[package]] @@ -3210,7 +3154,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn", + "syn 1.0.99", "wasm-bindgen-shared", ] @@ -3232,7 +3176,7 @@ checksum = "5be8e654bdd9b79216c2929ab90721aa82faf65c48cdf08bdc4e7f51357b80da" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.99", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -3253,16 +3197,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "webpki" -version = "0.21.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" -dependencies = [ - "ring", - "untrusted", -] - [[package]] name = "webpki" version = "0.22.0" @@ -3273,22 +3207,13 @@ dependencies = [ "untrusted", ] -[[package]] -name = "webpki-roots" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aabe153544e473b775453675851ecc86863d2a81d786d741f6b76778f2a48940" -dependencies = [ - "webpki 0.21.4", -] - [[package]] name = "webpki-roots" version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1c760f0d366a6c24a02ed7816e23e691f5d92291f94d15e836006fd11b04daf" dependencies = [ - "webpki 0.22.0", + "webpki", ] [[package]] @@ -3338,39 +3263,135 @@ version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" dependencies = [ - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_msvc", + "windows_aarch64_msvc 0.36.1", + "windows_i686_gnu 0.36.1", + "windows_i686_msvc 0.36.1", + "windows_x86_64_gnu 0.36.1", + "windows_x86_64_msvc 0.36.1", ] +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc 0.48.0", + "windows_i686_gnu 0.48.0", + "windows_i686_msvc 0.48.0", + "windows_x86_64_gnu 0.48.0", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc 0.48.0", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" + [[package]] name = "windows_aarch64_msvc" version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" + [[package]] name = "windows_i686_gnu" version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" +[[package]] +name = "windows_i686_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" + [[package]] name = "windows_i686_msvc" version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" +[[package]] +name = "windows_i686_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" + [[package]] name = "windows_x86_64_gnu" version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" + [[package]] name = "windows_x86_64_msvc" version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" + +[[package]] +name = "zstd" +version = "0.11.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" +dependencies = [ + "zstd-safe", +] + +[[package]] +name = "zstd-safe" +version = "5.0.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" +dependencies = [ + "libc", + "zstd-sys", +] + +[[package]] +name = "zstd-sys" +version = "2.0.8+zstd.1.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5556e6ee25d32df2586c098bbfa278803692a20d0ab9565e049480d52707ec8c" +dependencies = [ + "cc", + "libc", + "pkg-config", +] diff --git a/Cargo.toml b/Cargo.toml index 79f2391..2ef2922 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,9 +1,48 @@ [workspace] members = [ - "como_bin", "como_core", "como_domain", "como_infrastructure", "como_gql", "como_api", ] + +[package] +name = "como_bin" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +como_gql = { path = "como_gql" } +como_core = { path = "como_core" } +como_domain = { path = "como_domain" } +como_infrastructure = { path = "como_infrastructure" } +como_api = { path = "como_api" } + +async-graphql = "5.0.9" +async-graphql-axum = "*" +axum = "0.6.18" +axum-extra = { version = "*", features = ["cookie", "cookie-private"] } +axum-sessions = { version = "*" } +serde = { version = "1.0", features = ["derive"] } +serde_json = "1.0.96" +tokio = { version = "1.28.1", features = ["full"] } +uuid = { version = "1.3.3", features = ["v4", "fast-rng"] } +sqlx = { version = "0.6", features = [ + "runtime-tokio-rustls", + "postgres", + "migrate", + "uuid", + "offline", +] } +anyhow = "1.0.71" +dotenv = "0.15.0" +tracing = "0.1.37" +tracing-subscriber = { version = "0.3.17", features = ["env-filter"] } +tower-http = { version = "0.4.0", features = ["full"] } +argon2 = "0.5" +rand_core = { version = "0.6", features = ["std"] } +cookie = { version = "0.17", features = ["secure", "percent-encode"] } +clap = { version = "4", features = ["derive", "env"] } diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..e69de29 diff --git a/README.md b/README.md index bc11a26..88fe933 100644 --- a/README.md +++ b/README.md @@ -1,3 +1 @@ # Cibus Backend - -Some text diff --git a/como_api/Cargo.toml b/como_api/Cargo.toml index 78fde40..90881cc 100644 --- a/como_api/Cargo.toml +++ b/como_api/Cargo.toml @@ -11,16 +11,16 @@ como_core = { path = "../como_core" } como_domain = { path = "../como_domain" } como_infrastructure = { path = "../como_infrastructure" } -async-graphql = "4.0.6" +async-graphql = "5.0.9" async-graphql-axum = "*" -axum = "0.5.13" +axum = "0.6.18" axum-extra = { version = "*", features = ["cookie", "cookie-private"] } axum-sessions = { version = "*" } serde = { version = "1.0", features = ["derive"] } -serde_json = "1.0.68" +serde_json = "1.0.96" -tokio = { version = "1.20.1", features = ["full"] } -uuid = { version = "1.1.2", features = ["v4", "fast-rng"] } +tokio = { version = "1.28.1", features = ["full"] } +uuid = { version = "1.3.3", features = ["v4", "fast-rng"] } sqlx = { version = "0.6", features = [ "runtime-tokio-rustls", "postgres", @@ -28,12 +28,12 @@ sqlx = { version = "0.6", features = [ "uuid", "offline", ] } -anyhow = "1.0.60" +anyhow = "1.0.71" dotenv = "0.15.0" -tracing = "0.1.36" -tracing-subscriber = { version = "0.3.15", features = ["env-filter"] } -argon2 = "0.4" +tracing = "0.1.37" +tracing-subscriber = { version = "0.3.17", features = ["env-filter"] } +argon2 = "0.5" rand_core = { version = "0.6", features = ["std"] } -cookie = { version = "0.16", features = ["secure", "percent-encode"] } +cookie = { version = "0.17", features = ["secure", "percent-encode"] } tower = { version = "0.4", features = ["timeout"] } -tower-http = { version = "0.3", features = ["trace", "cors"] } +tower-http = { version = "0.4", features = ["trace", "cors"] } diff --git a/como_api/src/router.rs b/como_api/src/router.rs index 89d4574..b210bc7 100644 --- a/como_api/src/router.rs +++ b/como_api/src/router.rs @@ -12,7 +12,7 @@ use crate::controllers::graphql::GraphQLController; pub struct Api; impl Api { - pub async fn new( + pub async fn run_api( port: u32, cors_origin: &str, service_register: ServiceRegister, diff --git a/como_bin/Cargo.toml b/como_bin/Cargo.toml deleted file mode 100644 index 148e1b8..0000000 --- a/como_bin/Cargo.toml +++ /dev/null @@ -1,39 +0,0 @@ -[package] -name = "como_bin" -version = "0.1.0" -edition = "2021" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -como_gql = { path = "../como_gql" } -como_core = { path = "../como_core" } -como_domain = { path = "../como_domain" } -como_infrastructure = { path = "../como_infrastructure" } -como_api = { path = "../como_api" } - -async-graphql = "4.0.6" -async-graphql-axum = "*" -axum = "0.5.13" -axum-extra = { version = "*", features = ["cookie", "cookie-private"] } -axum-sessions = { version = "*" } -serde = { version = "1.0", features = ["derive"] } -serde_json = "1.0.68" -tokio = { version = "1.20.1", features = ["full"] } -uuid = { version = "1.1.2", features = ["v4", "fast-rng"] } -sqlx = { version = "0.6", features = [ - "runtime-tokio-rustls", - "postgres", - "migrate", - "uuid", - "offline", -] } -anyhow = "1.0.60" -dotenv = "0.15.0" -tracing = "0.1.36" -tracing-subscriber = { version = "0.3.15", features = ["env-filter"] } -tower-http = { version = "0.3.4", features = ["full"] } -argon2 = "0.4" -rand_core = { version = "0.6", features = ["std"] } -cookie = { version = "0.16", features = ["secure", "percent-encode"] } -clap = { version = "3", features = ["derive", "env"] } diff --git a/como_core/Cargo.toml b/como_core/Cargo.toml index 63d202a..65e202c 100644 --- a/como_core/Cargo.toml +++ b/como_core/Cargo.toml @@ -8,24 +8,24 @@ edition = "2021" [dependencies] como_domain = { path = "../como_domain" } tokio = { version = "1", features = ["full"] } -axum = "0.5.1" +axum = "0.6.18" # utilty crates -serde = { version = "1.0.136", features = ["derive"] } -sqlx = { version = "0.5", features = [ +serde = { version = "1.0.163", features = ["derive"] } +sqlx = { version = "0.6", features = [ "runtime-tokio-rustls", "postgres", "time", ] } -serde_json = "1.0.81" +serde_json = "1.0.96" dotenv = "0.15.0" tracing = "0.1" tracing-subscriber = "0.3" anyhow = "1" -validator = { version = "0.15", features = ["derive"] } +validator = { version = "0.16", features = ["derive"] } async-trait = "0.1" thiserror = "1" rust-argon2 = "1.0" -clap = { version = "3", features = ["derive", "env"] } -mockall = "0.11.1" -time = "0.2" +clap = { version = "4", features = ["derive", "env"] } +mockall = "0.11.4" +time = "0.3" diff --git a/como_domain/Cargo.toml b/como_domain/Cargo.toml index ce8b82c..ebab3a2 100644 --- a/como_domain/Cargo.toml +++ b/como_domain/Cargo.toml @@ -6,8 +6,8 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -async-graphql = { version = "4.0.6", features = ["uuid"] } -anyhow = "1.0.60" +async-graphql = { version = "5.0.9", features = ["uuid"] } +anyhow = "1.0.71" serde = { version = "1.0", features = ["derive"] } -serde_json = "1.0.68" -uuid = { version = "1.1.2", features = ["v4", "fast-rng", "serde"] } +serde_json = "1.0.96" +uuid = { version = "1.3.3", features = ["v4", "fast-rng", "serde"] } diff --git a/como_domain/src/item/mod.rs b/como_domain/src/item/mod.rs index 26e0a6e..306e545 100644 --- a/como_domain/src/item/mod.rs +++ b/como_domain/src/item/mod.rs @@ -2,7 +2,7 @@ pub mod queries; pub mod requests; pub mod responses; -use async_graphql::{Enum, InputObject, SimpleObject}; +use async_graphql::{Enum, InputObject}; use serde::{Deserialize, Serialize}; use uuid::Uuid; diff --git a/como_gql/Cargo.toml b/como_gql/Cargo.toml index e4f8f16..a61df0b 100644 --- a/como_gql/Cargo.toml +++ b/como_gql/Cargo.toml @@ -10,15 +10,15 @@ como_core = { path = "../como_core" } como_domain = { path = "../como_domain" } como_infrastructure = { path = "../como_infrastructure" } -async-graphql = "4.0.6" +async-graphql = "5.0.9" async-graphql-axum = "*" -axum = "0.5.13" +axum = "0.6.18" axum-extra = { version = "*", features = ["cookie", "cookie-private"] } axum-sessions = { version = "*" } serde = { version = "1.0", features = ["derive"] } -serde_json = "1.0.68" -tokio = { version = "1.20.1", features = ["full"] } -uuid = { version = "1.1.2", features = ["v4", "fast-rng"] } +serde_json = "1.0.96" +tokio = { version = "1.28.1", features = ["full"] } +uuid = { version = "1.3.3", features = ["v4", "fast-rng"] } sqlx = { version = "0.6", features = [ "runtime-tokio-rustls", "postgres", @@ -26,11 +26,11 @@ sqlx = { version = "0.6", features = [ "uuid", "offline", ] } -anyhow = "1.0.60" +anyhow = "1.0.71" dotenv = "0.15.0" -tracing = "0.1.36" -tracing-subscriber = { version = "0.3.15", features = ["env-filter"] } -tower-http = { version = "0.3.4", features = ["full"] } -argon2 = "0.4" +tracing = "0.1.37" +tracing-subscriber = { version = "0.3.17", features = ["env-filter"] } +tower-http = { version = "0.4.0", features = ["full"] } +argon2 = "0.5" rand_core = { version = "0.6", features = ["std"] } -cookie = { version = "0.16", features = ["secure", "percent-encode"] } +cookie = { version = "0.17", features = ["secure", "percent-encode"] } diff --git a/como_gql/src/graphql.rs b/como_gql/src/graphql.rs index 0b6fa6b..aa6b848 100644 --- a/como_gql/src/graphql.rs +++ b/como_gql/src/graphql.rs @@ -4,8 +4,6 @@ use como_domain::{ item::{ queries::{GetItemQuery, GetItemsQuery}, requests::CreateItemDto, - responses::CreatedItemDto, - ItemDto, }, projects::{ queries::{GetProjectQuery, GetProjectsQuery}, diff --git a/como_gql/src/items.rs b/como_gql/src/items.rs index 61f25bc..293b8fb 100644 --- a/como_gql/src/items.rs +++ b/como_gql/src/items.rs @@ -35,19 +35,19 @@ pub struct Item { #[Object] impl Item { pub async fn id(&self, _ctx: &Context<'_>) -> anyhow::Result { - return Ok(self.id); + Ok(self.id) } pub async fn title(&self, _ctx: &Context<'_>) -> anyhow::Result { - return Ok(self.title.clone()); + Ok(self.title.clone()) } pub async fn description(&self, _ctx: &Context<'_>) -> anyhow::Result> { - return Ok(self.description.clone()); + Ok(self.description.clone()) } pub async fn state(&self, _ctx: &Context<'_>) -> anyhow::Result { - return Ok(self.state); + Ok(self.state) } pub async fn project(&self, ctx: &Context<'_>) -> anyhow::Result { diff --git a/como_infrastructure/Cargo.toml b/como_infrastructure/Cargo.toml index 7c22b00..a709216 100644 --- a/como_infrastructure/Cargo.toml +++ b/como_infrastructure/Cargo.toml @@ -9,15 +9,15 @@ edition = "2021" como_core = { path = "../como_core" } como_domain = { path = "../como_domain" } -async-graphql = "4.0.6" +async-graphql = "5.0.9" async-graphql-axum = "*" -axum = "0.5.13" +axum = "0.6.18" axum-extra = { version = "*", features = ["cookie", "cookie-private"] } axum-sessions = { version = "*" } serde = { version = "1.0", features = ["derive"] } -serde_json = "1.0.68" -tokio = { version = "1.20.1", features = ["full"] } -uuid = { version = "1.1.2", features = ["v4", "fast-rng"] } +serde_json = "1.0.96" +tokio = { version = "1.28.1", features = ["full"] } +uuid = { version = "1.3.3", features = ["v4", "fast-rng"] } sqlx = { version = "0.6", features = [ "runtime-tokio-rustls", "postgres", @@ -25,12 +25,12 @@ sqlx = { version = "0.6", features = [ "uuid", "offline", ] } -anyhow = "1.0.60" +anyhow = "1.0.71" dotenv = "0.15.0" -tracing = "0.1.36" -tracing-subscriber = { version = "0.3.15", features = ["env-filter"] } -tower-http = { version = "0.3.4", features = ["full"] } -argon2 = "0.4" +tracing = "0.1.37" +tracing-subscriber = { version = "0.3.17", features = ["env-filter"] } +tower-http = { version = "0.4.0", features = ["full"] } +argon2 = "0.5" rand_core = { version = "0.6", features = ["std"] } -cookie = { version = "0.16", features = ["secure", "percent-encode"] } -clap = { version = "3", features = ["derive", "env"] } +cookie = { version = "0.17", features = ["secure", "percent-encode"] } +clap = { version = "4", features = ["derive", "env"] } diff --git a/como_infrastructure/src/register.rs b/como_infrastructure/src/register.rs index 504dcfb..cf9dc62 100644 --- a/como_infrastructure/src/register.rs +++ b/como_infrastructure/src/register.rs @@ -7,8 +7,7 @@ use crate::{ configs::AppConfig, database::ConnectionPool, services::{ - item_service::{DefaultItemService, MemoryItemService}, - project_service::{DefaultProjectService, MemoryProjectService}, + item_service::MemoryItemService, project_service::MemoryProjectService, user_service::DefaultUserService, }, }; @@ -26,14 +25,14 @@ impl ServiceRegister { let item_service = Arc::new(MemoryItemService::new()) as DynItemService; let project_service = Arc::new(MemoryProjectService::new()) as DynProjectService; - let user_service = Arc::new(DefaultUserService::new(pool.clone())) as DynUserService; + let user_service = Arc::new(DefaultUserService::new(pool)) as DynUserService; info!("services created succesfully"); - return Self { + Self { item_service, user_service, project_service, - }; + } } } diff --git a/como_infrastructure/src/services/item_service.rs b/como_infrastructure/src/services/item_service.rs index c5faf65..4a376f5 100644 --- a/como_infrastructure/src/services/item_service.rs +++ b/como_infrastructure/src/services/item_service.rs @@ -3,6 +3,7 @@ use std::{ sync::{Arc, Mutex}, }; +use anyhow::Context; use axum::async_trait; use como_core::items::ItemService; use como_domain::item::{ @@ -21,6 +22,12 @@ impl DefaultItemService { } } +impl Default for DefaultItemService { + fn default() -> Self { + Self::new() + } +} + #[async_trait] impl ItemService for DefaultItemService { async fn add_item(&self, _item: CreateItemDto) -> anyhow::Result { @@ -48,6 +55,12 @@ impl MemoryItemService { } } +impl Default for MemoryItemService { + fn default() -> Self { + Self::new() + } +} + #[async_trait] impl ItemService for MemoryItemService { async fn add_item(&self, create_item: CreateItemDto) -> anyhow::Result { @@ -71,7 +84,7 @@ impl ItemService for MemoryItemService { if let Ok(item_store) = self.item_store.lock() { let item = item_store .get(&query.item_id.to_string()) - .ok_or(anyhow::anyhow!("could not find item"))?; + .context("could not find item")?; return Ok(item.clone()); } else { Err(anyhow::anyhow!("could not unlock item_store")) diff --git a/como_infrastructure/src/services/project_service.rs b/como_infrastructure/src/services/project_service.rs index 02f9004..7fdab82 100644 --- a/como_infrastructure/src/services/project_service.rs +++ b/como_infrastructure/src/services/project_service.rs @@ -1,5 +1,6 @@ use std::{collections::HashMap, sync::Arc}; +use anyhow::Context; use axum::async_trait; use como_core::projects::ProjectService; use como_domain::projects::{ @@ -16,6 +17,12 @@ impl DefaultProjectService { } } +impl Default for DefaultProjectService { + fn default() -> Self { + Self::new() + } +} + #[async_trait] impl ProjectService for DefaultProjectService { async fn get_project(&self, _query: GetProjectQuery) -> anyhow::Result { @@ -38,6 +45,12 @@ impl MemoryProjectService { } } +impl Default for MemoryProjectService { + fn default() -> Self { + Self::new() + } +} + #[async_trait] impl ProjectService for MemoryProjectService { async fn get_project(&self, query: GetProjectQuery) -> anyhow::Result { @@ -45,7 +58,7 @@ impl ProjectService for MemoryProjectService { if let Some(item_id) = query.item_id { Ok(ps .get(&item_id.to_string()) - .ok_or(anyhow::anyhow!("could not find project"))? + .context("could not find project")? .clone()) } else { Err(anyhow::anyhow!("could not find project")) diff --git a/como_infrastructure/target/sqlx/query-4e07408562bedb8b60ce05c1decfe3ad16b72230967de01f640b7e4729b49fce.json b/como_infrastructure/target/sqlx/query-4e07408562bedb8b60ce05c1decfe3ad16b72230967de01f640b7e4729b49fce.json deleted file mode 100644 index c881b13..0000000 --- a/como_infrastructure/target/sqlx/query-4e07408562bedb8b60ce05c1decfe3ad16b72230967de01f640b7e4729b49fce.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "query": "\n SELECT * from users\n where username=$1\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "id", - "type_info": "Uuid" - }, - { - "ordinal": 1, - "name": "username", - "type_info": "Varchar" - }, - { - "ordinal": 2, - "name": "password_hash", - "type_info": "Varchar" - } - ], - "parameters": { - "Left": [ - "Text" - ] - }, - "nullable": [ - false, - false, - false - ] - }, - "hash": "d3f222cf6c3d9816705426fdbed3b13cb575bb432eb1f33676c0b414e67aecaf" -} \ No newline at end of file diff --git a/renovate.json b/renovate.json new file mode 100644 index 0000000..7190a60 --- /dev/null +++ b/renovate.json @@ -0,0 +1,3 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json" +} diff --git a/sqlx-data.json b/sqlx-data.json new file mode 100644 index 0000000..e4e4275 --- /dev/null +++ b/sqlx-data.json @@ -0,0 +1,56 @@ +{ + "db": "PostgreSQL", + "3b4484c5ccfd4dcb887c4e978fe6e45d4c9ecc2a73909be207dced79ddf17d87": { + "describe": { + "columns": [ + { + "name": "id", + "ordinal": 0, + "type_info": "Uuid" + } + ], + "nullable": [ + false + ], + "parameters": { + "Left": [ + "Varchar", + "Varchar" + ] + } + }, + "query": "\n INSERT INTO users (username, password_hash) \n VALUES ( $1, $2 ) \n RETURNING id\n " + }, + "d3f222cf6c3d9816705426fdbed3b13cb575bb432eb1f33676c0b414e67aecaf": { + "describe": { + "columns": [ + { + "name": "id", + "ordinal": 0, + "type_info": "Uuid" + }, + { + "name": "username", + "ordinal": 1, + "type_info": "Varchar" + }, + { + "name": "password_hash", + "ordinal": 2, + "type_info": "Varchar" + } + ], + "nullable": [ + false, + false, + false + ], + "parameters": { + "Left": [ + "Text" + ] + } + }, + "query": "\n SELECT * from users\n where username=$1\n " + } +} \ No newline at end of file diff --git a/como_bin/src/error.rs b/src/error.rs similarity index 97% rename from como_bin/src/error.rs rename to src/error.rs index bc8201a..f5f37e6 100644 --- a/como_bin/src/error.rs +++ b/src/error.rs @@ -1,6 +1,7 @@ use axum::{http::StatusCode, response::IntoResponse, Json}; use serde_json::json; +#[allow(dead_code)] #[derive(Debug)] pub enum AppError { WrongCredentials, diff --git a/como_bin/src/main.rs b/src/main.rs similarity index 98% rename from como_bin/src/main.rs rename to src/main.rs index a3739d6..7c74c50 100644 --- a/como_bin/src/main.rs +++ b/src/main.rs @@ -29,7 +29,7 @@ async fn main() -> anyhow::Result<()> { let service_register = ServiceRegister::new(pool, config.clone()); - Api::new( + Api::run_api( config.api_port, &config.cors_origin, service_register.clone(), diff --git a/templates/local_up.Dockerfile b/templates/local_up.Dockerfile index c6f6be7..258b8a3 100644 --- a/templates/local_up.Dockerfile +++ b/templates/local_up.Dockerfile @@ -1,3 +1,3 @@ -FROM postgres:14-alpine +FROM postgres:15-alpine COPY *.sh /docker-entrypoint-initdb.d/