diff --git a/.env b/.env index 0f19229..75cc534 100644 --- a/.env +++ b/.env @@ -7,4 +7,5 @@ POSTGRES_DB=stacker POSTGRES_PORT=5432 SECURITY_KEY=SECURITY_KEY_SHOULD_BE_OF_LEN_32 -REDIS_URL=redis://127.0.0.1/ \ No newline at end of file +REDIS_URL=redis://127.0.0.1/ +SQLX_OFFLINE=true diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index bf3ee4c..bf9a453 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -3,19 +3,23 @@ name: Docker CICD on: push: branches: - - master + - main - testing pull_request: branches: - - master + - main + +env: + SQLX_OFFLINE: true jobs: - cicd-linux-docker: + + cicd-docker: name: Cargo and npm build runs-on: ubuntu-latest steps: - name: Checkout sources - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Install stable toolchain uses: actions-rs/toolchain@v1 @@ -61,6 +65,12 @@ jobs: with: command: check + - name: Run cargo sqlx prepare + uses: actions-rs/cargo@v1 + with: + command: sqlx prepare + args: --release + - name: Cargo test if: ${{ always() }} uses: actions-rs/cargo@v1 @@ -101,7 +111,7 @@ jobs: # npm test - name: Archive production artifacts - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: dist-without-markdown path: | @@ -123,18 +133,18 @@ jobs: cd .. - name: Upload app archive for Docker job - uses: actions/upload-artifact@v2.2.2 + uses: actions/upload-artifact@v4 with: name: artifact-linux-docker path: app.tar.gz - cicd-docker: + cicd-linux-docker: name: CICD Docker runs-on: ubuntu-latest - needs: cicd-linux-docker + needs: cicd-docker steps: - name: Download app archive - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4 with: name: artifact-linux-docker @@ -144,12 +154,21 @@ jobs: - name: Display structure of downloaded files run: ls -R - - name: Docker build and publish - uses: docker/build-push-action@v1 + - + name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - + name: Login to Docker Hub + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - repository: trydirect/stacker - add_git_labels: true - tag_with_ref: true - #no-cache: true \ No newline at end of file + - + name: Build and push + uses: docker/build-push-action@v6 + with: + push: true + tags: trydirect/stacker:latest diff --git a/.github/workflows/notifier.yml b/.github/workflows/notifier.yml index ba3ed81..33822fc 100644 --- a/.github/workflows/notifier.yml +++ b/.github/workflows/notifier.yml @@ -9,6 +9,7 @@ jobs: notifyTelegram: runs-on: ubuntu-latest + concurrency: build steps: - name: send custom message uses: appleboy/telegram-action@master @@ -16,4 +17,4 @@ jobs: to: ${{ secrets.TELEGRAM_TO }} token: ${{ secrets.TELEGRAM_TOKEN }} message: | - "Issue ${{ github.event.action }}: \n${{ github.event.issue.html_url }}" \ No newline at end of file + "Github actions on push: build in progress .. ${{ github.event.action }} " diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 31000a2..d71ff7f 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -2,21 +2,22 @@ name: Rust on: push: - branches: [ "main" ] + branches: [ dev, main ] pull_request: - branches: [ "main" ] + branches: [ dev, main ] env: CARGO_TERM_COLOR: always + SQLX_OFFLINE: true jobs: build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Build + - uses: actions/checkout@v4 + - name: cargo sqlx prepare + run: cargo sqlx prepare + - name: cargo build run: cargo build --verbose - - name: Run tests + - name: cargo test run: cargo test --verbose diff --git a/.sqlx/query-1cabd2f674da323da9e0da724d3bcfe5f968b31500e8c8cf97fe16814bc04164.json b/.sqlx/query-1cabd2f674da323da9e0da724d3bcfe5f968b31500e8c8cf97fe16814bc04164.json new file mode 100644 index 0000000..eb3a84f --- /dev/null +++ b/.sqlx/query-1cabd2f674da323da9e0da724d3bcfe5f968b31500e8c8cf97fe16814bc04164.json @@ -0,0 +1,20 @@ +{ + "db_name": "PostgreSQL", + "query": "INSERT INTO casbin_rule ( ptype, v0, v1, v2, v3, v4, v5 )\n VALUES ( $1, $2, $3, $4, $5, $6, $7 )", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Varchar", + "Varchar", + "Varchar", + "Varchar", + "Varchar", + "Varchar", + "Varchar" + ] + }, + "nullable": [] + }, + "hash": "1cabd2f674da323da9e0da724d3bcfe5f968b31500e8c8cf97fe16814bc04164" +} diff --git a/.sqlx/query-1f299262f01a2c9d2ee94079a12766573c91b2775a086c65bc9a5fdc91300bb0.json b/.sqlx/query-1f299262f01a2c9d2ee94079a12766573c91b2775a086c65bc9a5fdc91300bb0.json new file mode 100644 index 0000000..1ea12e3 --- /dev/null +++ b/.sqlx/query-1f299262f01a2c9d2ee94079a12766573c91b2775a086c65bc9a5fdc91300bb0.json @@ -0,0 +1,17 @@ +{ + "db_name": "PostgreSQL", + "query": "DELETE FROM casbin_rule WHERE\n ptype = $1 AND\n (v3 is NULL OR v3 = COALESCE($2,v3)) AND\n (v4 is NULL OR v4 = COALESCE($3,v4)) AND\n (v5 is NULL OR v5 = COALESCE($4,v5))", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text", + "Varchar", + "Varchar", + "Varchar" + ] + }, + "nullable": [] + }, + "hash": "1f299262f01a2c9d2ee94079a12766573c91b2775a086c65bc9a5fdc91300bb0" +} diff --git a/.sqlx/query-24876462291b90324dfe3682e9f36247a328db780a48da47c9402e1d3ebd80c9.json b/.sqlx/query-24876462291b90324dfe3682e9f36247a328db780a48da47c9402e1d3ebd80c9.json new file mode 100644 index 0000000..8046c5d --- /dev/null +++ b/.sqlx/query-24876462291b90324dfe3682e9f36247a328db780a48da47c9402e1d3ebd80c9.json @@ -0,0 +1,12 @@ +{ + "db_name": "PostgreSQL", + "query": "DELETE FROM casbin_rule", + "describe": { + "columns": [], + "parameters": { + "Left": [] + }, + "nullable": [] + }, + "hash": "24876462291b90324dfe3682e9f36247a328db780a48da47c9402e1d3ebd80c9" +} diff --git a/.sqlx/query-2872b56bbc5bed96b1a303bf9cf44610fb79a1b9330730c65953f0c1b88c2a53.json b/.sqlx/query-2872b56bbc5bed96b1a303bf9cf44610fb79a1b9330730c65953f0c1b88c2a53.json new file mode 100644 index 0000000..e246e53 --- /dev/null +++ b/.sqlx/query-2872b56bbc5bed96b1a303bf9cf44610fb79a1b9330730c65953f0c1b88c2a53.json @@ -0,0 +1,20 @@ +{ + "db_name": "PostgreSQL", + "query": "DELETE FROM casbin_rule WHERE\n ptype = $1 AND\n v0 = $2 AND\n v1 = $3 AND\n v2 = $4 AND\n v3 = $5 AND\n v4 = $6 AND\n v5 = $7", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text", + "Text", + "Text", + "Text", + "Text", + "Text", + "Text" + ] + }, + "nullable": [] + }, + "hash": "2872b56bbc5bed96b1a303bf9cf44610fb79a1b9330730c65953f0c1b88c2a53" +} diff --git a/.sqlx/query-3022cb733970ae5836ab3891367b209a7e1f0974242ecd0f55e5b0098152bad5.json b/.sqlx/query-3022cb733970ae5836ab3891367b209a7e1f0974242ecd0f55e5b0098152bad5.json new file mode 100644 index 0000000..4d06843 --- /dev/null +++ b/.sqlx/query-3022cb733970ae5836ab3891367b209a7e1f0974242ecd0f55e5b0098152bad5.json @@ -0,0 +1,62 @@ +{ + "db_name": "PostgreSQL", + "query": "SELECT * FROM casbin_rule", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "id", + "type_info": "Int4" + }, + { + "ordinal": 1, + "name": "ptype", + "type_info": "Varchar" + }, + { + "ordinal": 2, + "name": "v0", + "type_info": "Varchar" + }, + { + "ordinal": 3, + "name": "v1", + "type_info": "Varchar" + }, + { + "ordinal": 4, + "name": "v2", + "type_info": "Varchar" + }, + { + "ordinal": 5, + "name": "v3", + "type_info": "Varchar" + }, + { + "ordinal": 6, + "name": "v4", + "type_info": "Varchar" + }, + { + "ordinal": 7, + "name": "v5", + "type_info": "Varchar" + } + ], + "parameters": { + "Left": [] + }, + "nullable": [ + false, + false, + false, + false, + false, + false, + false, + false + ] + }, + "hash": "3022cb733970ae5836ab3891367b209a7e1f0974242ecd0f55e5b0098152bad5" +} diff --git a/.sqlx/query-438ee38e669be96e562d09d3bc5806b4c78b7aa2a9609c4eccb941c7dff7b107.json b/.sqlx/query-438ee38e669be96e562d09d3bc5806b4c78b7aa2a9609c4eccb941c7dff7b107.json new file mode 100644 index 0000000..75c6da3 --- /dev/null +++ b/.sqlx/query-438ee38e669be96e562d09d3bc5806b4c78b7aa2a9609c4eccb941c7dff7b107.json @@ -0,0 +1,12 @@ +{ + "db_name": "PostgreSQL", + "query": "CREATE TABLE IF NOT EXISTS casbin_rule (\n id SERIAL PRIMARY KEY,\n ptype VARCHAR NOT NULL,\n v0 VARCHAR NOT NULL,\n v1 VARCHAR NOT NULL,\n v2 VARCHAR NOT NULL,\n v3 VARCHAR NOT NULL,\n v4 VARCHAR NOT NULL,\n v5 VARCHAR NOT NULL,\n CONSTRAINT unique_key_sqlx_adapter UNIQUE(ptype, v0, v1, v2, v3, v4, v5)\n );\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [] + }, + "nullable": [] + }, + "hash": "438ee38e669be96e562d09d3bc5806b4c78b7aa2a9609c4eccb941c7dff7b107" +} diff --git a/.sqlx/query-4acfe0086a593b08177791bb3b47cb75a999041a3eb6a8f8177bebfa3c30d56f.json b/.sqlx/query-4acfe0086a593b08177791bb3b47cb75a999041a3eb6a8f8177bebfa3c30d56f.json new file mode 100644 index 0000000..ce229dc --- /dev/null +++ b/.sqlx/query-4acfe0086a593b08177791bb3b47cb75a999041a3eb6a8f8177bebfa3c30d56f.json @@ -0,0 +1,16 @@ +{ + "db_name": "PostgreSQL", + "query": "DELETE FROM casbin_rule WHERE\n ptype = $1 AND\n (v4 is NULL OR v4 = COALESCE($2,v4)) AND\n (v5 is NULL OR v5 = COALESCE($3,v5))", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text", + "Varchar", + "Varchar" + ] + }, + "nullable": [] + }, + "hash": "4acfe0086a593b08177791bb3b47cb75a999041a3eb6a8f8177bebfa3c30d56f" +} diff --git a/.sqlx/query-4e7b82d256f7298564f46af6a45b89853785c32a5f83cb0b25609329c760428a.json b/.sqlx/query-4e7b82d256f7298564f46af6a45b89853785c32a5f83cb0b25609329c760428a.json new file mode 100644 index 0000000..4c4c1df --- /dev/null +++ b/.sqlx/query-4e7b82d256f7298564f46af6a45b89853785c32a5f83cb0b25609329c760428a.json @@ -0,0 +1,19 @@ +{ + "db_name": "PostgreSQL", + "query": "DELETE FROM casbin_rule WHERE\n ptype = $1 AND\n (v1 is NULL OR v1 = COALESCE($2,v1)) AND\n (v2 is NULL OR v2 = COALESCE($3,v2)) AND\n (v3 is NULL OR v3 = COALESCE($4,v3)) AND\n (v4 is NULL OR v4 = COALESCE($5,v4)) AND\n (v5 is NULL OR v5 = COALESCE($6,v5))", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text", + "Varchar", + "Varchar", + "Varchar", + "Varchar", + "Varchar" + ] + }, + "nullable": [] + }, + "hash": "4e7b82d256f7298564f46af6a45b89853785c32a5f83cb0b25609329c760428a" +} diff --git a/.sqlx/query-f130c22d14ee2a99b9220ac1a45226ba97993ede9988a4c57d58bd066500a119.json b/.sqlx/query-f130c22d14ee2a99b9220ac1a45226ba97993ede9988a4c57d58bd066500a119.json new file mode 100644 index 0000000..ef54cdb --- /dev/null +++ b/.sqlx/query-f130c22d14ee2a99b9220ac1a45226ba97993ede9988a4c57d58bd066500a119.json @@ -0,0 +1,20 @@ +{ + "db_name": "PostgreSQL", + "query": "DELETE FROM casbin_rule WHERE\n ptype = $1 AND\n (v0 is NULL OR v0 = COALESCE($2,v0)) AND\n (v1 is NULL OR v1 = COALESCE($3,v1)) AND\n (v2 is NULL OR v2 = COALESCE($4,v2)) AND\n (v3 is NULL OR v3 = COALESCE($5,v3)) AND\n (v4 is NULL OR v4 = COALESCE($6,v4)) AND\n (v5 is NULL OR v5 = COALESCE($7,v5))", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text", + "Varchar", + "Varchar", + "Varchar", + "Varchar", + "Varchar", + "Varchar" + ] + }, + "nullable": [] + }, + "hash": "f130c22d14ee2a99b9220ac1a45226ba97993ede9988a4c57d58bd066500a119" +} diff --git a/.sqlx/query-f8611a862ed1d3b982e8aa5ccab21e00c42a3fad8082cf15c2af88cd8388f41b.json b/.sqlx/query-f8611a862ed1d3b982e8aa5ccab21e00c42a3fad8082cf15c2af88cd8388f41b.json new file mode 100644 index 0000000..0daaa8a --- /dev/null +++ b/.sqlx/query-f8611a862ed1d3b982e8aa5ccab21e00c42a3fad8082cf15c2af88cd8388f41b.json @@ -0,0 +1,18 @@ +{ + "db_name": "PostgreSQL", + "query": "DELETE FROM casbin_rule WHERE\n ptype = $1 AND\n (v2 is NULL OR v2 = COALESCE($2,v2)) AND\n (v3 is NULL OR v3 = COALESCE($3,v3)) AND\n (v4 is NULL OR v4 = COALESCE($4,v4)) AND\n (v5 is NULL OR v5 = COALESCE($5,v5))", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text", + "Varchar", + "Varchar", + "Varchar", + "Varchar" + ] + }, + "nullable": [] + }, + "hash": "f8611a862ed1d3b982e8aa5ccab21e00c42a3fad8082cf15c2af88cd8388f41b" +} diff --git a/.sqlx/query-fa51ae7af271fc17c848694fbf1b37d46c5a2f4202e1b8dce1f66a65069beb0b.json b/.sqlx/query-fa51ae7af271fc17c848694fbf1b37d46c5a2f4202e1b8dce1f66a65069beb0b.json new file mode 100644 index 0000000..4a5f7e8 --- /dev/null +++ b/.sqlx/query-fa51ae7af271fc17c848694fbf1b37d46c5a2f4202e1b8dce1f66a65069beb0b.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "DELETE FROM casbin_rule WHERE\n ptype = $1 AND\n (v5 is NULL OR v5 = COALESCE($2,v5))", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text", + "Varchar" + ] + }, + "nullable": [] + }, + "hash": "fa51ae7af271fc17c848694fbf1b37d46c5a2f4202e1b8dce1f66a65069beb0b" +} diff --git a/.sqlx/query-fb7ce69e70b345d2cf0ca017523c1b90b67b053add3d4cffb8d579bfc8f08345.json b/.sqlx/query-fb7ce69e70b345d2cf0ca017523c1b90b67b053add3d4cffb8d579bfc8f08345.json new file mode 100644 index 0000000..897ae52 --- /dev/null +++ b/.sqlx/query-fb7ce69e70b345d2cf0ca017523c1b90b67b053add3d4cffb8d579bfc8f08345.json @@ -0,0 +1,75 @@ +{ + "db_name": "PostgreSQL", + "query": "SELECT * from casbin_rule WHERE (\n ptype LIKE 'g%' AND v0 LIKE $1 AND v1 LIKE $2 AND v2 LIKE $3 AND v3 LIKE $4 AND v4 LIKE $5 AND v5 LIKE $6 )\n OR (\n ptype LIKE 'p%' AND v0 LIKE $7 AND v1 LIKE $8 AND v2 LIKE $9 AND v3 LIKE $10 AND v4 LIKE $11 AND v5 LIKE $12 );\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "id", + "type_info": "Int4" + }, + { + "ordinal": 1, + "name": "ptype", + "type_info": "Varchar" + }, + { + "ordinal": 2, + "name": "v0", + "type_info": "Varchar" + }, + { + "ordinal": 3, + "name": "v1", + "type_info": "Varchar" + }, + { + "ordinal": 4, + "name": "v2", + "type_info": "Varchar" + }, + { + "ordinal": 5, + "name": "v3", + "type_info": "Varchar" + }, + { + "ordinal": 6, + "name": "v4", + "type_info": "Varchar" + }, + { + "ordinal": 7, + "name": "v5", + "type_info": "Varchar" + } + ], + "parameters": { + "Left": [ + "Text", + "Text", + "Text", + "Text", + "Text", + "Text", + "Text", + "Text", + "Text", + "Text", + "Text", + "Text" + ] + }, + "nullable": [ + false, + false, + false, + false, + false, + false, + false, + false + ] + }, + "hash": "fb7ce69e70b345d2cf0ca017523c1b90b67b053add3d4cffb8d579bfc8f08345" +} diff --git a/Cargo.lock b/Cargo.lock index 996de5c..0177a2c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5,7 +5,7 @@ version = 3 [[package]] name = "actix-casbin-auth" version = "1.1.0" -source = "git+https://github.com/casbin-rs/actix-casbin-auth.git#66662102a92fe1ae80ad427e07c1879cbdf65f4f" +source = "git+https://github.com/casbin-rs/actix-casbin-auth.git#1bf1ef5854994c3df8703e96350758e748c8d099" dependencies = [ "actix-service", "actix-web", @@ -20,7 +20,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f7b0a21988c1bf877cf4759ef5ddaac04c1c9fe808c9142ecb78ba97d97a28a" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "bytes", "futures-core", "futures-sink", @@ -48,18 +48,18 @@ dependencies = [ [[package]] name = "actix-http" -version = "3.6.0" +version = "3.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d223b13fd481fc0d1f83bb12659ae774d9e3601814c68a0bc539731698cca743" +checksum = "d48f96fc3003717aeb9856ca3d02a8c7de502667ad76eeacd830b48d2e91fac4" dependencies = [ "actix-codec", "actix-rt", "actix-service", "actix-utils", "ahash 0.8.11", - "base64 0.21.7", - "bitflags 2.5.0", - "brotli", + "base64 0.22.1", + "bitflags 2.6.0", + "brotli 6.0.0", "bytes", "bytestring", "derive_more", @@ -92,27 +92,29 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e01ed3140b2f8d422c68afa1ed2e85d996ea619c988ac834d255db32138655cb" dependencies = [ "quote", - "syn 2.0.58", + "syn 2.0.87", ] [[package]] name = "actix-router" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d22475596539443685426b6bdadb926ad0ecaefdfc5fb05e5e3441f15463c511" +checksum = "13d324164c51f63867b57e73ba5936ea151b8a41a1d23d1031eeb9f70d0236f8" dependencies = [ "bytestring", + "cfg-if", "http", "regex", + "regex-lite", "serde", "tracing", ] [[package]] name = "actix-rt" -version = "2.9.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28f32d40287d3f402ae0028a9d54bef51af15c8769492826a69d28f81893151d" +checksum = "24eda4e2a6e042aa4e55ac438a2ae052d3b5da0ecf83d7411e1a368946925208" dependencies = [ "futures-core", "tokio", @@ -120,9 +122,9 @@ dependencies = [ [[package]] name = "actix-server" -version = "2.3.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3eb13e7eef0423ea6eab0e59f6c72e7cb46d33691ad56a726b3cd07ddec2c2d4" +checksum = "7ca2549781d8dd6d75c40cf6b6051260a2cc2f3c62343d761a969a0640646894" dependencies = [ "actix-rt", "actix-service", @@ -130,7 +132,7 @@ dependencies = [ "futures-core", "futures-util", "mio", - "socket2 0.5.6", + "socket2 0.5.7", "tokio", "tracing", ] @@ -158,9 +160,9 @@ dependencies = [ [[package]] name = "actix-web" -version = "4.5.1" +version = "4.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a6556ddebb638c2358714d853257ed226ece6023ef9364f23f0c70737ea984" +checksum = "9180d76e5cc7ccbc4d60a506f2c727730b154010262df5b910eb17dbe4b8cb38" dependencies = [ "actix-codec", "actix-http", @@ -180,6 +182,7 @@ dependencies = [ "encoding_rs", "futures-core", "futures-util", + "impl-more", "itoa", "language-tags", "log", @@ -187,41 +190,42 @@ dependencies = [ "once_cell", "pin-project-lite", "regex", + "regex-lite", "serde", "serde_json", "serde_urlencoded", "smallvec", - "socket2 0.5.6", - "time 0.3.34", + "socket2 0.5.7", + "time 0.3.36", "url", ] [[package]] name = "actix-web-codegen" -version = "4.2.2" +version = "4.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb1f50ebbb30eca122b188319a4398b3f7bb4a8cdf50ecfb73bfc6a3c3ce54f5" +checksum = "f591380e2e68490b5dfaf1dd1aa0ebe78d84ba7067078512b4ea6e4492d622b8" dependencies = [ "actix-router", "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.87", ] [[package]] name = "addr2line" -version = "0.21.0" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" dependencies = [ "gimli", ] [[package]] -name = "adler" -version = "1.0.2" +name = "adler2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" [[package]] name = "aead" @@ -264,7 +268,7 @@ version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" dependencies = [ - "getrandom 0.2.12", + "getrandom 0.2.15", "once_cell", "version_check", ] @@ -277,7 +281,7 @@ checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", "const-random", - "getrandom 0.2.12", + "getrandom 0.2.15", "once_cell", "version_check", "zerocopy", @@ -309,15 +313,15 @@ dependencies = [ [[package]] name = "allocator-api2" -version = "0.2.16" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" +checksum = "45862d1c77f2228b9e10bc609d5bc203d86ebc9b87ad8d5d5167a6c9abf739d9" [[package]] name = "amq-protocol" -version = "7.1.2" +version = "7.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d40d8b2465c7959dd40cee32ba6ac334b5de57e9fca0cc756759894a4152a5d" +checksum = "e3a41c091e49edfcc098b4f90d4d7706a8cf9158034e84ebfee7ff346092f67c" dependencies = [ "amq-protocol-tcp", "amq-protocol-types", @@ -329,9 +333,9 @@ dependencies = [ [[package]] name = "amq-protocol-tcp" -version = "7.1.2" +version = "7.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cb2100adae7da61953a2c3a01935d86caae13329fadce3333f524d6d6ce12e2" +checksum = "3ed7a4a662472f88823ed2fc81babb0b00562f2c54284e3e7bffc02b6df649bf" dependencies = [ "amq-protocol-uri", "tcp-stream", @@ -340,9 +344,9 @@ dependencies = [ [[package]] name = "amq-protocol-types" -version = "7.1.2" +version = "7.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "156ff13c8a3ced600b4e54ed826a2ae6242b6069d00dd98466827cef07d3daff" +checksum = "bd6484fdc918c1b6e2ae8eda2914d19a5873e1975f93ad8d33d6a24d1d98df05" dependencies = [ "cookie-factory", "nom", @@ -352,9 +356,9 @@ dependencies = [ [[package]] name = "amq-protocol-uri" -version = "7.1.2" +version = "7.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "751bbd7d440576066233e740576f1b31fdc6ab86cfabfbd48c548de77eca73e4" +checksum = "7f7f2da69e0e1182765bf33407cd8a843f20791b5af2b57a2645818c4776c56c" dependencies = [ "amq-protocol-types", "percent-encoding", @@ -378,57 +382,97 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.13" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d96bd03f33fe50a863e394ee9718a706f988b9079b20c3784fb726e7678b62fb" +checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", + "is_terminal_polyfill", "utf8parse", ] [[package]] name = "anstyle" -version = "1.0.6" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" +checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" [[package]] name = "anstyle-parse" -version = "0.2.3" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" +checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.0.2" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" +checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.2" +version = "3.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" +checksum = "2109dbce0e72be3ec00bed26e6a7479ca384ad226efdd66db8fa2e3a38c83125" dependencies = [ "anstyle", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "anyhow" -version = "1.0.81" +version = "1.0.93" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c95c10ba0b00a02636238b814946408b1322d5ac4760326e6fb8ec956d85775" + +[[package]] +name = "asn1-rs" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5493c3bedbacf7fd7382c6346bbd66687d12bbaad3a89a2d2c303ee6cf20b048" +dependencies = [ + "asn1-rs-derive", + "asn1-rs-impl", + "displaydoc", + "nom", + "num-traits", + "rusticata-macros", + "thiserror", + "time 0.3.36", +] + +[[package]] +name = "asn1-rs-derive" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "965c2d33e53cb6b267e148a4cb0760bc01f4904c1cd4bb4002a085bb016d1490" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", + "synstructure", +] + +[[package]] +name = "asn1-rs-impl" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247" +checksum = "7b18050c2cd6fe86c3a76584ef5e0baf286d038cda203eb6223df2cc413565f7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] [[package]] name = "assert-json-diff" @@ -453,28 +497,26 @@ dependencies = [ [[package]] name = "async-channel" -version = "2.2.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f28243a43d821d11341ab73c80bed182dc015c514b951616cf79bd4af39af0c3" +checksum = "89b47800b0be77592da0afd425cc03468052844aff33b84e33cc696f64e77b6a" dependencies = [ "concurrent-queue", - "event-listener 5.2.0", - "event-listener-strategy 0.5.1", + "event-listener-strategy", "futures-core", "pin-project-lite", ] [[package]] name = "async-executor" -version = "1.9.1" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10b3e585719c2358d2660232671ca8ca4ddb4be4ce8a1842d6c2dc8685303316" +checksum = "30ca9a001c1e8ba5149f91a74362376cc6bc5b919d92d988668657bd570bdcec" dependencies = [ - "async-lock 3.3.0", "async-task", "concurrent-queue", - "fastrand 2.0.2", - "futures-lite 2.3.0", + "fastrand 2.2.0", + "futures-lite 2.5.0", "slab", ] @@ -484,20 +526,20 @@ version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05b1b633a2115cd122d73b955eadd9916c18c8f510ec9cd1686404c60ad1c29c" dependencies = [ - "async-channel 2.2.0", + "async-channel 2.3.1", "async-executor", - "async-io 2.3.2", - "async-lock 3.3.0", + "async-io 2.4.0", + "async-lock 3.4.0", "blocking", - "futures-lite 2.3.0", + "futures-lite 2.5.0", "once_cell", ] [[package]] name = "async-global-executor-trait" -version = "2.1.0" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33dd14c5a15affd2abcff50d84efd4009ada28a860f01c14f9d654f3e81b3f75" +checksum = "80f19936c1a84fb48ceb8899b642d2a72572587d1021cc561bfb24de9f33ee89" dependencies = [ "async-global-executor", "async-trait", @@ -526,21 +568,21 @@ dependencies = [ [[package]] name = "async-io" -version = "2.3.2" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcccb0f599cfa2f8ace422d3555572f47424da5648a4382a9dd0310ff8210884" +checksum = "43a2b323ccce0a1d90b449fd71f2a06ca7faa7c54c2751f06c9bd851fc061059" dependencies = [ - "async-lock 3.3.0", + "async-lock 3.4.0", "cfg-if", "concurrent-queue", "futures-io", - "futures-lite 2.3.0", + "futures-lite 2.5.0", "parking", - "polling 3.6.0", - "rustix 0.38.32", + "polling 3.7.4", + "rustix 0.38.40", "slab", "tracing", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -554,12 +596,12 @@ dependencies = [ [[package]] name = "async-lock" -version = "3.3.0" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d034b430882f8381900d3fe6f0aaa3ad94f2cb4ac519b429692a1bc2dda4ae7b" +checksum = "ff6e472cdea888a4bd64f342f09b3f50e1886d32afe8df3d663c01140b811b18" dependencies = [ - "event-listener 4.0.3", - "event-listener-strategy 0.4.0", + "event-listener 5.3.1", + "event-listener-strategy", "pin-project-lite", ] @@ -577,19 +619,19 @@ dependencies = [ [[package]] name = "async-task" -version = "4.7.0" +version = "4.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbb36e985947064623dbd357f727af08ffd077f93d696782f3c56365fa2e2799" +checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" [[package]] name = "async-trait" -version = "0.1.79" +version = "0.1.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507401cad91ec6a857ed5513a2073c82a9b9048762b885bb98655b306964681" +checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.87", ] [[package]] @@ -618,23 +660,23 @@ checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "autocfg" -version = "1.2.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "backtrace" -version = "0.3.71" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ "addr2line", - "cc", "cfg-if", "libc", "miniz_oxide", "object", "rustc-demangle", + "windows-targets 0.52.6", ] [[package]] @@ -651,9 +693,15 @@ checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] name = "base64" -version = "0.22.0" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "base64ct" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9475866fec1451be56a3c2400fd081ff546538961565ccb5b7142cbd22bc7a51" +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" [[package]] name = "bitflags" @@ -663,9 +711,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "block-buffer" @@ -687,18 +735,15 @@ dependencies = [ [[package]] name = "blocking" -version = "1.5.1" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a37913e8dc4ddcc604f0c6d3bf2887c995153af3611de9e23c352b44c1b9118" +checksum = "703f41c54fc768e63e091340b424302bb1c29ef4aa0c7f10fe849dfb114d29ea" dependencies = [ - "async-channel 2.2.0", - "async-lock 3.3.0", + "async-channel 2.3.1", "async-task", - "fastrand 2.0.2", "futures-io", - "futures-lite 2.3.0", + "futures-lite 2.5.0", "piper", - "tracing", ] [[package]] @@ -709,7 +754,18 @@ checksum = "d640d25bc63c50fb1f0b545ffd80207d2e10a4c965530809b40ba3386825c391" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", - "brotli-decompressor", + "brotli-decompressor 2.5.1", +] + +[[package]] +name = "brotli" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74f7971dbd9326d58187408ab83117d8ac1bb9c17b085fdacd1cf2f598719b6b" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", + "brotli-decompressor 4.0.1", ] [[package]] @@ -722,17 +778,27 @@ dependencies = [ "alloc-stdlib", ] +[[package]] +name = "brotli-decompressor" +version = "4.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a45bd2e4095a8b518033b128020dd4a55aab1c0a381ba4404a472630f4bc362" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", +] + [[package]] name = "bumpalo" -version = "3.15.4" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ff69b9dd49fd426c69a0db9fc04dd934cdb6645ff000864d98f7e2af8830eaa" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "bytecount" -version = "0.6.7" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1e5f035d16fc623ae5f74981db80a439803888314e3a555fd6f04acd51a3205" +checksum = "5ce89b21cab1437276d2650d57e971f9d548a2d9037cc231abdc0562b97498ce" [[package]] name = "byteorder" @@ -742,9 +808,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.6.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da" [[package]] name = "bytestring" @@ -757,9 +823,9 @@ dependencies = [ [[package]] name = "camino" -version = "1.1.6" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c" +checksum = "8b96ec4966b5813e2c0507c1f86115c8c5abaadc3980879c3424042a02fd1ad3" dependencies = [ "serde", ] @@ -788,21 +854,22 @@ dependencies = [ [[package]] name = "casbin" -version = "2.2.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b71063d3ee2f5ecc89229ccade0f3f8fb413b5e3978124a38b611216f91dd7c9" +checksum = "66e141a8db13c2e8bf3fdd6ac2b48ace7e70d2e4a66c329a4bb759e1368f22dc" dependencies = [ "async-trait", "fixedbitset", - "getrandom 0.2.12", + "getrandom 0.2.15", + "hashlink 0.9.1", "mini-moka", "once_cell", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "petgraph", "regex", "rhai", - "ritelinked", "serde", + "serde_json", "slog", "slog-async", "slog-term", @@ -821,12 +888,13 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.90" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5" +checksum = "1aeb932158bd710538c73702db6945cb68a8fb08c519e6e12706b94263b36db8" dependencies = [ "jobserver", "libc", + "shlex", ] [[package]] @@ -863,9 +931,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.4" +version = "4.5.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0" +checksum = "fb3b4b9e5a7c7514dfa52869339ee98b3156b0bfb4e8a77c4ff4babb64b1604f" dependencies = [ "clap_builder", "clap_derive", @@ -873,9 +941,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.2" +version = "4.5.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" +checksum = "b17a95aa67cc7b5ebd32aa5370189aa0d79069ef1c64ce893bd30fb24bff20ec" dependencies = [ "anstream", "anstyle", @@ -885,33 +953,45 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.4" +version = "4.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64" +checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab" dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.87", ] [[package]] name = "clap_lex" -version = "0.7.0" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afb84c814227b90d6895e01398aee0d8033c00e7466aca416fb6a8e0eb19d8a7" + +[[package]] +name = "cms" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" +checksum = "7b77c319abfd5219629c45c34c89ba945ed3c5e49fcde9d16b6c3885f118a730" +dependencies = [ + "const-oid", + "der", + "spki", + "x509-cert", +] [[package]] name = "colorchoice" -version = "1.0.0" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" +checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" [[package]] name = "combine" -version = "4.6.6" +version = "4.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35ed6e9d84f0b51a7f52daf1c7d71dd136fd7a3f41a8462b8cdb8c78d920fad4" +checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" dependencies = [ "bytes", "futures-core", @@ -923,9 +1003,9 @@ dependencies = [ [[package]] name = "concurrent-queue" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d16048cd947b08fa32c24458a22f5dc5e835264f689f4f5653210c69fd107363" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" dependencies = [ "crossbeam-utils", ] @@ -949,6 +1029,12 @@ dependencies = [ "yaml-rust", ] +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + [[package]] name = "const-random" version = "0.1.18" @@ -964,7 +1050,7 @@ version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" dependencies = [ - "getrandom 0.2.12", + "getrandom 0.2.15", "once_cell", "tiny-keccak", ] @@ -982,7 +1068,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e859cd57d0710d9e06c381b550c06e76992472a8c6d527aecd2fc673dcc231fb" dependencies = [ "percent-encoding", - "time 0.3.34", + "time 0.3.36", "version_check", ] @@ -991,9 +1077,6 @@ name = "cookie-factory" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9885fa71e26b8ab7855e2ec7cae6e9b380edff76cd052e07c683a0319d51b3a2" -dependencies = [ - "futures", -] [[package]] name = "core-foundation" @@ -1007,24 +1090,24 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.12" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +checksum = "0ca741a962e1b0bff6d724a1a0958b686406e853bb14061f218562e1896f95e6" 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", ] @@ -1037,18 +1120,18 @@ checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" [[package]] name = "crc32fast" -version = "1.4.0" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" dependencies = [ "cfg-if", ] [[package]] name = "crossbeam-channel" -version = "0.5.12" +version = "0.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab3db02a9c5b5121e1e42fbdb1aeb65f5e02624cc58c43f2884c6ccac0b82f95" +checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" dependencies = [ "crossbeam-utils", ] @@ -1064,9 +1147,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.19" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" [[package]] name = "crunchy" @@ -1136,12 +1219,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" dependencies = [ "cfg-if", - "hashbrown 0.14.3", + "hashbrown 0.14.5", "lock_api", "once_cell", - "parking_lot_core 0.9.9", + "parking_lot_core 0.9.10", ] +[[package]] +name = "data-encoding" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" + [[package]] name = "deadpool" version = "0.9.5" @@ -1180,13 +1269,51 @@ dependencies = [ [[package]] name = "deadpool-runtime" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63dfa964fe2a66f3fde91fc70b267fe193d822c7e603e2a675a49a7f46ad3f49" +checksum = "092966b41edc516079bdf31ec78a2e0588d1d0c08f78b91d8307215928642b2b" dependencies = [ "tokio", ] +[[package]] +name = "der" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" +dependencies = [ + "const-oid", + "der_derive", + "flagset", + "pem-rfc7468", + "zeroize", +] + +[[package]] +name = "der-parser" +version = "9.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cd0a5c643689626bec213c4d8bd4d96acc8ffdb4ad4bb6bc16abf27d5f4b553" +dependencies = [ + "asn1-rs", + "displaydoc", + "nom", + "num-bigint", + "num-traits", + "rusticata-macros", +] + +[[package]] +name = "der_derive" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8034092389675178f570469e6c3b0465d3d30b4505c294a6550db47f3c17ad18" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + [[package]] name = "deranged" version = "0.3.11" @@ -1260,15 +1387,15 @@ dependencies = [ [[package]] name = "derive_more" -version = "0.99.17" +version = "0.99.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" +checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce" dependencies = [ "convert_case", "proc-macro2", "quote", "rustc_version", - "syn 1.0.109", + "syn 2.0.87", ] [[package]] @@ -1332,6 +1459,17 @@ dependencies = [ "winapi", ] +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + [[package]] name = "dlv-list" version = "0.3.0" @@ -1351,17 +1489,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d6fdd6fa1c9e8e716f5f73406b868929f468702449621e7397066478b9bf89c" dependencies = [ "derive_builder 0.13.1", - "indexmap 2.2.6", + "indexmap 2.6.0", "serde", "serde_yaml", ] -[[package]] -name = "dotenv" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f" - [[package]] name = "dotenvy" version = "0.15.7" @@ -1370,18 +1502,18 @@ checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" [[package]] name = "either" -version = "1.10.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" dependencies = [ "serde", ] [[package]] name = "encoding_rs" -version = "0.8.33" +version = "0.8.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" dependencies = [ "cfg-if", ] @@ -1394,9 +1526,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", @@ -1430,20 +1562,9 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] name = "event-listener" -version = "4.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67b215c49b2b248c855fb73579eb1f4f26c38ffdc12973e20e07b91d78d5646e" -dependencies = [ - "concurrent-queue", - "parking", - "pin-project-lite", -] - -[[package]] -name = "event-listener" -version = "5.2.0" +version = "5.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b5fb89194fa3cad959b833185b3063ba881dbfc7030680b314250779fb4cc91" +checksum = "6032be9bd27023a771701cc49f9f053c751055f71efb2e0ae5c15809093675ba" dependencies = [ "concurrent-queue", "parking", @@ -1452,29 +1573,19 @@ dependencies = [ [[package]] name = "event-listener-strategy" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "958e4d70b6d5e81971bebec42271ec641e7ff4e170a6fa605f2b8a8b65cb97d3" -dependencies = [ - "event-listener 4.0.3", - "pin-project-lite", -] - -[[package]] -name = "event-listener-strategy" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "332f51cb23d20b0de8458b86580878211da09bcd4503cb579c225b3d124cabb3" +checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1" dependencies = [ - "event-listener 5.2.0", + "event-listener 5.3.1", "pin-project-lite", ] [[package]] name = "executor-trait" -version = "2.1.0" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a1052dd43212a7777ec6a69b117da52f5e52f07aec47d00c1a2b33b85d06b08" +checksum = "13c39dff9342e4e0e16ce96be751eb21a94e94a87bb2f6e63ad1961c2ce109bf" dependencies = [ "async-trait", ] @@ -1490,15 +1601,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "658bd65b1cf4c852a3cc96f18a8ce7b5640f6b703f905c7d74532294c2a63984" - -[[package]] -name = "finl_unicode" -version = "1.2.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fcfdc7a0362c9f4444381a9e697c79d435fe65b52a37466fc2c1184cee9edc6" +checksum = "486f806e73c5707928240ddc295403b1b93c96a02038563881c4a2fd84b81ac4" [[package]] name = "fixedbitset" @@ -1506,11 +1611,17 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" +[[package]] +name = "flagset" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3ea1ec5f8307826a5b71094dd91fc04d4ae75d5709b20ad351c7fb4815c86ec" + [[package]] name = "flate2" -version = "1.0.28" +version = "1.0.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" +checksum = "a1b589b4dc103969ad3cf85c950899926ec64300a1a46d76c03a6072957036f0" dependencies = [ "crc32fast", "miniz_oxide", @@ -1518,22 +1629,12 @@ dependencies = [ [[package]] name = "flume" -version = "0.10.14" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1657b4441c3403d9f7b3409e47575237dac27b1b5726df654a6ecbf92f0f7577" +checksum = "da0e4dd2a88388a1f4ccc7c9ce104604dab68d9f408dc34cd45823d5a9069095" dependencies = [ "futures-core", "futures-sink", - "pin-project", - "spin 0.9.8", -] - -[[package]] -name = "flume" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55ac459de2512911e4b674ce33cf20befaba382d05b62b008afc1c8b57cbf181" -dependencies = [ "spin 0.9.8", ] @@ -1569,9 +1670,9 @@ dependencies = [ [[package]] name = "futures" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" dependencies = [ "futures-channel", "futures-core", @@ -1584,9 +1685,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", "futures-sink", @@ -1594,15 +1695,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-executor" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" dependencies = [ "futures-core", "futures-task", @@ -1628,14 +1729,14 @@ checksum = "1d930c203dd0b6ff06e0201a4a2fe9149b43c684fd4420555b26d21b1a02956f" dependencies = [ "futures-core", "lock_api", - "parking_lot 0.12.1", + "parking_lot 0.12.3", ] [[package]] name = "futures-io" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-lite" @@ -1654,11 +1755,11 @@ dependencies = [ [[package]] name = "futures-lite" -version = "2.3.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5" +checksum = "cef40d21ae2c515b51041df9ed313ed21e572df340ea58a922a0aefe7e8891a1" dependencies = [ - "fastrand 2.0.2", + "fastrand 2.2.0", "futures-core", "futures-io", "parking", @@ -1667,26 +1768,26 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.87", ] [[package]] name = "futures-sink" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-timer" @@ -1696,9 +1797,9 @@ checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" [[package]] name = "futures-util" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-channel", "futures-core", @@ -1745,9 +1846,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.12" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "js-sys", @@ -1768,9 +1869,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.1" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "glob" @@ -1783,7 +1884,6 @@ name = "h2" version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" - dependencies = [ "bytes", "fnv", @@ -1791,23 +1891,13 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap 2.2.6", - + "indexmap 2.6.0", "slab", "tokio", "tokio-util", "tracing", ] -[[package]] -name = "hashbrown" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" -dependencies = [ - "ahash 0.7.8", -] - [[package]] name = "hashbrown" version = "0.12.3" @@ -1819,21 +1909,36 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.14.3" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" dependencies = [ "ahash 0.8.11", "allocator-api2", ] +[[package]] +name = "hashbrown" +version = "0.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a9bfc1af68b1726ea47d3d5109de126281def866b33970e10fbab11b5dafab3" + [[package]] name = "hashlink" version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" dependencies = [ - "hashbrown 0.14.3", + "hashbrown 0.14.5", +] + +[[package]] +name = "hashlink" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ba4ff7128dee98c7dc9794b6a411377e1404dba1c97deb8d1a55297bd25d8af" +dependencies = [ + "hashbrown 0.14.5", ] [[package]] @@ -1857,6 +1962,12 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" +[[package]] +name = "hermit-abi" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" + [[package]] name = "hex" version = "0.4.3" @@ -1935,9 +2046,9 @@ dependencies = [ [[package]] name = "httparse" -version = "1.8.0" +version = "1.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" +checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" [[package]] name = "httpdate" @@ -1947,9 +2058,9 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "hyper" -version = "0.14.28" +version = "0.14.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" +checksum = "8c08302e8fa335b151b788c775ff56e7a03ae64ff85c548ee820fecb70356e85" dependencies = [ "bytes", "futures-channel", @@ -1962,7 +2073,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2 0.5.6", + "socket2 0.5.7", "tokio", "tower-service", "tracing", @@ -1984,9 +2095,9 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.60" +version = "0.1.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" +checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -2005,6 +2116,124 @@ dependencies = [ "cc", ] +[[package]] +name = "icu_collections" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locid" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locid_transform" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locid_transform_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" + +[[package]] +name = "icu_properties" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" + +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_provider_macros" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + [[package]] name = "ident_case" version = "1.0.1" @@ -2013,14 +2242,31 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.5.0" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" +dependencies = [ + "icu_normalizer", + "icu_properties", ] +[[package]] +name = "impl-more" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aae21c3177a27788957044151cc2800043d127acaa460a47ebb9b84dfa2c6aa0" + [[package]] name = "indexmap" version = "1.9.3" @@ -2033,12 +2279,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.6" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ "equivalent", - "hashbrown 0.14.3", + "hashbrown 0.15.1", "serde", ] @@ -2060,9 +2306,9 @@ dependencies = [ [[package]] name = "instant" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" dependencies = [ "cfg-if", ] @@ -2073,28 +2319,34 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ - "hermit-abi", + "hermit-abi 0.3.9", "libc", "windows-sys 0.48.0", ] [[package]] name = "ipnet" -version = "2.9.0" +version = "2.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" [[package]] name = "is-terminal" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" +checksum = "261f68e344040fbd0edea105bef17c66edf46f984ddb1115b775ce31be948f4b" dependencies = [ - "hermit-abi", + "hermit-abi 0.4.0", "libc", "windows-sys 0.52.0", ] +[[package]] +name = "is_terminal_polyfill" +version = "1.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" + [[package]] name = "itertools" version = "0.12.1" @@ -2112,18 +2364,18 @@ checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "jobserver" -version = "0.1.28" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab46a6e9526ddef3ae7f787c06f0f2600639ba80ea3eade3d8e670a2230f51d6" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" dependencies = [ "libc", ] [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" dependencies = [ "wasm-bindgen", ] @@ -2147,19 +2399,19 @@ checksum = "d4345964bb142484797b161f473a503a434de77149dd8c7427788c6e13379388" [[package]] name = "lapin" -version = "2.3.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f3067a1fcfbc3fc46455809c023e69b8f6602463201010f4ae5a3b572adb9dc" +checksum = "209b09a06f4bd4952a0fd0594f90d53cf4496b062f59acc838a2823e1bb7d95c" dependencies = [ "amq-protocol", "async-global-executor-trait", "async-reactor-trait", "async-trait", "executor-trait", - "flume 0.10.14", + "flume", "futures-core", "futures-io", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "pinky-swear", "reactor-trait", "serde", @@ -2170,15 +2422,15 @@ dependencies = [ [[package]] name = "lazy_static" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.153" +version = "0.2.162" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" +checksum = "18d287de67fe55fd7e1581fe933d965a5a9477b38e949cfa9f8574ef01506398" [[package]] name = "libredox" @@ -2186,7 +2438,7 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "libc", ] @@ -2204,9 +2456,15 @@ checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" [[package]] name = "linux-raw-sys" -version = "0.4.13" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" + +[[package]] +name = "litemap" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" +checksum = "643cb0b8d4fcc284004d5fd0d67ccf61dfffadb7f75e1e71bc420f4688a3a704" [[package]] name = "local-channel" @@ -2227,9 +2485,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", @@ -2237,9 +2495,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.21" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "matchers" @@ -2262,9 +2520,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.7.2" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "mime" @@ -2295,38 +2553,38 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.2" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" +checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" dependencies = [ - "adler", + "adler2", ] [[package]] name = "mio" -version = "0.8.11" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ + "hermit-abi 0.3.9", "libc", "log", "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "mutually_exclusive_features" -version = "0.0.3" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d02c0b00610773bb7fc61d85e13d86c7858cbdf00e1a120bfc41bc055dbaa0e" +checksum = "e94e1e6445d314f972ff7395df2de295fe51b71821694f0b0e1e79c4f12c8577" [[package]] name = "native-tls" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" +checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" dependencies = [ - "lazy_static", "libc", "log", "openssl", @@ -2338,6 +2596,15 @@ dependencies = [ "tempfile", ] +[[package]] +name = "no-std-compat" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b93853da6d84c2e3c7d730d6473e8817692dd89be387eb01b94d7f108ecb5b8c" +dependencies = [ + "spin 0.5.2", +] + [[package]] name = "nom" version = "7.1.3" @@ -2358,17 +2625,36 @@ dependencies = [ "winapi", ] +[[package]] +name = "num-bigint" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" +dependencies = [ + "num-integer", + "num-traits", +] + [[package]] name = "num-conv" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + [[package]] name = "num-traits" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", ] @@ -2379,24 +2665,36 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi", + "hermit-abi 0.3.9", "libc", ] [[package]] name = "object" -version = "0.32.2" +version = "0.36.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" dependencies = [ "memchr", ] +[[package]] +name = "oid-registry" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8d8034d9489cdaf79228eb9f6a3b8d7bb32ba00d6645ebd48eef4077ceb5bd9" +dependencies = [ + "asn1-rs", +] + [[package]] name = "once_cell" -version = "1.19.0" +version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" +dependencies = [ + "portable-atomic", +] [[package]] name = "opaque-debug" @@ -2406,11 +2704,11 @@ checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] name = "openssl" -version = "0.10.64" +version = "0.10.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" +checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "cfg-if", "foreign-types", "libc", @@ -2427,7 +2725,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.87", ] [[package]] @@ -2438,9 +2736,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.102" +version = "0.9.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2" +checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741" dependencies = [ "cc", "libc", @@ -2465,27 +2763,32 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] -name = "p12" -version = "0.6.3" +name = "p12-keystore" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4873306de53fe82e7e484df31e1e947d61514b6ea2ed6cd7b45d63006fd9224" +checksum = "df7b60d0b2dcace322e6e8c4499c4c8bdf331c1bae046a54be5e4191c3610286" dependencies = [ "cbc", - "cipher", + "cms", + "der", "des", - "getrandom 0.2.12", + "hex", "hmac", - "lazy_static", + "pkcs12", + "pkcs5", + "rand 0.8.5", "rc2", "sha1", - "yasna", + "sha2", + "thiserror", + "x509-parser", ] [[package]] name = "parking" -version = "2.2.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" [[package]] name = "parking_lot" @@ -2500,12 +2803,12 @@ dependencies = [ [[package]] name = "parking_lot" -version = "0.12.1" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" dependencies = [ "lock_api", - "parking_lot_core 0.9.9", + "parking_lot_core 0.9.10", ] [[package]] @@ -2524,28 +2827,47 @@ 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 0.4.1", + "redox_syscall 0.5.7", "smallvec", - "windows-targets 0.48.5", + "windows-targets 0.52.6", ] [[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 = "pathdiff" -version = "0.2.1" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d61c5ce1153ab5b689d0c074c4e7fc613e942dfb7dd9eea5ab202d2ad91fe361" + +[[package]] +name = "pbkdf2" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" +dependencies = [ + "digest", + "hmac", +] + +[[package]] +name = "pem-rfc7468" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412" +dependencies = [ + "base64ct", +] [[package]] name = "percent-encoding" @@ -2555,9 +2877,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pest" -version = "2.7.9" +version = "2.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "311fb059dee1a7b802f036316d790138c613a4e8b180c822e3925a662e9f0c95" +checksum = "879952a81a83930934cbf1786752d6dedc3b1f29e8f8fb2ad1d0a36f377cf442" dependencies = [ "memchr", "thiserror", @@ -2566,9 +2888,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.7.9" +version = "2.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f73541b156d32197eecda1a4014d7f868fd2bcb3c550d5386087cfba442bf69c" +checksum = "d214365f632b123a47fd913301e14c946c61d1c183ee245fa76eb752e59a02dd" dependencies = [ "pest", "pest_generator", @@ -2576,22 +2898,22 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.9" +version = "2.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c35eeed0a3fab112f75165fdc026b3913f4183133f19b49be773ac9ea966e8bd" +checksum = "eb55586734301717aea2ac313f50b2eb8f60d2fc3dc01d190eefa2e625f60c4e" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.87", ] [[package]] name = "pest_meta" -version = "2.7.9" +version = "2.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2adbf29bb9776f28caece835398781ab24435585fe0d4dc1374a61db5accedca" +checksum = "b75da2a70cf4d9cb76833c990ac9cd3923c9a8905a8929789ce347c84564d03d" dependencies = [ "once_cell", "pest", @@ -2600,39 +2922,39 @@ dependencies = [ [[package]] name = "petgraph" -version = "0.6.4" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" +checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" dependencies = [ "fixedbitset", - "indexmap 2.2.6", + "indexmap 2.6.0", ] [[package]] name = "pin-project" -version = "1.1.5" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" +checksum = "be57f64e946e500c8ee36ef6331845d40a93055567ec57e8fae13efd33759b95" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.5" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" +checksum = "3c0f5fad0874fc7abcd4d750e76917eaebbecaa2c20bde22e1dbeeba8beb758c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.87", ] [[package]] name = "pin-project-lite" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" [[package]] name = "pin-utils" @@ -2644,30 +2966,60 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" name = "pinky-swear" version = "6.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6cfae3ead413ca051a681152bd266438d3bfa301c9bdf836939a14c721bb2a21" +checksum = "6cfae3ead413ca051a681152bd266438d3bfa301c9bdf836939a14c721bb2a21" +dependencies = [ + "doc-comment", + "flume", + "parking_lot 0.12.3", + "tracing", +] + +[[package]] +name = "piper" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96c8c490f422ef9a4efd2cb5b42b76c8613d7e7dfc1caf667b8a3350a5acc066" +dependencies = [ + "atomic-waker", + "fastrand 2.2.0", + "futures-io", +] + +[[package]] +name = "pkcs12" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "695b3df3d3cc1015f12d70235e35b6b79befc5fa7a9b95b951eab1dd07c9efc2" dependencies = [ - "doc-comment", - "flume 0.11.0", - "parking_lot 0.12.1", - "tracing", + "cms", + "const-oid", + "der", + "digest", + "spki", + "x509-cert", + "zeroize", ] [[package]] -name = "piper" -version = "0.2.1" +name = "pkcs5" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "668d31b1c4eba19242f2088b2bf3316b82ca31082a8335764db4e083db7485d4" +checksum = "e847e2c91a18bfa887dd028ec33f2fe6f25db77db3619024764914affe8b69a6" dependencies = [ - "atomic-waker", - "fastrand 2.0.2", - "futures-io", + "aes", + "cbc", + "der", + "pbkdf2", + "scrypt", + "sha2", + "spki", ] [[package]] name = "pkg-config" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" +checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" [[package]] name = "polling" @@ -2687,17 +3039,17 @@ dependencies = [ [[package]] name = "polling" -version = "3.6.0" +version = "3.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0c976a60b2d7e99d6f229e414670a9b85d13ac305cc6d1e9c134de58c5aaaf6" +checksum = "a604568c3202727d1507653cb121dbd627a58684eb09a820fd746bee38b4442f" dependencies = [ "cfg-if", "concurrent-queue", - "hermit-abi", + "hermit-abi 0.4.0", "pin-project-lite", - "rustix 0.38.32", + "rustix 0.38.40", "tracing", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -2712,6 +3064,12 @@ dependencies = [ "universal-hash", ] +[[package]] +name = "portable-atomic" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc9c68a3f6da06753e9335d63e27f6b9754dd1920d941135b7ea8224f141adb2" + [[package]] name = "powerfmt" version = "0.2.0" @@ -2720,9 +3078,12 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" -version = "0.2.17" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] [[package]] name = "proc-macro-error" @@ -2750,9 +3111,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.79" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" +checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" dependencies = [ "unicode-ident", ] @@ -2763,16 +3124,16 @@ version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57206b407293d2bcd3af849ce869d52068623f19e1b5ff8e8778e3309439682b" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "memchr", "unicase", ] [[package]] name = "quote" -version = "1.0.35" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -2836,7 +3197,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.12", + "getrandom 0.2.15", ] [[package]] @@ -2870,9 +3231,9 @@ dependencies = [ [[package]] name = "redis" -version = "0.25.2" +version = "0.25.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71d64e978fd98a0e6b105d066ba4889a7301fca65aeac850a877d8797343feeb" +checksum = "e0d7a6955c7511f60f3ba9e86c6d02b3c3f144f8c24b288d1f4e18074ab8bbec" dependencies = [ "async-trait", "bytes", @@ -2883,7 +3244,7 @@ dependencies = [ "pin-project-lite", "ryu", "sha1_smol", - "socket2 0.5.6", + "socket2 0.5.7", "tokio", "tokio-util", "url", @@ -2900,34 +3261,34 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.4.1" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", ] [[package]] name = "redox_users" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" +checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" dependencies = [ - "getrandom 0.2.12", + "getrandom 0.2.15", "libredox", "thiserror", ] [[package]] name = "regex" -version = "1.10.4" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.6", - "regex-syntax 0.8.3", + "regex-automata 0.4.9", + "regex-syntax 0.8.5", ] [[package]] @@ -2941,15 +3302,21 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.6" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.3", + "regex-syntax 0.8.5", ] +[[package]] +name = "regex-lite" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53a49587ad06b26609c52e423de037e7f57f20d53535d66e08c695f347df952a" + [[package]] name = "regex-syntax" version = "0.6.29" @@ -2958,9 +3325,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.8.3" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "reqwest" @@ -2986,7 +3353,7 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls-pemfile", + "rustls-pemfile 1.0.4", "serde", "serde_json", "serde_urlencoded", @@ -3010,13 +3377,14 @@ checksum = "4389f1d5789befaf6029ebd9f7dac4af7f7e3d61b69d4f30e2ac02b57e7712b0" [[package]] name = "rhai" -version = "1.17.1" +version = "1.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6273372244d04a8a4b0bec080ea1e710403e88c5d9d83f9808b2bfa64f0982a" +checksum = "8867cfc57aaf2320b60ec0f4d55603ac950ce852e6ab6b9109aa3d626a4dd7ea" dependencies = [ "ahash 0.8.11", - "bitflags 2.5.0", + "bitflags 2.6.0", "instant", + "no-std-compat", "num-traits", "once_cell", "rhai_codegen", @@ -3028,13 +3396,13 @@ dependencies = [ [[package]] name = "rhai_codegen" -version = "2.0.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9db7f8dc4c9d48183a17ce550574c42995252b82d267eaca3fcd1b979159856c" +checksum = "a5a11a05ee1ce44058fa3d5961d05194fdbe3ad6b40f904af764d81b86450e6b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.87", ] [[package]] @@ -3060,23 +3428,13 @@ checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", "cfg-if", - "getrandom 0.2.12", + "getrandom 0.2.15", "libc", "spin 0.9.8", "untrusted 0.9.0", "windows-sys 0.52.0", ] -[[package]] -name = "ritelinked" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98f2771d255fd99f0294f13249fecd0cae6e074f86b4197ec1f1689d537b44d3" -dependencies = [ - "ahash 0.7.8", - "hashbrown 0.11.2", -] - [[package]] name = "ron" version = "0.7.1" @@ -3100,19 +3458,28 @@ 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" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ "semver", ] +[[package]] +name = "rusticata-macros" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "faf0c4a6ece9950b9abdb62b1cfcf2a68b3b67a10ba445b3bb85be2a293d0632" +dependencies = [ + "nom", +] + [[package]] name = "rustix" version = "0.37.27" @@ -3129,14 +3496,14 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.32" +version = "0.38.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65e04861e65f21776e67888bfbea442b3642beaa0138fdb1dd7a84a52dffdb89" +checksum = "99e4ea3e1cdc4b559b8e5650f9c8e5998e3e5c1343b4eaf034565f32318d63c0" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "errno", "libc", - "linux-raw-sys 0.4.13", + "linux-raw-sys 0.4.14", "windows-sys 0.52.0", ] @@ -3154,36 +3521,40 @@ dependencies = [ [[package]] name = "rustls" -version = "0.21.10" +version = "0.23.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" +checksum = "eee87ff5d9b36712a58574e12e9f0ea80f915a5b0ac518d322b24a465617925e" dependencies = [ - "log", + "once_cell", "ring 0.17.8", + "rustls-pki-types", "rustls-webpki", - "sct", + "subtle", + "zeroize", ] [[package]] name = "rustls-connector" -version = "0.18.5" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25da151615461c7347114b1ad1a7458b4cdebc69cb220cd140cd5cb324b1dd37" +checksum = "2a980454b497c439c274f2feae2523ed8138bbd3d323684e1435fec62f800481" dependencies = [ "log", - "rustls 0.21.10", + "rustls 0.23.16", "rustls-native-certs", + "rustls-pki-types", "rustls-webpki", ] [[package]] name = "rustls-native-certs" -version = "0.6.3" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" +checksum = "e5bfb394eeed242e909609f56089eecfe5fda225042e8b171791b9c95f5931e5" dependencies = [ "openssl-probe", - "rustls-pemfile", + "rustls-pemfile 2.2.0", + "rustls-pki-types", "schannel", "security-framework", ] @@ -3197,27 +3568,52 @@ dependencies = [ "base64 0.21.7", ] +[[package]] +name = "rustls-pemfile" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "rustls-pki-types" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b" + [[package]] name = "rustls-webpki" -version = "0.101.7" +version = "0.102.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" dependencies = [ "ring 0.17.8", + "rustls-pki-types", "untrusted 0.9.0", ] [[package]] name = "rustversion" -version = "1.0.14" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" +checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" [[package]] name = "ryu" -version = "1.0.17" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" + +[[package]] +name = "salsa20" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" +checksum = "97a22f5af31f73a954c10289c93e8a50cc23d971e80ee446f1f6f7137a088213" +dependencies = [ + "cipher", +] [[package]] name = "same-file" @@ -3230,11 +3626,11 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.23" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +checksum = "01227be5826fa0690321a2ba6c5cd57a19cf3f6a09e76973b58e61de6ab9d1c1" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -3243,6 +3639,17 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" +[[package]] +name = "scrypt" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0516a385866c09368f0b5bcd1caff3366aace790fcd46e2bb032697bb172fd1f" +dependencies = [ + "pbkdf2", + "salsa20", + "sha2", +] + [[package]] name = "sct" version = "0.7.1" @@ -3255,11 +3662,11 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.10.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "770452e37cad93e0a50d5abc3990d2bc351c36d0328f86cefec2f2fb206eaef6" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", "core-foundation", "core-foundation-sys", "libc", @@ -3268,9 +3675,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.10.0" +version = "2.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41f3cc463c0ef97e11c3461a9d3787412d30e8e7eb907c79180c4a57bf7c04ef" +checksum = "fa39c7303dc58b5543c94d22c1766b0d31f2ee58306363ea622b10bbc075eaa2" dependencies = [ "core-foundation-sys", "libc", @@ -3278,40 +3685,41 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.22" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" dependencies = [ "serde", ] [[package]] name = "serde" -version = "1.0.197" +version = "1.0.215" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" +checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.197" +version = "1.0.215" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" +checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.87", ] [[package]] name = "serde_json" -version = "1.0.115" +version = "1.0.132" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12dc5c46daa8e9fdf4f5e71b6cf9a53f2487da0e86e55808e2d35539666497dd" +checksum = "d726bfaff4b320266d395898905d0eba0345aae23b54aee3a737e260fd46db03" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] @@ -3355,7 +3763,7 @@ version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70c0e00fab6460447391a1981c21341746bc2d0178a7c46a3bbf667f450ac6e4" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.6.0", "itertools", "num-traits", "once_cell", @@ -3380,7 +3788,7 @@ dependencies = [ "proc-macro2", "quote", "strsim 0.11.1", - "syn 2.0.58", + "syn 2.0.87", ] [[package]] @@ -3399,7 +3807,7 @@ version = "0.9.34+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.6.0", "itoa", "ryu", "serde", @@ -3419,9 +3827,9 @@ dependencies = [ [[package]] name = "sha1_smol" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012" +checksum = "bbfa15b3dddfee50a0fff136974b3e1bde555604ba463834a7eb7deb6417705d" [[package]] name = "sha2" @@ -3443,11 +3851,17 @@ dependencies = [ "lazy_static", ] +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[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", ] @@ -3504,7 +3918,7 @@ dependencies = [ "slog", "term", "thread_local", - "time 0.3.34", + "time 0.3.36", ] [[package]] @@ -3540,9 +3954,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.5.6" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05ffd9c0a93b7543e062e759284fcf5f5e3b098501104bfbdde4d404db792871" +checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" dependencies = [ "libc", "windows-sys 0.52.0", @@ -3563,13 +3977,22 @@ dependencies = [ "lock_api", ] +[[package]] +name = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der", +] + [[package]] name = "sqlformat" -version = "0.2.3" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce81b7bd7c4493975347ef60d8c7e8b742d4694f4c49f93e0a12ea263938176c" +checksum = "7bba3a93db0cc4f7bdece8bb09e77e2e785c20bfebf79eb8340ed80708048790" dependencies = [ - "itertools", "nom", "unicode_categories", ] @@ -3586,25 +4009,25 @@ dependencies = [ [[package]] name = "sqlx" -version = "0.7.4" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9a2ccff1a000a5a59cd33da541d9f2fdcd9e6e8229cc200565942bff36d0aaa" +checksum = "93334716a037193fac19df402f8571269c84a00852f6a7066b5d2616dcd64d3e" dependencies = [ - "sqlx-core 0.7.4", - "sqlx-macros 0.7.4", + "sqlx-core 0.8.2", + "sqlx-macros 0.8.2", "sqlx-postgres", ] [[package]] name = "sqlx-adapter" -version = "1.2.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3751ab2b1b81c2d78c513ed9ce99c0933da0b6cc1ea93707941d8e9bba34bfee" +checksum = "446099e7e4da3573bb0039b18354460eb7a38b5a2cb3568cf96c37fdbc569de0" dependencies = [ "async-trait", "casbin", - "dotenv", - "sqlx 0.7.4", + "dotenvy", + "sqlx 0.8.2", ] [[package]] @@ -3630,7 +4053,7 @@ dependencies = [ "futures-core", "futures-intrusive 0.4.2", "futures-util", - "hashlink", + "hashlink 0.8.4", "hex", "hkdf", "hmac", @@ -3645,7 +4068,7 @@ dependencies = [ "percent-encoding", "rand 0.8.5", "rustls 0.20.9", - "rustls-pemfile", + "rustls-pemfile 1.0.4", "serde", "serde_json", "sha1", @@ -3664,26 +4087,26 @@ dependencies = [ [[package]] name = "sqlx-core" -version = "0.7.4" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24ba59a9342a3d9bab6c56c118be528b27c9b60e490080e9711a04dccac83ef6" +checksum = "d4d8060b456358185f7d50c55d9b5066ad956956fddec42ee2e8567134a8936e" dependencies = [ - "ahash 0.8.11", "atoi 2.0.0", "byteorder", "bytes", "crc", "crossbeam-queue", "either", - "event-listener 2.5.3", + "event-listener 5.3.1", "futures-channel", "futures-core", "futures-intrusive 0.5.0", "futures-io", "futures-util", - "hashlink", + "hashbrown 0.14.5", + "hashlink 0.9.1", "hex", - "indexmap 2.2.6", + "indexmap 2.6.0", "log", "memchr", "native-tls", @@ -3726,26 +4149,26 @@ dependencies = [ [[package]] name = "sqlx-macros" -version = "0.7.4" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ea40e2345eb2faa9e1e5e326db8c34711317d2b5e08d0d5741619048a803127" +checksum = "cac0692bcc9de3b073e8d747391827297e075c7710ff6276d9f7a1f3d58c6657" dependencies = [ "proc-macro2", "quote", - "sqlx-core 0.7.4", + "sqlx-core 0.8.2", "sqlx-macros-core", - "syn 1.0.109", + "syn 2.0.87", ] [[package]] name = "sqlx-macros-core" -version = "0.7.4" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5833ef53aaa16d860e92123292f1f6a3d53c34ba8b1969f152ef1a7bb803f3c8" +checksum = "1804e8a7c7865599c9c79be146dc8a9fd8cc86935fa641d3ea58e5f0688abaa5" dependencies = [ "dotenvy", "either", - "heck 0.4.1", + "heck 0.5.0", "hex", "once_cell", "proc-macro2", @@ -3753,9 +4176,9 @@ dependencies = [ "serde", "serde_json", "sha2", - "sqlx-core 0.7.4", + "sqlx-core 0.8.2", "sqlx-postgres", - "syn 1.0.109", + "syn 2.0.87", "tempfile", "tokio", "url", @@ -3763,13 +4186,13 @@ dependencies = [ [[package]] name = "sqlx-postgres" -version = "0.7.4" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c824eb80b894f926f89a0b9da0c7f435d27cdd35b8c655b114e58223918577e" +checksum = "6fa91a732d854c5d7726349bb4bb879bb9478993ceb764247660aee25f67c2f8" dependencies = [ "atoi 2.0.0", - "base64 0.21.7", - "bitflags 2.5.0", + "base64 0.22.1", + "bitflags 2.6.0", "byteorder", "crc", "dotenvy", @@ -3792,7 +4215,7 @@ dependencies = [ "serde_json", "sha2", "smallvec", - "sqlx-core 0.7.4", + "sqlx-core 0.8.2", "stringprep", "thiserror", "tracing", @@ -3810,6 +4233,12 @@ dependencies = [ "tokio-rustls", ] +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + [[package]] name = "stacker" version = "0.1.0" @@ -3819,8 +4248,8 @@ dependencies = [ "actix-http", "actix-web", "aes-gcm", - "base64 0.22.0", - "brotli", + "base64 0.22.1", + "brotli 3.5.0", "casbin", "chrono", "clap", @@ -3829,11 +4258,11 @@ dependencies = [ "derive_builder 0.12.0", "docker-compose-types", "futures", - "futures-lite 2.3.0", + "futures-lite 2.5.0", "futures-util", "glob", "hmac", - "indexmap 2.2.6", + "indexmap 2.6.0", "lapin", "rand 0.8.5", "redis", @@ -3868,13 +4297,13 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "stringprep" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb41d74e231a107a1b4ee36bd1214b11285b77768d2e3824aedafa988fd36ee6" +checksum = "7b4df3d392d81bd458a8a621b8bffbd2302a12ffe288a9d931670948749463b1" dependencies = [ - "finl_unicode", "unicode-bidi", "unicode-normalization", + "unicode-properties", ] [[package]] @@ -3891,9 +4320,9 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "subtle" -version = "2.5.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" @@ -3908,9 +4337,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.58" +version = "2.0.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44cfb93f38070beee36b3fef7d4f5a16f27751d94b187b666a5cc5e9b0d30687" +checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d" dependencies = [ "proc-macro2", "quote", @@ -3923,6 +4352,17 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" +[[package]] +name = "synstructure" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + [[package]] name = "system-configuration" version = "0.5.1" @@ -3958,26 +4398,27 @@ checksum = "f764005d11ee5f36500a149ace24e00e3da98b0158b3e2d53a7495660d3f4d60" [[package]] name = "tcp-stream" -version = "0.26.1" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4da30af7998f51ee1aa48ab24276fe303a697b004e31ff542b192c088d5630a5" +checksum = "495b0abdce3dc1f8fd27240651c9e68890c14e9d9c61527b1ce44d8a5a7bd3d5" dependencies = [ "cfg-if", - "p12", + "p12-keystore", "rustls-connector", - "rustls-pemfile", + "rustls-pemfile 2.2.0", ] [[package]] name = "tempfile" -version = "3.10.1" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c" dependencies = [ "cfg-if", - "fastrand 2.0.2", - "rustix 0.38.32", - "windows-sys 0.52.0", + "fastrand 2.2.0", + "once_cell", + "rustix 0.38.40", + "windows-sys 0.59.0", ] [[package]] @@ -4002,22 +4443,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.58" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.58" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.87", ] [[package]] @@ -4043,9 +4484,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.34" +version = "0.3.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" dependencies = [ "deranged", "itoa", @@ -4064,9 +4505,9 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.17" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" dependencies = [ "num-conv", "time-core", @@ -4081,11 +4522,21 @@ dependencies = [ "crunchy", ] +[[package]] +name = "tinystr" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +dependencies = [ + "displaydoc", + "zerovec", +] + [[package]] name = "tinyvec" -version = "1.6.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" dependencies = [ "tinyvec_macros", ] @@ -4098,28 +4549,27 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.37.0" +version = "1.41.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" +checksum = "22cfb5bee7a6a52939ca9224d6ac897bb669134078daa8735560897f69de4d33" dependencies = [ "backtrace", "bytes", "libc", "mio", - "num_cpus", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "pin-project-lite", "signal-hook-registry", - "socket2 0.5.6", + "socket2 0.5.7", "tokio-macros", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "tokio-executor-trait" -version = "2.1.1" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "802ccf58e108fe16561f35348fabe15ff38218968f033d587e399a84937533cc" +checksum = "96a1593beae7759f592e1100c5997fe9e9ebf4b5968062f1fbcd807989cd1b79" dependencies = [ "async-trait", "executor-trait", @@ -4128,13 +4578,13 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.2.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.87", ] [[package]] @@ -4160,9 +4610,9 @@ dependencies = [ [[package]] name = "tokio-stream" -version = "0.1.15" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" +checksum = "4f4e6ce100d0eb49a2734f8c0812bcd324cf357d21810932c5df6b96ef2b86f1" dependencies = [ "futures-core", "pin-project-lite", @@ -4171,16 +4621,15 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.10" +version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" +checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" dependencies = [ "bytes", "futures-core", "futures-sink", "pin-project-lite", "tokio", - "tracing", ] [[package]] @@ -4194,9 +4643,9 @@ dependencies = [ [[package]] name = "tower-service" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" @@ -4212,9 +4661,9 @@ dependencies = [ [[package]] name = "tracing-actix-web" -version = "0.7.10" +version = "0.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa069bd1503dd526ee793bb3fce408895136c95fc86d2edb2acf1c646d7f0684" +checksum = "6b87073920bcce23e9f5cb0d2671e9f01d6803bb5229c159b2f5ce6806d73ffc" dependencies = [ "actix-web", "mutually_exclusive_features", @@ -4231,7 +4680,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.87", ] [[package]] @@ -4245,7 +4694,7 @@ dependencies = [ "log", "serde", "serde_json", - "time 0.3.34", + "time 0.3.36", "tracing", "tracing-core", "tracing-log 0.1.4", @@ -4304,9 +4753,9 @@ dependencies = [ [[package]] name = "triomphe" -version = "0.1.11" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "859eb650cfee7434994602c3a68b25d77ad9e68c8a6cd491616ef86661382eb3" +checksum = "ef8f7726da4807b58ea5c96fdc122f80702030edc33b35aff9190a51148ccc85" [[package]] name = "try-lock" @@ -4322,45 +4771,48 @@ checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "ucd-trie" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" +checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" [[package]] name = "unicase" -version = "2.7.0" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" -dependencies = [ - "version_check", -] +checksum = "7e51b68083f157f853b6379db119d1c1be0e6e4dec98101079dec41f6f5cf6df" [[package]] name = "unicode-bidi" -version = "0.3.15" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" +checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" [[package]] name = "unicode-normalization" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" dependencies = [ "tinyvec", ] +[[package]] +name = "unicode-properties" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e70f2a8b45122e719eb623c01822704c4e0907e7e426a05927e1a1cfff5b75d0" + [[package]] name = "unicode-segmentation" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" [[package]] name = "unicode_categories" @@ -4398,9 +4850,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.0" +version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +checksum = "8d157f1b96d14500ffdc1f10ba712e780825526c03d9a49b4d0324b0d9113ada" dependencies = [ "form_urlencoded", "idna", @@ -4408,19 +4860,31 @@ dependencies = [ "serde", ] +[[package]] +name = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + [[package]] name = "utf8parse" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.8.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a183cf7feeba97b4dd1c0d46788634f6221d87fa961b305bed08c851829efcc0" +checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" dependencies = [ - "getrandom 0.2.12", + "getrandom 0.2.15", "serde", ] @@ -4438,15 +4902,15 @@ checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] name = "version_check" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "waker-fn" -version = "1.1.1" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3c4517f54858c779bbcbf228f4fca63d121bf85fbecb2dc578cdf4a39395690" +checksum = "317211a0dc0ceedd78fb2ca9a44aed3d7b9b26f81870d485c07122b4350673b7" [[package]] name = "walkdir" @@ -4493,34 +4957,35 @@ checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b" [[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.87", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.42" +version = "0.4.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +checksum = "cc7ec4f8827a71586374db3e87abdb5a2bb3a15afed140221307c3ec06b1f63b" dependencies = [ "cfg-if", "js-sys", @@ -4530,9 +4995,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -4540,28 +5005,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.87", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" [[package]] name = "web-sys" -version = "0.3.69" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +checksum = "f6488b90108c040df0fe62fa815cbdee25124641df01814dd7282749234c6112" dependencies = [ "js-sys", "wasm-bindgen", @@ -4588,11 +5053,11 @@ dependencies = [ [[package]] name = "whoami" -version = "1.5.1" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44ab49fad634e88f55bf8f9bb3abd2f27d7204172a112c7c9987e01c1c94ea9" +checksum = "372d5b87f58ec45c384ba03563b03544dc5fadc3983e434b286913f5b4a9bb6d" dependencies = [ - "redox_syscall 0.4.1", + "redox_syscall 0.5.7", "wasite", "web-sys", ] @@ -4615,11 +5080,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.6" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "winapi", + "windows-sys 0.59.0", ] [[package]] @@ -4634,7 +5099,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.4", + "windows-targets 0.52.6", ] [[package]] @@ -4652,7 +5117,16 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.4", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", ] [[package]] @@ -4672,17 +5146,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dd37b7e5ab9018759f893a1952c9420d060016fc19a472b4bb20d1bdd694d1b" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.4", - "windows_aarch64_msvc 0.52.4", - "windows_i686_gnu 0.52.4", - "windows_i686_msvc 0.52.4", - "windows_x86_64_gnu 0.52.4", - "windows_x86_64_gnullvm 0.52.4", - "windows_x86_64_msvc 0.52.4", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] [[package]] @@ -4693,9 +5168,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcf46cf4c365c6f2d1cc93ce535f2c8b244591df96ceee75d8e83deb70a9cac9" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" @@ -4705,9 +5180,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da9f259dd3bcf6990b55bffd094c4f7235817ba4ceebde8e6d11cd0c5633b675" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" @@ -4717,9 +5192,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.4" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b474d8268f99e0995f25b9f095bc7434632601028cf86590aea5c8a5cb7801d3" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" @@ -4729,9 +5210,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1515e9a29e5bed743cb4415a9ecf5dfca648ce85ee42e15873c3cd8610ff8e02" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" @@ -4741,9 +5222,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5eee091590e89cc02ad514ffe3ead9eb6b660aedca2183455434b93546371a03" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" @@ -4753,9 +5234,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77ca79f2451b49fa9e2af39f0747fe999fcda4f5e241b2898624dca97a1f2177" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" @@ -4765,9 +5246,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winreg" @@ -4801,6 +5282,46 @@ dependencies = [ "tokio", ] +[[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" + +[[package]] +name = "x509-cert" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1301e935010a701ae5f8655edc0ad17c44bad3ac5ce8c39185f75453b720ae94" +dependencies = [ + "const-oid", + "der", + "spki", +] + +[[package]] +name = "x509-parser" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcbc162f30700d6f3f82a24bf7cc62ffe7caea42c0b2cba8bf7f3ae50cf51f69" +dependencies = [ + "asn1-rs", + "data-encoding", + "der-parser", + "lazy_static", + "nom", + "oid-registry", + "rusticata-macros", + "thiserror", + "time 0.3.36", +] + [[package]] name = "yaml-rust" version = "0.4.5" @@ -4811,54 +5332,122 @@ dependencies = [ ] [[package]] -name = "yasna" -version = "0.5.2" +name = "yoke" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c5b1314b079b0930c31e3af543d8ee1757b1951ae1e1565ec704403a7240ca5" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e17bb3549cc1321ae1296b9cdc2698e2b6cb1992adfa19a8c72e5b7a738f44cd" +checksum = "28cc31741b18cb6f1d5ff12f5b7523e3d6eb0852bbbad19d73905511d9849b95" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", + "synstructure", +] [[package]] name = "zerocopy" -version = "0.7.32" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ + "byteorder", "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.32" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.87", +] + +[[package]] +name = "zerofrom" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ec111ce797d0e0784a1116d0ddcdbea84322cd79e5d5ad173daeba4f93ab55" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ea7b4a3637ea8669cedf0f1fd5c286a17f3de97b8dd5a70a6c167a1730e63a5" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", + "synstructure", +] + +[[package]] +name = "zeroize" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" + +[[package]] +name = "zerovec" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", ] [[package]] name = "zstd" -version = "0.13.1" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d789b1514203a1120ad2429eae43a7bd32b90976a7bb8a05f7ec02fa88cc23a" +checksum = "fcf2b778a664581e31e389454a7072dab1647606d44f7feea22cd5abb9c9f3f9" dependencies = [ "zstd-safe", ] [[package]] name = "zstd-safe" -version = "7.1.0" +version = "7.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd99b45c6bc03a018c8b8a86025678c87e55526064e38f9df301989dce7ec0a" +checksum = "54a3ab4db68cea366acc5c897c7b4d4d1b8994a9cd6e6f841f8964566a419059" dependencies = [ "zstd-sys", ] [[package]] name = "zstd-sys" -version = "2.0.10+zstd.1.5.6" +version = "2.0.13+zstd.1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c253a4914af5bafc8fa8c86ee400827e83cf6ec01195ec1f1ed8441bf00d65aa" +checksum = "38ff0f21cfee8f97d94cef41359e0c89aa6113028ab0291aa8ca0038995a95aa" dependencies = [ "cc", "pkg-config", diff --git a/DEVELOPERS.md b/DEVELOPERS.md new file mode 100644 index 0000000..9cb6c9d --- /dev/null +++ b/DEVELOPERS.md @@ -0,0 +1,4 @@ +Important + +When implement new endpoints do not forget to add the casbin rules (ACL) +Recreate database container to apply all databases changes \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 3523dd3..32486d2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,6 +30,7 @@ COPY ./src ./src #RUN ls -la /app/ >&2 #RUN sqlx migrate run #RUN cargo sqlx prepare -- --bin stacker +ENV SQLX_OFFLINE true RUN apt-get update && apt-get install --no-install-recommends -y libssl-dev; \ cargo build --bin=console --features="explain" && cargo build --release --features="explain" diff --git a/migrations/20240709162041_add_server_ip_ssh_user_port.down.sql b/migrations/20240709162041_add_server_ip_ssh_user_port.down.sql new file mode 100644 index 0000000..7b64145 --- /dev/null +++ b/migrations/20240709162041_add_server_ip_ssh_user_port.down.sql @@ -0,0 +1,5 @@ + -- Add up migration script here + + ALTER table server DROP COLUMN srv_ip; + ALTER table server DROP COLUMN ssh_user; + ALTER table server DROP COLUMN ssh_port; diff --git a/migrations/20240709162041_add_server_ip_ssh_user_port.up.sql b/migrations/20240709162041_add_server_ip_ssh_user_port.up.sql new file mode 100644 index 0000000..38cfc7d --- /dev/null +++ b/migrations/20240709162041_add_server_ip_ssh_user_port.up.sql @@ -0,0 +1,5 @@ +-- Add up migration script here + +ALTER table server ADD COLUMN srv_ip VARCHAR(50) DEFAULT NULL; +ALTER table server ADD COLUMN ssh_user VARCHAR(50) DEFAULT NULL; +ALTER table server ADD COLUMN ssh_port INT DEFAULT NULL; diff --git a/migrations/20240711134750_server_nullable_fields.down.sql b/migrations/20240711134750_server_nullable_fields.down.sql new file mode 100644 index 0000000..e8d6c4f --- /dev/null +++ b/migrations/20240711134750_server_nullable_fields.down.sql @@ -0,0 +1,6 @@ +-- Add down migration script here + +ALTER TABLE server ALTER COLUMN region SET NOT NULL; +ALTER TABLE server ALTER COLUMN server SET NOT NULL; +ALTER TABLE server ALTER COLUMN zone SET NOT NULL; +ALTER TABLE server ALTER COLUMN os SET NOT NULL; diff --git a/migrations/20240711134750_server_nullable_fields.up.sql b/migrations/20240711134750_server_nullable_fields.up.sql new file mode 100644 index 0000000..95931fe --- /dev/null +++ b/migrations/20240711134750_server_nullable_fields.up.sql @@ -0,0 +1,6 @@ +-- Add up migration script here + +ALTER TABLE server ALTER COLUMN region DROP NOT NULL; +ALTER TABLE server ALTER COLUMN server DROP NOT NULL; +ALTER TABLE server ALTER COLUMN zone DROP NOT NULL; +ALTER TABLE server ALTER COLUMN os DROP NOT NULL; diff --git a/migrations/20240716114826_agreement_tables.down.sql b/migrations/20240716114826_agreement_tables.down.sql new file mode 100644 index 0000000..847a983 --- /dev/null +++ b/migrations/20240716114826_agreement_tables.down.sql @@ -0,0 +1,8 @@ +-- Add down migration script here + +-- Add up migration script here + +DROP INDEX idx_agreement_name; +CREATE INDEX idx_user_agreement_user_id; +DROP TABLE agreement; +DROP TABLE user_agreement; \ No newline at end of file diff --git a/migrations/20240716114826_agreement_tables.up.sql b/migrations/20240716114826_agreement_tables.up.sql new file mode 100644 index 0000000..7b8b0aa --- /dev/null +++ b/migrations/20240716114826_agreement_tables.up.sql @@ -0,0 +1,24 @@ +-- Add up migration script here + +CREATE TABLE agreement ( + id serial4 NOT NULL, + name VARCHAR(255) NOT NULL, + text TEXT NOT NULL, + created_at timestamptz NOT NULL, + updated_at timestamptz NOT NULL, + CONSTRAINT agreement_pkey PRIMARY KEY (id) +); + +CREATE INDEX idx_agreement_name ON agreement(name); + +CREATE TABLE user_agreement ( + id serial4 NOT NULL, + agrt_id integer NOT NULL, + user_id VARCHAR(50) NOT NULL, + created_at timestamptz NOT NULL, + updated_at timestamptz NOT NULL, + CONSTRAINT user_agreement_pkey PRIMARY KEY (id), + CONSTRAINT fk_agreement FOREIGN KEY(agrt_id) REFERENCES agreement(id) +); + +CREATE INDEX idx_user_agreement_user_id ON user_agreement(user_id); \ No newline at end of file diff --git a/migrations/20240717070823_agreement_casbin_rules.down.sql b/migrations/20240717070823_agreement_casbin_rules.down.sql new file mode 100644 index 0000000..12d9b50 --- /dev/null +++ b/migrations/20240717070823_agreement_casbin_rules.down.sql @@ -0,0 +1,3 @@ +-- Add down migration script here + +DELETE FROM public.casbin_rule where id IN (49,50,51,52,53,54,55,56,57,58); \ No newline at end of file diff --git a/migrations/20240717070823_agreement_casbin_rules.up.sql b/migrations/20240717070823_agreement_casbin_rules.up.sql new file mode 100644 index 0000000..b23221c --- /dev/null +++ b/migrations/20240717070823_agreement_casbin_rules.up.sql @@ -0,0 +1,12 @@ +-- Add up migration script here + +INSERT INTO public.casbin_rule (id, ptype, v0, v1, v2, v3, v4, v5) VALUES (49, 'p', 'group_user', '/agreement', 'GET', '', '', ''); +INSERT INTO public.casbin_rule (id, ptype, v0, v1, v2, v3, v4, v5) VALUES (50, 'p', 'group_user', '/agreement/:id', 'GET', '', '', ''); +INSERT INTO public.casbin_rule (id, ptype, v0, v1, v2, v3, v4, v5) VALUES (51, 'p', 'group_admin', '/agreement', 'GET', '', '', ''); +INSERT INTO public.casbin_rule (id, ptype, v0, v1, v2, v3, v4, v5) VALUES (52, 'p', 'group_admin', '/agreement/:id', 'GET', '', '', ''); +INSERT INTO public.casbin_rule (id, ptype, v0, v1, v2, v3, v4, v5) VALUES (53, 'p', 'group_admin', '/admin/agreement', 'POST', '', '', ''); +INSERT INTO public.casbin_rule (id, ptype, v0, v1, v2, v3, v4, v5) VALUES (54, 'p', 'group_admin', '/admin/agreement/:id', 'GET', '', '', ''); +INSERT INTO public.casbin_rule (id, ptype, v0, v1, v2, v3, v4, v5) VALUES (55, 'p', 'group_admin', '/admin/agreement/:id', 'POST', '', '', ''); +INSERT INTO public.casbin_rule (id, ptype, v0, v1, v2, v3, v4, v5) VALUES (56, 'p', 'group_admin', '/admin/agreement/:id', 'PUT', '', '', ''); +INSERT INTO public.casbin_rule (id, ptype, v0, v1, v2, v3, v4, v5) VALUES (57, 'p', 'group_admin', '/admin/agreement/:id', 'DELETE', '', '', ''); +INSERT INTO public.casbin_rule (id, ptype, v0, v1, v2, v3, v4, v5) VALUES (58, 'p', 'group_user', '/agreement', 'POST', '', '', ''); diff --git a/migrations/20240717100131_agreement_created_updated_default_now.down.sql b/migrations/20240717100131_agreement_created_updated_default_now.down.sql new file mode 100644 index 0000000..d2f607c --- /dev/null +++ b/migrations/20240717100131_agreement_created_updated_default_now.down.sql @@ -0,0 +1 @@ +-- Add down migration script here diff --git a/migrations/20240717100131_agreement_created_updated_default_now.up.sql b/migrations/20240717100131_agreement_created_updated_default_now.up.sql new file mode 100644 index 0000000..a259ed6 --- /dev/null +++ b/migrations/20240717100131_agreement_created_updated_default_now.up.sql @@ -0,0 +1,6 @@ +-- Add up migration script here +ALTER TABLE public.agreement ALTER COLUMN created_at SET NOT NULL; +ALTER TABLE public.agreement ALTER COLUMN created_at SET DEFAULT NOW(); + +ALTER TABLE public.agreement ALTER COLUMN updated_at SET NOT NULL; +ALTER TABLE public.agreement ALTER COLUMN updated_at SET DEFAULT NOW(); diff --git a/migrations/20240718082702_agreement_accepted.down.sql b/migrations/20240718082702_agreement_accepted.down.sql new file mode 100644 index 0000000..fd2397e --- /dev/null +++ b/migrations/20240718082702_agreement_accepted.down.sql @@ -0,0 +1,2 @@ +-- Add down migration script here +DELETE FROM public.casbin_rule where id IN (59); diff --git a/migrations/20240718082702_agreement_accepted.up.sql b/migrations/20240718082702_agreement_accepted.up.sql new file mode 100644 index 0000000..4823d2b --- /dev/null +++ b/migrations/20240718082702_agreement_accepted.up.sql @@ -0,0 +1,2 @@ +-- Add up migration script here +INSERT INTO public.casbin_rule (id, ptype, v0, v1, v2, v3, v4, v5) VALUES (59, 'p', 'group_user', '/agreement/accepted/:id', 'GET', '', '', ''); \ No newline at end of file diff --git a/src/db/agreement.rs b/src/db/agreement.rs new file mode 100644 index 0000000..8baae75 --- /dev/null +++ b/src/db/agreement.rs @@ -0,0 +1,225 @@ +use crate::models; +use sqlx::PgPool; +use tracing::Instrument; + +pub async fn fetch(pool: &PgPool, id: i32) -> Result, String> { + tracing::info!("Fetch agreement {}", id); + sqlx::query_as!( + models::Agreement, + r#" + SELECT + * + FROM agreement + WHERE id=$1 + LIMIT 1 + "#, + id + ) + .fetch_one(pool) + .await + .map(|agreement| Some(agreement)) + .or_else(|err| match err { + sqlx::Error::RowNotFound => Ok(None), + e => { + tracing::error!("Failed to fetch agreement, error: {:?}", e); + Err("Could not fetch data".to_string()) + } + }) +} + +pub async fn fetch_by_user(pool: &PgPool, user_id: &str) -> Result, String> { + let query_span = tracing::info_span!("Fetch agreements by user id."); + sqlx::query_as!( + models::UserAgreement, + r#" + SELECT + * + FROM user_agreement + WHERE user_id=$1 + "#, + user_id + ) + .fetch_all(pool) + .instrument(query_span) + .await + .map_err(|err| { + tracing::error!("Failed to fetch agreement, error: {:?}", err); + "".to_string() + }) +} + + +pub async fn fetch_by_user_and_agreement(pool: &PgPool, user_id: &str, agreement_id: i32) -> Result, String> { + let query_span = tracing::info_span!("Fetch agreements by user id."); + sqlx::query_as!( + models::UserAgreement, + r#" + SELECT + * + FROM user_agreement + WHERE user_id=$1 + AND agrt_id=$2 + LIMIT 1 + "#, + user_id, + agreement_id + ) + .fetch_one(pool) + .instrument(query_span) + .await + .map(|agreement| Some(agreement)) + .or_else(|err| match err { + sqlx::Error::RowNotFound => Ok(None), + err => { + tracing::error!("Failed to fetch one agreement by name, error: {:?}", err); + Err("".to_string()) + } + }) +} +pub async fn fetch_one_by_name(pool: &PgPool, name: &str) -> Result, String> { + let query_span = tracing::info_span!("Fetch one agreement by name."); + sqlx::query_as!( + models::Agreement, + r#" + SELECT + * + FROM agreement + WHERE name=$1 + LIMIT 1 + "#, + name + ) + .fetch_one(pool) + .instrument(query_span) + .await + .map(|agreement| Some(agreement)) + .or_else(|err| match err { + sqlx::Error::RowNotFound => Ok(None), + err => { + tracing::error!("Failed to fetch one agreement by name, error: {:?}", err); + Err("".to_string()) + } + }) +} + +pub async fn insert(pool: &PgPool, mut agreement: models::Agreement) -> Result { + let query_span = tracing::info_span!("Saving new agreement into the database"); + sqlx::query!( + r#" + INSERT INTO agreement (name, text, created_at, updated_at) + VALUES ($1, $2, $3, $4) + RETURNING id; + "#, + agreement.name, + agreement.text, + agreement.created_at, + agreement.updated_at, + ) + .fetch_one(pool) + .instrument(query_span) + .await + .map(move |result| { + agreement.id = result.id; + agreement + }) + .map_err(|e| { + tracing::error!("Failed to execute query: {:?}", e); + "Failed to insert".to_string() + }) +} + +pub async fn insert_by_user(pool: &PgPool, mut item: models::UserAgreement) -> Result { + let query_span = tracing::info_span!("Saving new agreement into the database"); + sqlx::query!( + r#" + INSERT INTO user_agreement (agrt_id, user_id, created_at, updated_at) + VALUES ($1, $2, $3, $4) + RETURNING id; + "#, + item.agrt_id, + item.user_id, + item.created_at, + item.updated_at, + ) + .fetch_one(pool) + .instrument(query_span) + .await + .map(move |result| { + item.id = result.id; + item + }) + .map_err(|e| { + tracing::error!("Failed to execute query: {:?}", e); + "Failed to insert".to_string() + }) +} +pub async fn update(pool: &PgPool, mut agreement: models::Agreement) -> Result { + let query_span = tracing::info_span!("Updating agreement"); + sqlx::query_as!( + models::Agreement, + r#" + UPDATE agreement + SET + name=$2, + text=$3, + updated_at=NOW() at time zone 'utc' + WHERE id = $1 + RETURNING * + "#, + agreement.id, + agreement.name, + agreement.text, + ) + .fetch_one(pool) + .instrument(query_span) + .await + .map(|result|{ + tracing::info!("Agreement {} has been saved to database", agreement.id); + agreement.updated_at = result.updated_at; + agreement + }) + .map_err(|err| { + tracing::error!("Failed to execute query: {:?}", err); + "".to_string() + }) +} + +#[tracing::instrument(name = "Delete user's agreement.")] +pub async fn delete(pool: &PgPool, id: i32) -> Result { + tracing::info!("Delete agreement {}", id); + let mut tx = match pool.begin().await { + Ok(result) => result, + Err(err) => { + tracing::error!("Failed to begin transaction: {:?}", err); + return Err("".to_string()); + } + }; + + // Combine delete queries into a single query + let delete_query = " + DELETE FROM agreement WHERE id = $1; + "; + + match sqlx::query(delete_query) + .bind(id) + .execute(&mut tx) + .await + .map_err(|err| { + println!("{:?}", err) + }) + { + Ok(_) => { + let _ = tx.commit().await.map_err(|err| { + tracing::error!("Failed to commit transaction: {:?}", err); + false + }); + Ok(true) + } + Err(_err) => { + let _ = tx.rollback().await.map_err(|err| println!("{:?}", err)); + Ok(false) + } + // todo, when empty commit() + } +} + diff --git a/src/db/mod.rs b/src/db/mod.rs index 3585327..2e95f63 100644 --- a/src/db/mod.rs +++ b/src/db/mod.rs @@ -5,3 +5,4 @@ pub mod project; pub(crate) mod deployment; pub(crate) mod cloud; pub(crate) mod server; +pub(crate) mod agreement; diff --git a/src/db/server.rs b/src/db/server.rs index 60eafb1..c9fd7d4 100644 --- a/src/db/server.rs +++ b/src/db/server.rs @@ -6,18 +6,19 @@ pub async fn fetch(pool: &PgPool, id: i32) -> Result, Str tracing::info!("Fetch server {}", id); sqlx::query_as!( models::Server, - r#"SELECT * FROM server WHERE id=$1 LIMIT 1 "#, id + r#"SELECT * FROM server WHERE id=$1 LIMIT 1 "#, + id ) - .fetch_one(pool) - .await - .map(|server| Some(server)) - .or_else(|err| match err { - sqlx::Error::RowNotFound => Ok(None), - e => { - tracing::error!("Failed to fetch server, error: {:?}", e); - Err("Could not fetch data".to_string()) - } - }) + .fetch_one(pool) + .await + .map(|server| Some(server)) + .or_else(|err| match err { + sqlx::Error::RowNotFound => Ok(None), + e => { + tracing::error!("Failed to fetch server, error: {:?}", e); + Err("Could not fetch data".to_string()) + } + }) } pub async fn fetch_by_user(pool: &PgPool, user_id: &str) -> Result, String> { @@ -32,17 +33,19 @@ pub async fn fetch_by_user(pool: &PgPool, user_id: &str) -> Result Result, String> { +pub async fn fetch_by_project( + pool: &PgPool, + project_id: i32, +) -> Result, String> { let query_span = tracing::info_span!("Fetch servers by project/project id."); sqlx::query_as!( models::Server, @@ -54,16 +57,15 @@ pub async fn fetch_by_project(pool: &PgPool, project_id: i32) -> Result Result { let query_span = tracing::info_span!("Saving user's server data into the database"); sqlx::query!( @@ -77,8 +79,12 @@ pub async fn insert(pool: &PgPool, mut server: models::Server) -> Result Result Result Result Result { .bind(id) .execute(&mut tx) .await - .map_err(|err| { - println!("{:?}", err) - }) + .map_err(|err| println!("{:?}", err)) { Ok(_) => { let _ = tx.commit().await.map_err(|err| { @@ -185,5 +198,4 @@ pub async fn delete(pool: &PgPool, id: i32) -> Result { Ok(false) } } - } diff --git a/src/forms/agreement/add.rs b/src/forms/agreement/add.rs new file mode 100644 index 0000000..529a7d0 --- /dev/null +++ b/src/forms/agreement/add.rs @@ -0,0 +1,19 @@ +use chrono::Utc; +use crate::models; +use serde::{Deserialize, Serialize}; +use serde_valid::Validate; + +#[derive(Serialize, Deserialize, Debug, Validate)] +pub struct UserAddAgreement { + pub agrt_id: i32, +} + +impl Into for UserAddAgreement { + fn into(self) -> models::UserAgreement { + let mut item = models::UserAgreement::default(); + item.agrt_id = self.agrt_id; + item.created_at = Utc::now(); + item.updated_at = Utc::now(); + item + } +} diff --git a/src/forms/agreement/adminadd.rs b/src/forms/agreement/adminadd.rs new file mode 100644 index 0000000..7e03a4d --- /dev/null +++ b/src/forms/agreement/adminadd.rs @@ -0,0 +1,31 @@ +use chrono::Utc; +use crate::models; +use serde::{Deserialize, Serialize}; +use serde_valid::Validate; + +#[derive(Serialize, Deserialize, Debug, Validate)] +pub struct Agreement { + #[validate(max_length = 100)] + pub name: String, + #[validate(max_length = 5000)] + pub text: String, +} + +impl Into for Agreement { + fn into(self) -> models::Agreement { + let mut item = models::Agreement::default(); + item.name = self.name; + item.text = self.text; + item.created_at = Utc::now(); + item.updated_at = Utc::now(); + item + } +} + +impl Agreement { + pub fn update(self, item: &mut models::Agreement) + { + item.name = self.name; + item.name= self.text; + } +} diff --git a/src/forms/agreement/mod.rs b/src/forms/agreement/mod.rs new file mode 100644 index 0000000..6c6029a --- /dev/null +++ b/src/forms/agreement/mod.rs @@ -0,0 +1,5 @@ +mod adminadd; +mod add; + +pub use add::UserAddAgreement as UserAddAgreement; +pub use adminadd::Agreement as AdminAddAgreement; diff --git a/src/forms/mod.rs b/src/forms/mod.rs index a5651bf..a54cae3 100644 --- a/src/forms/mod.rs +++ b/src/forms/mod.rs @@ -3,6 +3,7 @@ pub mod project; pub mod user; pub(crate) mod cloud; pub(crate) mod server; +pub(crate) mod agreement; pub use cloud::*; pub use server::*; diff --git a/src/forms/project/app.rs b/src/forms/project/app.rs index b246829..c63f82e 100644 --- a/src/forms/project/app.rs +++ b/src/forms/project/app.rs @@ -1,11 +1,11 @@ use crate::forms; +use crate::forms::project::network::Network; +use crate::forms::project::{replace_id_with_name, DockerImage}; use docker_compose_types as dctypes; use indexmap::IndexMap; -use serde_json::Value; use serde::{Deserialize, Serialize}; +use serde_json::Value; use serde_valid::Validate; -use crate::forms::project::network::Network; -use crate::forms::project::{DockerImage, replace_id_with_name}; #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize, Validate)] pub struct App { @@ -64,6 +64,7 @@ pub struct App { #[validate(enumerate("always", "no", "unless-stopped", "on-failure"))] pub restart: String, pub command: Option, + pub entrypoint: Option, pub volumes: Option>, #[serde(flatten)] pub environment: forms::project::Environment, @@ -96,9 +97,10 @@ impl App { named_volumes } - - pub(crate) fn try_into_service(&self, all_networks: &Vec) -> Result { - + pub(crate) fn try_into_service( + &self, + all_networks: &Vec, + ) -> Result { let mut service = dctypes::Service { image: Some(self.docker_image.to_string()), ..Default::default() @@ -117,7 +119,7 @@ impl App { } collector } - None => vec![] + None => vec![], }; let volumes: Vec = match &self.volumes { @@ -128,21 +130,25 @@ impl App { } collector - }, - None => vec![] + } + None => vec![], }; let mut envs = IndexMap::new(); for item in self.environment.environment.clone() { let items = item .into_iter() - .map(|env_var| (env_var.key, Some(dctypes::SingleValue::String(env_var.value.clone())))) + .map(|env_var| { + ( + env_var.key, + Some(dctypes::SingleValue::String(env_var.value.clone())), + ) + }) .collect::>(); envs.extend(items); } - service.ports = dctypes::Ports::Long(ports); service.restart = Some(self.restart.clone()); if let Some(cmd) = self.command.as_deref() { @@ -150,6 +156,12 @@ impl App { service.command = Some(dctypes::Command::Simple(cmd.to_owned())); } } + + if let Some(entry) = self.entrypoint.as_deref() { + if !entry.is_empty() { + service.entrypoint = Some(dctypes::Entrypoint::Simple(entry.to_owned())); + } + } service.volumes = volumes; service.environment = dctypes::Environment::KvPair(envs); diff --git a/src/forms/server.rs b/src/forms/server.rs index 134973a..382a629 100644 --- a/src/forms/server.rs +++ b/src/forms/server.rs @@ -1,45 +1,49 @@ use crate::models; +use chrono::Utc; use serde::{Deserialize, Serialize}; use serde_valid::Validate; -use chrono::{Utc}; #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize, Validate)] pub struct ServerForm { - // pub cloud_id: i32, - // pub project_id: i32, - pub region: String, + pub region: Option, pub zone: Option, - pub server: String, - pub os: String, + pub server: Option, + pub os: Option, pub disk_type: Option, + pub srv_ip: Option, + pub ssh_port: Option, + pub ssh_user: Option, } -impl Into for &ServerForm { - fn into(self) -> models::Server { +impl From<&ServerForm> for models::Server { + fn from(val: &ServerForm) -> Self { let mut server = models::Server::default(); - server.disk_type = self.disk_type.clone(); - server.region = self.region.clone(); - server.server = self.server.clone(); - server.zone = self.zone.clone(); - server.os = self.os.clone(); + server.disk_type = val.disk_type.clone(); + server.region = val.region.clone(); + server.server = val.server.clone(); + server.zone = val.zone.clone(); + server.os = val.os.clone(); server.created_at = Utc::now(); server.updated_at = Utc::now(); + server.srv_ip = val.srv_ip.clone(); + server.ssh_port = val.ssh_port.clone(); + server.ssh_user = val.ssh_user.clone(); server } } impl Into for models::Server { - fn into(self) -> ServerForm { let mut form = ServerForm::default(); - // form.cloud_id = self.cloud_id; - // form.project_id = self.project_id; form.disk_type = self.disk_type; form.region = self.region; form.server = self.server; form.zone = self.zone; form.os = self.os; + form.srv_ip = self.srv_ip; + form.ssh_port = self.ssh_port; + form.ssh_user = self.ssh_user; form } diff --git a/src/helpers/dockerhub.rs b/src/helpers/dockerhub.rs index 5b54d9a..651cf71 100644 --- a/src/helpers/dockerhub.rs +++ b/src/helpers/dockerhub.rs @@ -92,7 +92,6 @@ pub struct RepoResult { pub content_types: Option>, } - #[derive(Default, Debug, Clone, PartialEq, Serialize, Validate)] pub struct DockerHub<'a> { pub(crate) creds: DockerHubCreds<'a>, @@ -104,7 +103,6 @@ pub struct DockerHub<'a> { } impl<'a> DockerHub<'a> { - #[tracing::instrument(name = "Dockerhub login.")] pub async fn login(&'a self) -> Result { if self.creds.password.is_empty() { @@ -138,7 +136,8 @@ impl<'a> DockerHub<'a> { .get(&url) .header("Accept", "application/json"); - client.send() + client + .send() .await .map_err(|err| { let msg = format!("πŸŸ₯Error response {:?}", err); @@ -153,19 +152,21 @@ impl<'a> DockerHub<'a> { msg }) .map(|repositories| { - tracing::debug!("Get public image repo {:?} response {:?}", &url, repositories); + tracing::debug!( + "Get public image repo {:?} response {:?}", + &url, + repositories + ); if repositories.count.unwrap_or(0) > 0 { // let's find at least one active repo let active = repositories .results .into_iter() - .any(|repo| { - repo.status == Some(1) - } ); - tracing::debug!("βœ… Public image is active. url: {:?}", &url); + .any(|repo| repo.status == Some(1)); + tracing::debug!("βœ… Public repository is active. url: {:?}", &url); active } else { - tracing::debug!("πŸŸ₯ Public image tag is not active, url: {:?}", &url); + tracing::debug!("πŸŸ₯ Public repository is not active, url: {:?}", &url); false } }) @@ -173,12 +174,20 @@ impl<'a> DockerHub<'a> { #[tracing::instrument(name = "Lookup official repos")] pub async fn lookup_official_repos(&'a self) -> Result { - let url = format!("https://hub.docker.com/v2/repositories/library/{}/tags", self.repos); + let t = match self.tag.clone() { + Some(s) if !s.is_empty() => s, + _ => String::from("latest"), + }; + let url = format!( + "https://hub.docker.com/v2/repositories/library/{}/tags?name={}&page_size=100", + self.repos, t + ); let client = reqwest::Client::new() .get(url) .header("Accept", "application/json"); - client.send() + client + .send() .await .map_err(|err| format!("πŸŸ₯{}", err))? .json::() @@ -191,18 +200,16 @@ impl<'a> DockerHub<'a> { tracing::debug!("Validate official image response {:?}", tags); if tags.count.unwrap_or(0) > 0 { // let's find at least one active tag - let result = tags - .results - .into_iter() - .any(|tag| { - tracing::debug!("official: {:?}", tag); - if "active".to_string() == tag.tag_status && tag.name.eq(self.tag.as_deref().unwrap_or("latest")) { - true - } else { - false - } - }); - tracing::debug!("βœ… Official mage is active. url: {:?}", result); + let result = tags.results.into_iter().any(|tag| { + tracing::debug!( + "🟨 check official tag.name {:?} tag.tag_status: {:?} t={:?}", + tag.name, + tag.tag_status, + t + ); + "active".to_string() == tag.tag_status + }); + tracing::debug!("🟨 Official image is active? {:?}", result); result } else { tracing::debug!("πŸŸ₯ Official image tag is not active"); @@ -213,10 +220,14 @@ impl<'a> DockerHub<'a> { #[tracing::instrument(name = "Lookup vendor's public repos")] pub async fn lookup_vendor_public_repos(&'a self) -> Result { - + let t = match self.tag.clone() { + Some(s) if !s.is_empty() => s, + _ => String::from("latest"), + }; + // get exact tag name let url = format!( - "https://hub.docker.com/v2/namespaces/{}/repositories/{}/tags", - &self.creds.username, &self.repos + "https://hub.docker.com/v2/namespaces/{}/repositories/{}/tags?name={}&page_size=100", + &self.creds.username, &self.repos, &t ); tracing::debug!("Search vendor's public repos {:?}", url); @@ -258,10 +269,14 @@ impl<'a> DockerHub<'a> { #[tracing::instrument(name = "Lookup private repos")] pub async fn lookup_private_repo(&'a self) -> Result { let token = self.login().await?; + let t = match self.tag.clone() { + Some(s) if !s.is_empty() => s, + _ => String::from("latest"), + }; let url = format!( - "https://hub.docker.com/v2/namespaces/{}/repositories/{}/tags", - &self.creds.username, &self.repos + "https://hub.docker.com/v2/namespaces/{}/repositories/{}/tags?name={}&page_size=100", + &self.creds.username, &self.repos, t ); tracing::debug!("Search private repos {:?}", url); @@ -269,7 +284,8 @@ impl<'a> DockerHub<'a> { .get(url) .header("Accept", "application/json"); - client.bearer_auth(token) + client + .bearer_auth(token) .send() .await .map_err(|err| format!("πŸŸ₯{}", err))? @@ -285,7 +301,7 @@ impl<'a> DockerHub<'a> { // let's find at least one active tag let t = match self.tag.clone() { Some(s) if !s.is_empty() => s, - _ => String::from("latest") + _ => String::from("latest"), }; let active = tags @@ -351,12 +367,10 @@ impl<'a> DockerHub<'a> { } } - impl<'a> TryFrom<&'a DockerImage> for DockerHub<'a> { type Error = String; fn try_from(image: &'a DockerImage) -> Result { - let username = match image.dockerhub_user { Some(ref username) => username, None => "", @@ -373,18 +387,11 @@ impl<'a> TryFrom<&'a DockerImage> for DockerHub<'a> { .collect::>(); let (name, tag) = match n.len() { - 1 => { - ( - n.first().unwrap().into(), - Some("".to_string()) - ) - } - 2 => { - ( - n.first().unwrap().to_string(), - n.last().map(|s| s.to_string()) - ) - } + 1 => (n.first().unwrap().into(), Some("".to_string())), + 2 => ( + n.first().unwrap().to_string(), + n.last().map(|s| s.to_string()), + ), _ => { return Err("Wrong format of repository name".to_owned()); } @@ -406,6 +413,6 @@ impl<'a> TryFrom<&'a DockerImage> for DockerHub<'a> { return Err(format!("{:?}", msg)); } - Ok(hub) + Ok(hub) } } diff --git a/src/models/agreement.rs b/src/models/agreement.rs new file mode 100644 index 0000000..39733a3 --- /dev/null +++ b/src/models/agreement.rs @@ -0,0 +1,20 @@ +use chrono::{DateTime, Utc}; +use serde_derive::{Deserialize, Serialize}; + +#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] +pub struct Agreement { + pub id: i32, + pub name: String, + pub text: String, + pub created_at: DateTime, + pub updated_at: DateTime, +} + +#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] +pub struct UserAgreement { + pub id: i32, + pub agrt_id: i32, + pub user_id: String, + pub created_at: DateTime, + pub updated_at: DateTime, +} diff --git a/src/models/mod.rs b/src/models/mod.rs index c1c375b..8c2b4e0 100644 --- a/src/models/mod.rs +++ b/src/models/mod.rs @@ -8,6 +8,7 @@ pub mod user; pub(crate) mod deployment; mod cloud; mod server; +mod agreement; pub use client::*; pub use rating::*; @@ -19,3 +20,4 @@ pub use rules::*; pub use deployment::*; pub use cloud::*; pub use server::*; +pub use agreement::*; diff --git a/src/models/rating.rs b/src/models/rating.rs index d6f1eda..4a42917 100644 --- a/src/models/rating.rs +++ b/src/models/rating.rs @@ -1,5 +1,4 @@ use chrono::{DateTime, Utc}; -use serde::{Serialize}; use crate::models; #[derive(Debug, Default)] diff --git a/src/models/server.rs b/src/models/server.rs index 3e575a1..096abca 100644 --- a/src/models/server.rs +++ b/src/models/server.rs @@ -9,19 +9,28 @@ pub struct Server { pub project_id: i32, #[validate(min_length = 2)] #[validate(max_length = 50)] - pub region: String, + pub region: Option, #[validate(min_length = 2)] #[validate(max_length = 50)] pub zone: Option, #[validate(min_length = 2)] #[validate(max_length = 50)] - pub server: String, + pub server: Option, #[validate(min_length = 2)] #[validate(max_length = 50)] - pub os: String, + pub os: Option, #[validate(min_length = 3)] #[validate(max_length = 50)] pub disk_type: Option, pub created_at: DateTime, pub updated_at: DateTime, -} \ No newline at end of file + #[validate(min_length = 8)] + #[validate(max_length = 50)] + pub srv_ip: Option, + #[validate(minimum = 20)] + #[validate(maximum = 65535)] + pub ssh_port: Option, + #[validate(min_length = 3)] + #[validate(max_length = 50)] + pub ssh_user: Option, +} diff --git a/src/routes/agreement/add.rs b/src/routes/agreement/add.rs new file mode 100644 index 0000000..2f9684c --- /dev/null +++ b/src/routes/agreement/add.rs @@ -0,0 +1,74 @@ +use crate::forms; +use crate::views; +use crate::helpers::JsonResponse; +use crate::models; +use crate::db; +use actix_web::{post, put, web, Responder, Result}; +use sqlx::PgPool; +use std::sync::Arc; +use serde_valid::Validate; + + +#[tracing::instrument(name = "Admin add agreement.")] +#[post("")] +pub async fn admin_add_handler( + form: web::Json, + pg_pool: web::Data, +) -> Result { + if let Err(errors) = form.validate() { + return Err(JsonResponse::::build().form_error(errors.to_string())); + } + + let item: models::Agreement = form.into_inner().into(); + db::agreement::insert(pg_pool.get_ref(), item) + .await + .map(|item| { + JsonResponse::::build() + .set_item(Into::::into(item)) + .ok("success") + }) + .map_err(|err| { + tracing::error!("Failed to execute query: {:?}", err); + JsonResponse::::build().internal_server_error("Record not added") + }) +} + +#[tracing::instrument(name = "Add user agreement.")] +#[post("")] +pub async fn user_add_handler( + user: web::ReqData>, + form: web::Json, + pg_pool: web::Data, +) -> Result { + if let Err(errors) = form.validate() { + return Err(JsonResponse::::build().form_error(errors.to_string())); + } + + let agreement = db::agreement::fetch(pg_pool.get_ref(), form.agrt_id) + .await + .map_err(|_msg| JsonResponse::::build().internal_server_error(_msg))? + .ok_or_else(|| JsonResponse::::build().not_found("not found"))? + ; + + let user_id = user.id.as_str(); + let user_agreement = db::agreement::fetch_by_user_and_agreement( + pg_pool.get_ref(), + user_id, + agreement.id + ) + .await + .map_err(|err| JsonResponse::::build().internal_server_error(err))?; + + if user_agreement.is_some() { + return Err(JsonResponse::::build().bad_request("already signed")); + } + + let mut item: models::UserAgreement = form.into_inner().into(); + item.user_id = user.id.clone(); + + db::agreement::insert_by_user(pg_pool.get_ref(), item) + .await + .map(|item| JsonResponse::build().set_item(Into::::into(item)).ok("success")) + .map_err(|_err| JsonResponse::::build() + .internal_server_error("Failed to insert")) +} diff --git a/src/routes/agreement/get.rs b/src/routes/agreement/get.rs new file mode 100644 index 0000000..19f887b --- /dev/null +++ b/src/routes/agreement/get.rs @@ -0,0 +1,43 @@ +use crate::db; +use crate::helpers::JsonResponse; +use crate::models; +use actix_web::{get, web, Responder, Result}; +use sqlx::PgPool; +use std::sync::Arc; + +#[tracing::instrument(name = "Get agreement by id.")] +#[get("/{id}")] +pub async fn get_handler( + user: web::ReqData>, + path: web::Path<(i32,)>, + pg_pool: web::Data, +) -> Result { + let id = path.0; + + db::agreement::fetch(pg_pool.get_ref(), id) + .await + .map_err(|err| JsonResponse::internal_server_error(err.to_string())) + .and_then(|item| match item { + Some(item) => Ok(JsonResponse::build().set_item(Some(item)).ok("OK")), + None => Err(JsonResponse::not_found("not found")), + }) +} + + +#[tracing::instrument(name = "Check if agreement signed/accepted.")] +#[get("/accepted/{id}")] +pub async fn accept_handler( + user: web::ReqData>, + path: web::Path<(i32,)>, + pg_pool: web::Data, +) -> Result { + let id = path.0; + + db::agreement::fetch_by_user_and_agreement(pg_pool.get_ref(), user.id.as_ref(), id) + .await + .map_err(|err| JsonResponse::internal_server_error(err.to_string())) + .and_then(|item| match item { + Some(item) => Ok(JsonResponse::build().set_item(Some(item)).ok("OK")), + None => Err(JsonResponse::not_found("not found")), + }) +} diff --git a/src/routes/agreement/mod.rs b/src/routes/agreement/mod.rs new file mode 100644 index 0000000..faa93cb --- /dev/null +++ b/src/routes/agreement/mod.rs @@ -0,0 +1,7 @@ +mod add; +mod update; +mod get; + +pub use add::*; +pub use update::*; +pub use get::*; diff --git a/src/routes/agreement/update.rs b/src/routes/agreement/update.rs new file mode 100644 index 0000000..87b77ef --- /dev/null +++ b/src/routes/agreement/update.rs @@ -0,0 +1,48 @@ +use crate::forms; +use crate::views; +use crate::helpers::JsonResponse; +use crate::models; +use crate::db; +use actix_web::{post, put, web, Responder, Result}; +use sqlx::PgPool; +use std::sync::Arc; +use serde_valid::Validate; + + +#[tracing::instrument(name = "Admin update agreement.")] +#[put("/{id}")] +pub async fn admin_update_handler( + path: web::Path<(i32,)>, + form: web::Json, + pg_pool: web::Data, +) -> Result { + if let Err(errors) = form.validate() { + return Err(JsonResponse::::build().form_error(errors.to_string())); + } + + let id = path.0; + let mut item = db::agreement::fetch(pg_pool.get_ref(), id) + .await + .map_err(|_err| JsonResponse::::build().internal_server_error("")) + .and_then(|item| { + match item { + Some(item) => Ok(item), + _ => Err(JsonResponse::::build().not_found("not found")) + } + })?; + + form.into_inner().update(&mut item); + + db::agreement::update(pg_pool.get_ref(), item) + .await + .map(|item| { + JsonResponse::::build() + .set_item(Into::::into(item)) + .ok("success") + }) + .map_err(|err| { + tracing::error!("Failed to execute query: {:?}", err); + JsonResponse::::build().internal_server_error("Agreement not updated") + }) +} + diff --git a/src/routes/mod.rs b/src/routes/mod.rs index 647742a..6ce7585 100644 --- a/src/routes/mod.rs +++ b/src/routes/mod.rs @@ -8,4 +8,8 @@ pub(crate) mod project; pub(crate) mod cloud; pub(crate) mod server; +pub(crate) mod agreement; + pub use project::*; + +pub use agreement::*; \ No newline at end of file diff --git a/src/routes/project/deploy.rs b/src/routes/project/deploy.rs index b0d767e..1001e36 100644 --- a/src/routes/project/deploy.rs +++ b/src/routes/project/deploy.rs @@ -1,17 +1,15 @@ use crate::configuration::Settings; use crate::db; use crate::forms; +use crate::helpers::compressor::compress; use crate::helpers::project::builder::DcBuilder; use crate::helpers::{JsonResponse, MqManager}; use crate::models; use actix_web::{post, web, web::Data, Responder, Result}; +use chrono::Utc; +use serde_valid::Validate; use sqlx::PgPool; use std::sync::Arc; -use serde_valid::Validate; -use crate::helpers::compressor::compress; -use chrono::{Utc}; - - #[tracing::instrument(name = "Deploy for every user")] #[post("/{id}/deploy")] @@ -46,9 +44,9 @@ pub async fn item( // Build compose let id = project.id; let dc = DcBuilder::new(project); - let fc = dc.build().map_err(|err| { - JsonResponse::::build().internal_server_error(err) - })?; + let fc = dc + .build() + .map_err(|err| JsonResponse::::build().internal_server_error(err))?; form.cloud.user_id = Some(user.id.clone()); form.cloud.project_id = Some(id); @@ -62,7 +60,8 @@ pub async fn item( .await .map(|cloud| cloud) .map_err(|_| { - JsonResponse::::build().internal_server_error("Internal Server Error") + JsonResponse::::build() + .internal_server_error("Internal Server Error") })?; } @@ -82,27 +81,22 @@ pub async fn item( .map_err(|err| JsonResponse::::build().bad_request(err))?; payload.server = Some(server.into()); - payload.cloud = Some(cloud_creds.into()); - payload.stack = form.stack.clone().into(); + payload.cloud = Some(cloud_creds.into()); + payload.stack = form.stack.clone().into(); payload.user_token = Some(user.id.clone()); payload.user_email = Some(user.email.clone()); payload.docker_compose = Some(compress(fc.as_str())); // Store deployment attempts into deployment table in db let json_request = dc.project.body.clone(); - let deployment = models::Deployment::new( - dc.project.id, - String::from("pending"), - json_request - ); + let deployment = models::Deployment::new(dc.project.id, String::from("pending"), json_request); let result = db::deployment::insert(pg_pool.get_ref(), deployment) .await .map(|deployment| { payload.id = Some(deployment.id); deployment - } - ) + }) .map_err(|_| { JsonResponse::::build().internal_server_error("Internal Server Error") }); @@ -110,11 +104,24 @@ pub async fn item( tracing::debug!("Save deployment result: {:?}", result); tracing::debug!("Send project data <<<>>>{:?}", payload); + let provider = payload.cloud + .as_ref() + .map(|form| if form.provider.contains("own") { + "own" + } else { + "tfa" + }) + .unwrap_or("tfa") + .to_string(); + + let routing_key = format!("install.start.{}.all.all", provider); + tracing::debug!("Route: {:?}", routing_key); + // Send Payload mq_manager .publish( "install".to_string(), - "install.start.tfa.all.all".to_string(), + routing_key, &payload, ) .await @@ -124,7 +131,6 @@ pub async fn item( .set_id(id) .ok("Success") }) - } #[tracing::instrument(name = "Deploy, when cloud token is saved")] #[post("/{id}/deploy/{cloud_id}")] @@ -139,7 +145,12 @@ pub async fn saved_item( let id = path.0; let cloud_id = path.1; - tracing::debug!("User {:?} is deploying project: {} to cloud: {} ", user, id, cloud_id); + tracing::debug!( + "User {:?} is deploying project: {} to cloud: {} ", + user, + id, + cloud_id + ); if !form.validate().is_ok() { let errors = form.validate().unwrap_err().to_string(); @@ -161,32 +172,31 @@ pub async fn saved_item( // Build compose let id = project.id; let dc = DcBuilder::new(project); - let fc = dc.build().map_err(|err| { - JsonResponse::::build().internal_server_error(err) - })?; + let fc = dc + .build() + .map_err(|err| JsonResponse::::build().internal_server_error(err))?; let cloud = match db::cloud::fetch(pg_pool.get_ref(), cloud_id).await { - Ok(cloud) => { - match cloud { - Some(cloud) => { - cloud - }, - None => { - return Err(JsonResponse::::build().not_found("No cloud configured")); - } + Ok(cloud) => match cloud { + Some(cloud) => cloud, + None => { + return Err( + JsonResponse::::build().not_found("No cloud configured") + ); } - } + }, Err(_e) => { return Err(JsonResponse::::build().not_found("No cloud configured")); } }; - let server = match db::server::fetch_by_project(pg_pool.get_ref(), dc.project.id.clone()).await { + let server = match db::server::fetch_by_project(pg_pool.get_ref(), dc.project.id.clone()).await + { Ok(server) => { // currently we support only one type of servers //@todo multiple server types support match server.into_iter().nth(0) { - Some(mut server) => { + Some(mut server) => { // new updates server.disk_type = form.server.disk_type.clone(); server.region = form.server.region.clone(); @@ -196,7 +206,7 @@ pub async fn saved_item( server.user_id = user.id.clone(); server.project_id = id; server - }, + } None => { // Create new server // form.update_with(server.into()); @@ -207,7 +217,8 @@ pub async fn saved_item( .await .map(|server| server) .map_err(|_| { - JsonResponse::::build().internal_server_error("Internal Server Error") + JsonResponse::::build() + .internal_server_error("Internal Server Error") })? } } @@ -230,19 +241,15 @@ pub async fn saved_item( .map_err(|err| JsonResponse::::build().bad_request(err))?; payload.server = Some(server.into()); - payload.cloud = Some(cloud.into()); - payload.stack = form.stack.clone().into(); + payload.cloud = Some(cloud.into()); + payload.stack = form.stack.clone().into(); payload.user_token = Some(user.id.clone()); payload.user_email = Some(user.email.clone()); payload.docker_compose = Some(compress(fc.as_str())); // Store deployment attempts into deployment table in db let json_request = dc.project.body.clone(); - let deployment = models::Deployment::new( - dc.project.id, - String::from("pending"), - json_request - ); + let deployment = models::Deployment::new(dc.project.id, String::from("pending"), json_request); let result = db::deployment::insert(pg_pool.get_ref(), deployment) .await @@ -271,8 +278,4 @@ pub async fn saved_item( .set_id(id) .ok("Success") }) - } - - - diff --git a/src/routes/rating/add.rs b/src/routes/rating/add.rs index a97b8d9..c1549e2 100644 --- a/src/routes/rating/add.rs +++ b/src/routes/rating/add.rs @@ -8,10 +8,6 @@ use sqlx::PgPool; use std::sync::Arc; use serde_valid::Validate; -// workflow -// add, update, list, get(user_id), ACL, -// ACL - access to func for a user -// ACL - access to objects for a user #[tracing::instrument(name = "Add rating.")] #[post("")] diff --git a/src/startup.rs b/src/startup.rs index 22233db..45ba432 100644 --- a/src/startup.rs +++ b/src/startup.rs @@ -81,12 +81,12 @@ pub async fn run( .service(routes::rating::admin_get_handler) .service(routes::rating::admin_list_handler) .service(routes::rating::admin_edit_handler) - .service(routes::rating::admin_delete_handler) + .service(routes::rating::admin_delete_handler), ) .service( web::scope("/project") .service(crate::routes::project::get::admin_list) - .service(crate::routes::project::compose::admin) + .service(crate::routes::project::compose::admin), ) .service( web::scope("/client") @@ -94,6 +94,12 @@ pub async fn run( .service(routes::client::admin_update_handler) .service(routes::client::admin_disable_handler), ) + .service( + web::scope("/agreement") + .service(routes::agreement::admin_add_handler) + .service(routes::agreement::admin_update_handler) + .service(routes::agreement::get_handler), + ) ) .service( web::scope("/cloud") @@ -107,10 +113,15 @@ pub async fn run( web::scope("/server") .service(crate::routes::server::get::item) .service(crate::routes::server::get::list) - // .service(crate::routes::server::add::add) .service(crate::routes::server::update::item) .service(crate::routes::server::delete::item), ) + .service( + web::scope("/agreement") + .service(crate::routes::agreement::user_add_handler) + .service(crate::routes::agreement::get_handler) + .service(crate::routes::agreement::accept_handler), + ) .app_data(json_config.clone()) .app_data(pg_pool.clone()) .app_data(mq_manager.clone()) diff --git a/tests/agreement.rs b/tests/agreement.rs new file mode 100644 index 0000000..db80863 --- /dev/null +++ b/tests/agreement.rs @@ -0,0 +1,118 @@ +mod common; +// test me: +// cargo t --test agreement -- --nocapture --show-output + + +// test specific function: cargo t --test agreement admin_add -- --nocapture --show-output +// #[tokio::test] +// async fn admin_add() { +// +// let app = common::spawn_app().await; // server +// let client = reqwest::Client::new(); // client +// +// let data = r#" +// { +// "name": "test", +// "text": "test agreement text +// } +// "#; +// +// let response = client +// .post(&format!("{}/admin/agreement", &app.address)) +// .json(data) +// .send() +// .await +// .expect("Failed to execute request."); +// +// println!("response: {}", response.status()); +// assert!(response.status().is_success()); +// assert_eq!(Some(0), response.content_length()); +// } +// +// test me: cargo t --test agreement admin_fetch_one -- --nocapture --show-output +// #[tokio::test] +// async fn admin_fetch_one() { +// +// let app = common::spawn_app().await; // server +// let client = reqwest::Client::new(); // client +// +// let response = client +// .get(&format!("{}/admin/agreement/1", &app.address)) +// .send() +// .await +// .expect("Failed to execute request."); +// +// assert!(response.status().is_success()); +// assert_eq!(Some(0), response.content_length()); +// } +// +// test me: cargo t --test agreement get --nocapture --show-output +#[tokio::test] +async fn get() { + + let app = common::spawn_app().await; // server + let client = reqwest::Client::new(); // client + + let response = client + .get(&format!("{}/agreement/1", &app.address)) + .send() + .await + .expect("Failed to execute request."); + + println!("response: {:?}", response); + assert!(response.status().is_success()); + assert_eq!(Some(0), response.content_length()); +} + + +// test me: cargo t --test agreement user_add -- --nocapture --show-output +#[tokio::test] +async fn user_add() { + + let app = common::spawn_app().await; // server + let client = reqwest::Client::new(); // client + + let data = r#" + { + "agrt_id": "1", + } + "#; + + let response = client + .post(&format!("{}/agreement", &app.address)) + .json(data) + .send() + .await + .expect("Failed to execute request."); + + println!("response: {}", response.status()); + assert!(response.status().is_success()); + assert_eq!(Some(0), response.content_length()); +} + +// // test me: cargo t --test agreement admin_update -- --nocapture --show-output +// #[tokio::test] +// async fn admin_update() { +// +// let app = common::spawn_app().await; // server +// let client = reqwest::Client::new(); // client +// +// let data = r#" +// { +// "name": "test update", +// "text": "test agreement text update +// } +// "#; +// +// let response = client +// .post(&format!("{}/admin/agreement", &app.address)) +// .json(data) +// .send() +// .await +// .expect("Failed to execute request."); +// +// println!("response: {}", response.status()); +// assert!(response.status().is_success()); +// assert_eq!(Some(0), response.content_length()); +// } +//