diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 00000000..64fbc425 --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,15 @@ +# -D: deny anything that goes wrong within this lint +# -W: warn the user what went wrong, but allow to build +# -A: allow the user to do "incorrect" behaviour +[build] +rustflags = ["-D", "clippy::all", + "-D", "clippy::pedantic", + "-D", "clippy::correctness", + "-D", "clippy::suspicious", + "-D", "clippy::style", + "-D", "clippy::complexity", + "-D", "clippy::perf", + "-D", "clippy::missing_docs_in_private_items", + "-A", "clippy::only_used_in_recursion", + "-A", "clippy::struct_excessive_bools", + "-A", "clippy::module_name_repetitions"] diff --git a/.github/codecov.yml b/.github/codecov.yml new file mode 100644 index 00000000..b2b533a7 --- /dev/null +++ b/.github/codecov.yml @@ -0,0 +1,20 @@ +coverage: + # Hold ourselves to a high bar + range: 85..100 + round: down + precision: 1 + status: + # ref: https://docs.codecov.com/docs/commit-status + project: + default: + # Avoid false negatives + threshold: 1% + +# Test files aren't important for coverage +ignore: + - 'tests' + +# Make comments less noisy +comment: + layout: 'files' + require_changes: true diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..4eab9ecc --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,16 @@ +version: 2 +updates: + - package-ecosystem: github-actions + directory: / + schedule: + interval: daily + - package-ecosystem: cargo + directory: / + schedule: + interval: daily + ignore: + - dependency-name: '*' + # patch and minor updates don't matter for libraries + update-types: + - 'version-update:semver-patch' + - 'version-update:semver-minor' diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml new file mode 100644 index 00000000..d31099ea --- /dev/null +++ b/.github/workflows/check.yml @@ -0,0 +1,88 @@ +name: Check + +permissions: + contents: read + +on: + pull_request: + push: + branches: + - main + +jobs: + format: + runs-on: ubuntu-latest + name: Format + steps: + - uses: actions/checkout@v3 + - name: Install stable + uses: dtolnay/rust-toolchain@stable + with: + components: rustfmt + + - name: Cache cargo resources + uses: Swatinem/rust-cache@v2 + with: + shared-key: deps + cache-on-failure: true + + - run: cargo fmt --all -- --check + + clippy: + runs-on: ubuntu-latest + name: Clippy + permissions: + contents: read + checks: write + steps: + - uses: actions/checkout@v3 + - name: Install stable + uses: dtolnay/rust-toolchain@stable + with: + components: clippy + + - name: Cache cargo resources + uses: Swatinem/rust-cache@v2 + with: + shared-key: deps + cache-on-failure: true + + - run: cargo clippy + + audit: + runs-on: ubuntu-latest + name: Audit + permissions: + contents: read + checks: write + steps: + - uses: actions/checkout@v3 + - name: Install stable + uses: dtolnay/rust-toolchain@stable + + - name: Cache cargo resources + uses: Swatinem/rust-cache@v2 + with: + shared-key: deps + cache-on-failure: true + + - run: cargo audit + + check: + runs-on: ubuntu-latest + name: Check + permissions: + contents: read + checks: write + steps: + - uses: actions/checkout@v3 + - name: Install stable + uses: dtolnay/rust-toolchain@stable + + - name: Cache cargo resources + uses: Swatinem/rust-cache@v2 + with: + shared-key: deps + cache-on-failure: true + + - run: cargo check --workspace diff --git a/.github/workflows/code-coverage.yml b/.github/workflows/code-coverage.yml deleted file mode 100644 index 0a5af4da..00000000 --- a/.github/workflows/code-coverage.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: Code Coverage - -on: - push: - branches: - - main - pull_request: - branches: - - main - -jobs: - coverage: - runs-on: ubuntu-latest - steps: - - run: sudo apt-get update -y - - run: sudo apt-get install libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev -y - - - uses: actions/checkout@v3 - - - name: Install Rust - uses: dtolnay/rust-toolchain@stable - - - name: Install cargo-llvm-cov - uses: taiki-e/install-action@cargo-llvm-cov - - - name: Generate code coverage - run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info - - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 - with: - files: lcov.info - fail_ci_if_error: true - layout: "reach, diff, flags, files" - behavior: default - require_changes: false - require_base: no - require_head: yes diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml new file mode 100644 index 00000000..e07716fa --- /dev/null +++ b/.github/workflows/coverage.yml @@ -0,0 +1,46 @@ +name: Coverage + +permissions: + contents: read + +on: + pull_request: + push: + branches: + - main + +jobs: + coverage: + runs-on: ubuntu-latest + name: Coverage + steps: + - uses: actions/checkout@v3 + with: + submodules: true + - name: Install stable + uses: dtolnay/rust-toolchain@stable + with: + components: llvm-tools-preview + - name: cargo install cargo-llvm-cov + uses: taiki-e/install-action@cargo-llvm-cov + - name: cargo generate-lockfile + if: hashFiles('Cargo.lock') == '' + run: cargo generate-lockfile + - name: Cache cargo resources + uses: Swatinem/rust-cache@v2 + with: + shared-key: deps + cache-on-failure: true + - name: Start acapy + run: docker-compose -f ./docker/docker-compose.acapy.min.yml up -d + - name: cargo llvm-cov clean + run: cargo llvm-cov clean --workspace + - name: cargo llvm-cov + run: cargo llvm-cov --locked --all-features --no-report --release + - name: cargo llvm-cov report + run: cargo llvm-cov report --release --lcov --output-path lcov.info + - name: Upload to codecov.io + uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + fail_ci_if_error: true diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-test.yml similarity index 53% rename from .github/workflows/e2e-tests.yml rename to .github/workflows/e2e-test.yml index dd20e445..b994197f 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-test.yml @@ -8,15 +8,18 @@ on: jobs: e2e_test: runs-on: ubuntu-latest + name: E2E Test steps: - run: sudo apt-get update - run: sudo apt-get install libxcb-shape0-dev libxcb-xfixes0-dev - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 + - name: Install stable + uses: dtolnay/rust-toolchain@stable + - name: Cache cargo resources + uses: Swatinem/rust-cache@v2 + with: + shared-key: deps + cache-on-failure: true - name: Start acapy run: docker-compose -f ./docker/docker-compose.acapy.min.yml up -d - - name: Build siera - uses: actions-rs/cargo@v1 - with: - command: build - - name: E2E tests - run: make e2e-test + - run: cargo test e2e_tests diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index ddf55ed4..00000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Clippy check - -on: - push: - branches: - - main - pull_request: - branches: - - main - -jobs: - clippy_check: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - name: Install Rust - uses: dtolnay/rust-toolchain@stable - with: - components: clippy - - - name: Clippy - run: cargo clippy diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..f09d9860 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,32 @@ +name: Test + +permissions: + contents: read + +on: + pull_request: + push: + branches: + - main + +jobs: + test: + runs-on: ubuntu-latest + name: Test + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + with: + components: clippy, rustfmt + + - name: Cache cargo resources + uses: Swatinem/rust-cache@v2 + with: + shared-key: deps + cache-on-failure: true + + - name: Tests + run: cargo test --workspace --exclude=e2e-tests diff --git a/Cargo.lock b/Cargo.lock index 8477f4f1..c1bc058b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,15 +2,24 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "aho-corasick" +version = "0.7.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" +dependencies = [ + "memchr", +] + [[package]] name = "async-trait" -version = "0.1.53" +version = "0.1.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed6aa3524a2dfcf9fe180c51eae2b58738348d819517ceadf95789c51fff7600" +checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.10", ] [[package]] @@ -19,7 +28,7 @@ version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ - "hermit-abi", + "hermit-abi 0.1.19", "libc", "winapi", ] @@ -32,9 +41,15 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "base64" -version = "0.13.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" + +[[package]] +name = "base64" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a" [[package]] name = "bitflags" @@ -50,9 +65,9 @@ checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" [[package]] name = "block-buffer" -version = "0.10.3" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ "generic-array", ] @@ -63,6 +78,12 @@ version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" +[[package]] +name = "bytecount" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c676a478f63e9fa2dd5368a42f28bba0d6c560b775f38583c8bbaa7fcd67c9c" + [[package]] name = "byteorder" version = "1.4.3" @@ -71,15 +92,15 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "bytes" -version = "1.1.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" +checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" [[package]] name = "cc" -version = "1.0.73" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" +checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" [[package]] name = "cfg-if" @@ -95,16 +116,16 @@ checksum = "17cc5e6b5ab06331c33589842070416baa137e8b0eb912b008cfd4a78ada7919" [[package]] name = "clap" -version = "3.1.18" +version = "3.2.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2dbdf4bdacb33466e854ce889eee8dfd5729abf7ccd7664d0a2d60cd384440b" +checksum = "71655c45cb9845d3270c9d6df84ebe72b4dad3c2ba3f7023ad47c144e4e473a5" dependencies = [ "atty", "bitflags", "clap_derive", "clap_lex", "indexmap", - "lazy_static", + "once_cell", "strsim", "termcolor", "textwrap", @@ -112,45 +133,48 @@ dependencies = [ [[package]] name = "clap_derive" -version = "3.1.18" +version = "3.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25320346e922cffe59c0bbc5410c8d8784509efb321488971081313cb1e1a33c" +checksum = "ea0c8bce528c4be4da13ea6fead8965e95b6073585a2f05204bd8f4119f82a65" dependencies = [ "heck", "proc-macro-error", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] name = "clap_lex" -version = "0.2.0" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a37c35f1112dad5e6e0b1adaff798507497a18fceeb30cceb3bae7d1427b9213" +checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" dependencies = [ "os_str_bytes", ] [[package]] -name = "clipboard" -version = "0.5.0" +name = "cli-clipboard" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25a904646c0340239dcf7c51677b33928bf24fdf424b79a57909c0109075b2e7" +checksum = "04087c1d4a2aa259784a563932aee09cbb0869d490775e051096174b070f3e3d" dependencies = [ "clipboard-win", "objc", "objc-foundation", "objc_id", + "wl-clipboard-rs", "x11-clipboard", ] [[package]] name = "clipboard-win" -version = "2.2.0" +version = "4.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3a093d6fed558e5fe24c3dfc85a68bb68f1c824f440d3ba5aca189e2998786b" +checksum = "7191c27c2357d9b7ef96baac1773290d4ca63b24205b82a3fd8a0637afcf0362" dependencies = [ + "error-code", + "str-buf", "winapi", ] @@ -183,9 +207,9 @@ checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" [[package]] name = "cpufeatures" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" +checksum = "280a9f2d8b3a38871a3c8a46fb80db65e5e5ed97da80c4d08bf27fb63e35e181" dependencies = [ "libc", ] @@ -225,34 +249,99 @@ dependencies = [ "typenum", ] +[[package]] +name = "derive-new" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3418329ca0ad70234b9735dc4ceed10af4df60eff9c8e7b06cb5e520d92c3535" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "digest" -version = "0.10.3" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" +checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" dependencies = [ "block-buffer", "crypto-common", ] +[[package]] +name = "downcast-rs" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" + +[[package]] +name = "e2e-tests" +version = "0.1.0" +dependencies = [ + "regex", + "serde_json", + "siera-agent", + "speculoos", + "tokio", +] + [[package]] name = "encoding_rs" -version = "0.8.31" +version = "0.8.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9852635589dc9f9ea1b6fe9f05b50ef208c85c834a562f0c6abb1c475736ec2b" +checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394" dependencies = [ "cfg-if", ] +[[package]] +name = "errno" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1" +dependencies = [ + "errno-dragonfly", + "libc", + "winapi", +] + +[[package]] +name = "errno-dragonfly" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "error-code" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64f18991e7bf11e7ffee451b5318b5c1a73c52d0d0ada6e5a3017c8c1ced6a21" +dependencies = [ + "libc", + "str-buf", +] + [[package]] name = "fastrand" -version = "1.7.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3fcf0cee53519c866c09b5de1f6c56ff9d647101f81c1964fa632e148896cdf" +checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" dependencies = [ "instant", ] +[[package]] +name = "fixedbitset" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" + [[package]] name = "fnv" version = "1.0.7" @@ -276,46 +365,45 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "form_urlencoded" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191" +checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" dependencies = [ - "matches", "percent-encoding", ] [[package]] name = "futures-channel" -version = "0.3.21" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3083ce4b914124575708913bca19bfe887522d6e2e6d0952943f5eac4a74010" +checksum = "164713a5a0dcc3e7b4b1ed7d3b433cabc18025386f9339346e8daf15963cf7ac" dependencies = [ "futures-core", ] [[package]] name = "futures-core" -version = "0.3.21" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c09fd04b7e4073ac7156a9539b57a484a8ea920f79c7c675d05d289ab6110d3" +checksum = "86d7a0c1aa76363dac491de0ee99faf6941128376f1cf96f07db7603b7de69dd" [[package]] name = "futures-sink" -version = "0.3.21" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21163e139fa306126e6eedaf49ecdb4588f939600f0b1e770f4205ee4b7fa868" +checksum = "ec93083a4aecafb2a80a885c9de1f0ccae9dbd32c2bb54b0c3a65690e0b8d2f2" [[package]] name = "futures-task" -version = "0.3.21" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57c66a976bf5909d801bbef33416c41372779507e7a6b3a5e25e4749c58f776a" +checksum = "fd65540d33b37b16542a0438c12e6aeead10d4ac5d05bd3f805b8f35ab592879" [[package]] name = "futures-util" -version = "0.3.21" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8b7abd5d659d9b90c8cba917f6ec750a74e2dc23902ef9cd4cc8c8b22e6036a" +checksum = "3ef6b17e481503ec85211fed8f39d1970f128935ca1f814cd32ac4a6842e84ab" dependencies = [ "futures-core", "futures-task", @@ -333,11 +421,21 @@ dependencies = [ "version_check", ] +[[package]] +name = "gethostname" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1ebd34e35c46e00bb73e81363248d627782724609fe1b6396f553f68fe3862e" +dependencies = [ + "libc", + "winapi", +] + [[package]] name = "getrandom" -version = "0.2.7" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eb1a864a501629691edf6c15a593b7a51eebaa1e8468e9ddc623de7c9b58ec6" +checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" dependencies = [ "cfg-if", "libc", @@ -346,9 +444,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.13" +version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37a82c6d637fc9515a4694bbf1cb2457b79d81ce52b3108bdeea58b07dd34a57" +checksum = "5be7b54589b581f624f566bf5d8eb2bab1db736c51528720b6bd36b96b55924d" dependencies = [ "bytes", "fnv", @@ -365,15 +463,15 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.11.2" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] name = "heck" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "hermit-abi" @@ -384,11 +482,26 @@ dependencies = [ "libc", ] +[[package]] +name = "hermit-abi" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" +dependencies = [ + "libc", +] + +[[package]] +name = "hermit-abi" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" + [[package]] name = "http" -version = "0.2.7" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff8670570af52249509a86f5e3e18a08c60b177071826898fde8997cf5f6bfbb" +checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" dependencies = [ "bytes", "fnv", @@ -408,9 +521,9 @@ dependencies = [ [[package]] name = "httparse" -version = "1.7.1" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "496ce29bb5a52785b44e0f7ca2847ae0bb839c9bd28f69acac9b99d461c0c04c" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] name = "httpdate" @@ -420,9 +533,9 @@ checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" [[package]] name = "hyper" -version = "0.14.19" +version = "0.14.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42dc3c131584288d375f2d07f822b0cb012d8c6fb899a5b9fdb3cb7eb9b6004f" +checksum = "cc5e554ff619822309ffd57d8734d77cd5ce6238bc956f037ea06c58238c9899" dependencies = [ "bytes", "futures-channel", @@ -457,20 +570,19 @@ dependencies = [ [[package]] name = "idna" -version = "0.2.3" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" +checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" dependencies = [ - "matches", "unicode-bidi", "unicode-normalization", ] [[package]] name = "indexmap" -version = "1.8.2" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6012d540c5baa3589337a98ce73408de9b5a25ec9fc2c6fd6be8f0d39e0ca5a" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", "hashbrown", @@ -485,23 +597,34 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "io-lifetimes" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09270fd4fa1111bc614ed2246c7ef56239a3063d5be0d1ec3b589c505d400aeb" +dependencies = [ + "hermit-abi 0.3.1", + "libc", + "windows-sys 0.45.0", +] + [[package]] name = "ipnet" -version = "2.5.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "879d54834c8c76457ef4293a689b2a8c59b076067ad77b15efafbb05f92a592b" +checksum = "30e22bd8629359895450b59ea7a776c850561b96a3b1d31321c1949d9e6c9146" [[package]] name = "itoa" -version = "1.0.2" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "112c678d4050afce233f4f2852bb2eb519230b3cf12f33585275537d7e41578d" +checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" [[package]] name = "js-sys" -version = "0.3.57" +version = "0.3.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "671a26f820db17c2a2750743f1dd03bafd15b98c9f30c7c2628c024c05d73397" +checksum = "445dde2150c55e483f3d8416706b97ec8e8237c307e5b7b4b8dd15e6af2a0730" dependencies = [ "wasm-bindgen", ] @@ -514,21 +637,27 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.126" +version = "0.2.140" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836" +checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c" [[package]] name = "linked-hash-map" -version = "0.5.4" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fb9b38af92608140b86b693604b9ffcc5824240a484d1ecd4795bacb2fe88f3" +checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" + +[[package]] +name = "linux-raw-sys" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" [[package]] name = "lock_api" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327fa5b6a6940e4699ec49a9beae1ea4845c6bab9314e4f84ac68742139d8c53" +checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" dependencies = [ "autocfg", "scopeguard", @@ -552,41 +681,50 @@ dependencies = [ "libc", ] -[[package]] -name = "matches" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" - [[package]] name = "memchr" version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +[[package]] +name = "memoffset" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" +dependencies = [ + "autocfg", +] + [[package]] name = "mime" -version = "0.3.16" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "minimal-lexical" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "mio" -version = "0.8.3" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "713d550d9b44d89174e066b7a6217ae06234c10cb47819a88290d2b353c31799" +checksum = "5b9d9a46eff5b4ff64b45a9e316a6d1e0bc719ef429cbec4dc630684212bfdf9" dependencies = [ "libc", "log", "wasi", - "windows-sys", + "windows-sys 0.45.0", ] [[package]] name = "native-tls" -version = "0.2.10" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd7e2f3618557f980e0b17e8856252eee3c97fa12c54dff0ca290fb6266ca4a9" +checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" dependencies = [ "lazy_static", "libc", @@ -600,13 +738,111 @@ dependencies = [ "tempfile", ] +[[package]] +name = "nix" +version = "0.24.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa52e972a9a719cecb6864fb88568781eb706bac2cd1d4f04a648542dbf78069" +dependencies = [ + "bitflags", + "cfg-if", + "libc", + "memoffset", +] + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "num" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43db66d1170d347f9a065114077f7dccb00c1b9478c89384490a3425279a4606" +dependencies = [ + "num-bigint", + "num-complex", + "num-integer", + "num-iter", + "num-rational", + "num-traits", +] + +[[package]] +name = "num-bigint" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-complex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02e0d21255c828d6f128a1e41534206671e8c3ea0c62f32291e808dc82cff17d" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-integer" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +dependencies = [ + "autocfg", + "num-traits", +] + +[[package]] +name = "num-iter" +version = "0.1.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" +dependencies = [ + "autocfg", + "num-bigint", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +dependencies = [ + "autocfg", +] + [[package]] name = "num_cpus" -version = "1.13.1" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" +checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" dependencies = [ - "hermit-abi", + "hermit-abi 0.2.6", "libc", ] @@ -641,9 +877,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.12.0" +version = "1.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7709cef83f0c1f58f666e746a08b21e0085f7440fa6a29cc194d68aac97a4225" +checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" [[package]] name = "openssl" @@ -668,7 +904,7 @@ checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -690,11 +926,21 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "os_pipe" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a53dbb20faf34b16087a931834cba2d7a73cc74af2b7ef345a4c8324e2409a12" +dependencies = [ + "libc", + "windows-sys 0.45.0", +] + [[package]] name = "os_str_bytes" -version = "6.1.0" +version = "6.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21326818e99cfe6ce1e524c2a805c189a99b5ae555a35d19f9a284b427d86afa" +checksum = "ceedf44fb00f2d1984b0bc98102627ce622e083e49a5bacdb3e514fa4238e267" [[package]] name = "parking_lot" @@ -708,22 +954,32 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.3" +version = "0.9.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09a279cbf25cb0757810394fbc1e359949b59e348145c643a939a525692e6929" +checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" dependencies = [ "cfg-if", "libc", "redox_syscall", "smallvec", - "windows-sys", + "windows-sys 0.45.0", ] [[package]] name = "percent-encoding" -version = "2.1.0" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" + +[[package]] +name = "petgraph" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" +checksum = "4dd7d28ee937e54fe3080c91faa1c3a46c06de6252988a7f4592ba2310ef22a4" +dependencies = [ + "fixedbitset", + "indexmap", +] [[package]] name = "pin-project-lite" @@ -739,15 +995,15 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" -version = "0.3.25" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae" +checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" [[package]] name = "ppv-lite86" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "proc-macro-error" @@ -758,7 +1014,7 @@ dependencies = [ "proc-macro-error-attr", "proc-macro2", "quote", - "syn", + "syn 1.0.109", "version_check", ] @@ -775,9 +1031,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.39" +version = "1.0.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c54b25569025b7fc9651de43004ae593a75ad88543b17178aa5e1b9c4f15f56f" +checksum = "ba466839c78239c09faf015484e5cc04860f88242cff4d03eb038f04b4699b73" dependencies = [ "unicode-ident", ] @@ -801,11 +1057,20 @@ dependencies = [ "checked_int_cast", ] +[[package]] +name = "quick-xml" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8533f14c8382aaad0d592c812ac3b826162128b65662331e1127b45c3d18536b" +dependencies = [ + "memchr", +] + [[package]] name = "quote" -version = "1.0.18" +version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1feb54ed693b93a84e14094943b84b7c4eae204c512b7ccb95ab0c66d278ad1" +checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" dependencies = [ "proc-macro2", ] @@ -833,38 +1098,46 @@ dependencies = [ [[package]] name = "rand_core" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ "getrandom", ] [[package]] name = "redox_syscall" -version = "0.2.13" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62f25bc4c7e55e0b0b7a1d43fb893f4fa1361d0abe38b9ce4f323c2adfe6ef42" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ "bitflags", ] [[package]] -name = "remove_dir_all" -version = "0.5.3" +name = "regex" +version = "1.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" +checksum = "8b1f693b24f6ac912f4893ef08244d70b6067480d2f1a46e950c9691e6749d1d" dependencies = [ - "winapi", + "aho-corasick", + "memchr", + "regex-syntax", ] +[[package]] +name = "regex-syntax" +version = "0.6.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" + [[package]] name = "reqwest" -version = "0.11.10" +version = "0.11.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46a1f7aa4f35e5e8b4160449f51afc758f0ce6454315a9fa7d0d113e958c41eb" +checksum = "0ba30cc2c0cd02af1222ed216ba659cdb2f879dfe3181852fe7c50b1d0005949" dependencies = [ - "base64", + "base64 0.21.0", "bytes", "encoding_rs", "futures-core", @@ -876,10 +1149,10 @@ dependencies = [ "hyper-tls", "ipnet", "js-sys", - "lazy_static", "log", "mime", "native-tls", + "once_cell", "percent-encoding", "pin-project-lite", "serde", @@ -887,6 +1160,7 @@ dependencies = [ "serde_urlencoded", "tokio", "tokio-native-tls", + "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", @@ -894,20 +1168,33 @@ dependencies = [ "winreg", ] +[[package]] +name = "rustix" +version = "0.36.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db4165c9963ab29e422d6c26fbc1d37f15bace6b2810221f9d925023480fcf0e" +dependencies = [ + "bitflags", + "errno", + "io-lifetimes", + "libc", + "linux-raw-sys", + "windows-sys 0.45.0", +] + [[package]] name = "ryu" -version = "1.0.10" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3f6f92acf49d1b98f7a81226834412ada05458b7364277387724a237f062695" +checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" [[package]] name = "schannel" -version = "0.1.20" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88d6731146462ea25d9244b2ed5fd1d716d25c52e4d54aa4fb0f3c4e9854dbe2" +checksum = "713cfb06c7059f3588fb8044c0fad1d09e3c01d225e25b9220dbfdcf16dbb1b3" dependencies = [ - "lazy_static", - "windows-sys", + "windows-sys 0.42.0", ] [[package]] @@ -918,9 +1205,9 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "security-framework" -version = "2.6.1" +version = "2.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dc14f172faf8a0194a3aded622712b0de276821addc574fa54fc0a1167e10dc" +checksum = "a332be01508d814fed64bf28f798a146d73792121129962fdf335bb3c49a4254" dependencies = [ "bitflags", "core-foundation", @@ -931,9 +1218,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.6.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0160a13a177a45bfb43ce71c01580998474f556ad854dcbca936dd2841a5c556" +checksum = "31c9bb296072e961fcbd8853511dd39c2d8be2deb1e17c6860b1d30732b323b4" dependencies = [ "core-foundation-sys", "libc", @@ -941,29 +1228,29 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.137" +version = "1.0.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61ea8d54c77f8315140a05f4c7237403bf38b72704d031543aa1d16abbf517d1" +checksum = "771d4d9c4163ee138805e12c710dd365e4f44be8be0503cb1bb9eb989425d9c9" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.137" +version = "1.0.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f26faba0c3959972377d3b2d306ee9f71faee9714294e41bb777f83f88578be" +checksum = "e801c1712f48475582b7696ac71e0ca34ebb30e09338425384269d9717c62cad" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.10", ] [[package]] name = "serde_json" -version = "1.0.81" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b7ce2b32a1aed03c558dc61a5cd328f15aff2dbc17daad8fb8af04d2100e15c" +checksum = "1c533a59c9d8a93a09c6ab31f0fd5e5f4dd1b8fc9434804029839884765d04ea" dependencies = [ "itoa", "ryu", @@ -984,9 +1271,9 @@ dependencies = [ [[package]] name = "serde_yaml" -version = "0.8.24" +version = "0.8.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "707d15895415db6628332b737c838b88c598522e4dc70647e59b72312924aebc" +checksum = "578a7433b776b56a35785ed5ce9a7e777ac0598aac5a6dd1b4b18a307c7fc71b" dependencies = [ "indexmap", "ryu", @@ -996,9 +1283,9 @@ dependencies = [ [[package]] name = "sha-1" -version = "0.10.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "028f48d513f9678cda28f6e4064755b3fbb2af6acd672f2c209b62323f7aea0f" +checksum = "f5058ada175748e33390e40e872bd0fe59a19f265d0158daa551c5a88a76009c" dependencies = [ "cfg-if", "cpufeatures", @@ -1009,9 +1296,8 @@ dependencies = [ name = "siera" version = "0.1.0" dependencies = [ - "base64", + "base64 0.13.1", "clap", - "clipboard", "colored", "qr2term", "serde", @@ -1074,18 +1360,19 @@ dependencies = [ name = "siera-logger" version = "0.1.0" dependencies = [ - "clipboard", + "cli-clipboard", "colored", "lazy_static", "serde", "serde_json", + "xcb", ] [[package]] name = "signal-hook" -version = "0.3.14" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a253b5e89e2698464fc26b545c9edceb338e18a89effeeecfea192c3025be29d" +checksum = "732768f1176d21d09e076c23a93123d40bba92d50c4058da34d45c8de8e682b9" dependencies = [ "libc", "signal-hook-registry", @@ -1104,35 +1391,53 @@ dependencies = [ [[package]] name = "signal-hook-registry" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51e73328dc4ac0c7ccbda3a494dfa03df1de2f46018127f60c693f2648455b0" +checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" dependencies = [ "libc", ] [[package]] name = "slab" -version = "0.4.6" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb703cfe953bccee95685111adeedb76fabe4e97549a58d16f03ea7b9367bb32" +checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" +dependencies = [ + "autocfg", +] [[package]] name = "smallvec" -version = "1.8.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2dd574626839106c320a323308629dcb1acfc96e32a8cba364ddc61ac23ee83" +checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" [[package]] name = "socket2" -version = "0.4.4" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66d72b759436ae32898a2af0a14218dbf55efde3feeb170eb623637db85ee1e0" +checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" dependencies = [ "libc", "winapi", ] +[[package]] +name = "speculoos" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65881c9270d6157f30a09233305da51bed97eef9192d0ea21e57b1c8f05c3620" +dependencies = [ + "num", +] + +[[package]] +name = "str-buf" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e08d8363704e6c71fc928674353e6b7c23dcea9d82d7012c8faf2a3a025f8d0" + [[package]] name = "strsim" version = "0.10.0" @@ -1141,9 +1446,20 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "syn" -version = "1.0.95" +version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbaf6116ab8924f39d52792136fb74fd60a80194cf1b1c6ffa6453eef1c3f942" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5aad1363ed6d37b84299588d62d3a7d95b5a5c2d9aad5c85609fda12afaa1f40" dependencies = [ "proc-macro2", "quote", @@ -1152,51 +1468,50 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.3.0" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" +checksum = "af18f7ae1acd354b992402e9ec5864359d693cd8a79dcbef59f76891701c1e95" dependencies = [ "cfg-if", "fastrand", - "libc", "redox_syscall", - "remove_dir_all", - "winapi", + "rustix", + "windows-sys 0.42.0", ] [[package]] name = "termcolor" -version = "1.1.3" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" +checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" dependencies = [ "winapi-util", ] [[package]] name = "textwrap" -version = "0.15.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1141d4d61095b28419e22cb0bbf02755f5e54e0526f97f1e3d1d160e60885fb" +checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" [[package]] name = "thiserror" -version = "1.0.34" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c1b05ca9d106ba7d2e31a9dab4a64e7be2cce415321966ea3132c49a656e252" +checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.34" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8f2591983642de85c921015f3f070c665a197ed69e417af436115e3a1407487" +checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.10", ] [[package]] @@ -1210,16 +1525,17 @@ dependencies = [ [[package]] name = "tinyvec_macros" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.18.5" +version = "1.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e050c618355082ae5a89ec63bbf897225d5ffe84c7c4e036874e4d185a5044e" +checksum = "03201d01c3c27a29c8a5cee5b55a93ddae1ccf6f08f65365c2c918f8c1b76f64" dependencies = [ + "autocfg", "bytes", "libc", "memchr", @@ -1230,25 +1546,25 @@ dependencies = [ "signal-hook-registry", "socket2", "tokio-macros", - "winapi", + "windows-sys 0.45.0", ] [[package]] name = "tokio-macros" -version = "1.7.0" +version = "1.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b557f72f448c511a979e2564e55d74e6c4432fc96ff4f6241bc6bded342643b7" +checksum = "d266c00fde287f55d3f1c3e96c500c362a2b8c695076ec180f27918820bc6df8" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] name = "tokio-native-tls" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" dependencies = [ "native-tls", "tokio", @@ -1256,9 +1572,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.2" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f988a1a1adc2fb21f9c12aa96441da33a1728193ae0b95d2be22dbd17fcb4e5c" +checksum = "5427d89453009325de0d8f342c9490009f76e999cb7672d77e46267448f7e6b2" dependencies = [ "bytes", "futures-core", @@ -1270,47 +1586,49 @@ dependencies = [ [[package]] name = "tower-service" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] name = "tracing" -version = "0.1.34" +version = "0.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d0ecdcb44a79f0fe9844f0c4f33a342cbcbb5117de8001e6ba0dc2351327d09" +checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" dependencies = [ "cfg-if", "pin-project-lite", - "tracing-attributes", "tracing-core", ] [[package]] -name = "tracing-attributes" -version = "0.1.21" +name = "tracing-core" +version = "0.1.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc6b8ad3567499f98a1db7a752b07a7c8c7c7c34c332ec00effb2b0027974b7c" +checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" dependencies = [ - "proc-macro2", - "quote", - "syn", + "once_cell", ] [[package]] -name = "tracing-core" -version = "0.1.26" +name = "tree_magic_mini" +version = "3.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f54c8ca710e81886d498c2fd3331b56c93aa248d49de2222ad2742247c60072f" +checksum = "91adfd0607cacf6e4babdb870e9bec4037c1c4b151cfd279ccefc5e0c7feaa6d" dependencies = [ + "bytecount", + "fnv", "lazy_static", + "nom", + "once_cell", + "petgraph", ] [[package]] name = "try-lock" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" +checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" [[package]] name = "tungstenite" @@ -1318,7 +1636,7 @@ version = "0.17.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e27992fd6a8c29ee7eef28fc78349aa244134e10ad447ce3b9f0ac0ed0fa4ce0" dependencies = [ - "base64", + "base64 0.13.1", "byteorder", "bytes", "http", @@ -1334,40 +1652,39 @@ dependencies = [ [[package]] name = "typenum" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" +checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" [[package]] name = "unicode-bidi" -version = "0.3.8" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" +checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.0" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d22af068fba1eb5edcb4aea19d382b2a3deb4c8f9d475c589b6ada9e0fd493ee" +checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" [[package]] name = "unicode-normalization" -version = "0.1.19" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54590932941a9e9266f0832deed84ebe1bf2e4c9e4a3554d393d18f5e854bf9" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" dependencies = [ "tinyvec", ] [[package]] name = "url" -version = "2.2.2" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c" +checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" dependencies = [ "form_urlencoded", "idna", - "matches", "percent-encoding", ] @@ -1407,9 +1724,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.80" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27370197c907c55e3f1a9fbe26f44e937fe6451368324e009cba39e139dc08ad" +checksum = "31f8dcbc21f30d9b8f2ea926ecb58f6b91192c17e9d33594b3df58b2007ca53b" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -1417,24 +1734,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.80" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53e04185bfa3a779273da532f5025e33398409573f348985af9a1cbf3774d3f4" +checksum = "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9" dependencies = [ "bumpalo", - "lazy_static", "log", + "once_cell", "proc-macro2", "quote", - "syn", + "syn 1.0.109", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.30" +version = "0.4.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f741de44b75e14c35df886aff5f1eb73aa114fa5d4d00dcd37b5e01259bf3b2" +checksum = "f219e0d211ba40266969f6dbdd90636da12f75bee4fc9d6c23d1260dadb51454" dependencies = [ "cfg-if", "js-sys", @@ -1444,9 +1761,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.80" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17cae7ff784d7e83a2fe7611cfe766ecf034111b49deb850a3dc7699c08251f5" +checksum = "4c21f77c0bedc37fd5dc21f897894a5ca01e7bb159884559461862ae90c0b4c5" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1454,28 +1771,87 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.80" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99ec0dc7a4756fffc231aab1b9f2f578d23cd391390ab27f952ae0c9b3ece20b" +checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.80" +version = "0.2.84" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d" + +[[package]] +name = "wayland-client" +version = "0.29.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d554b7f530dee5964d9a9468d95c1f8b8acae4f282807e7d27d4b03099a46744" +checksum = "3f3b068c05a039c9f755f881dc50f01732214f5685e379829759088967c46715" +dependencies = [ + "bitflags", + "downcast-rs", + "libc", + "nix", + "wayland-commons", + "wayland-scanner", + "wayland-sys", +] + +[[package]] +name = "wayland-commons" +version = "0.29.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8691f134d584a33a6606d9d717b95c4fa20065605f798a3f350d78dced02a902" +dependencies = [ + "nix", + "once_cell", + "smallvec", + "wayland-sys", +] + +[[package]] +name = "wayland-protocols" +version = "0.29.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b950621f9354b322ee817a23474e479b34be96c2e909c14f7bc0100e9a970bc6" +dependencies = [ + "bitflags", + "wayland-client", + "wayland-commons", + "wayland-scanner", +] + +[[package]] +name = "wayland-scanner" +version = "0.29.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f4303d8fa22ab852f789e75a967f0a2cdc430a607751c0499bada3e451cbd53" +dependencies = [ + "proc-macro2", + "quote", + "xml-rs", +] + +[[package]] +name = "wayland-sys" +version = "0.29.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be12ce1a3c39ec7dba25594b97b42cb3195d54953ddb9d3d95a7c3902bc6e9d4" +dependencies = [ + "pkg-config", +] [[package]] name = "web-sys" -version = "0.3.57" +version = "0.3.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b17e741662c70c8bd24ac5c5b18de314a2c26c32bf8346ee1e6f53de919c283" +checksum = "e33b99f4b23ba3eec1a53ac264e35a755f00e966e0065077d6027c0f575b0b97" dependencies = [ "js-sys", "wasm-bindgen", @@ -1506,6 +1882,15 @@ dependencies = [ "winapi", ] +[[package]] +name = "winapi-wsapoll" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44c17110f57155602a80dca10be03852116403c9ff3cd25b079d666f2aa3df6e" +dependencies = [ + "winapi", +] + [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" @@ -1514,46 +1899,84 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows-sys" -version = "0.36.1" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows-sys" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" dependencies = [ + "windows_aarch64_gnullvm", "windows_aarch64_msvc", "windows_i686_gnu", "windows_i686_msvc", "windows_x86_64_gnu", + "windows_x86_64_gnullvm", "windows_x86_64_msvc", ] +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + [[package]] name = "windows_aarch64_msvc" -version = "0.36.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" [[package]] name = "windows_i686_gnu" -version = "0.36.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" [[package]] name = "windows_i686_msvc" -version = "0.36.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" [[package]] name = "windows_x86_64_gnu" -version = "0.36.1" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" [[package]] name = "windows_x86_64_msvc" -version = "0.36.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" [[package]] name = "winreg" @@ -1564,25 +1987,72 @@ dependencies = [ "winapi", ] +[[package]] +name = "wl-clipboard-rs" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "981a303dfbb75d659f6612d05a14b2e363c103d24f676a2d44a00d18507a1ad9" +dependencies = [ + "derive-new", + "libc", + "log", + "nix", + "os_pipe", + "tempfile", + "thiserror", + "tree_magic_mini", + "wayland-client", + "wayland-protocols", +] + [[package]] name = "x11-clipboard" -version = "0.3.3" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89bd49c06c9eb5d98e6ba6536cf64ac9f7ee3a009b2f53996d405b3944f6bcea" +checksum = "980b9aa9226c3b7de8e2adb11bf20124327c054e0e5812d2aac0b5b5a87e7464" dependencies = [ - "xcb", + "x11rb", +] + +[[package]] +name = "x11rb" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "592b4883219f345e712b3209c62654ebda0bb50887f330cbd018d0f654bfd507" +dependencies = [ + "gethostname", + "nix", + "winapi", + "winapi-wsapoll", + "x11rb-protocol", +] + +[[package]] +name = "x11rb-protocol" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56b245751c0ac9db0e006dc812031482784e434630205a93c73cfefcaabeac67" +dependencies = [ + "nix", ] [[package]] name = "xcb" -version = "0.8.2" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e917a3f24142e9ff8be2414e36c649d47d6cc2ba81f16201cdef96e533e02de" +checksum = "0faeb4d7e2d54fff4a0584f61297e86b106914af2029778de7b427f72564d6c5" dependencies = [ + "bitflags", "libc", - "log", + "quick-xml", ] +[[package]] +name = "xml-rs" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2d7d3948613f75c98fd9328cfdcc45acc4d360655289d0a7d4ec931392200a3" + [[package]] name = "yaml-rust" version = "0.4.5" diff --git a/Cargo.toml b/Cargo.toml index 0d1d15b3..d2d51bae 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [workspace] -members = ["crates/*"] +members = ["crates/*", "tests"] [workspace.package] version = "0.1.0" diff --git a/Makefile b/Makefile deleted file mode 100644 index 56dd45ca..00000000 --- a/Makefile +++ /dev/null @@ -1,23 +0,0 @@ -default: format lint build e2e-test - -format: - cargo fmt - -lint: - cargo clippy - -lint-strict: - cargo clippy -- -D clippy::all -D clippy::pedantic -D clippy::nursery -D clippy::missing_docs_in_private_items -A clippy::struct_excessive_bools -A clippy::module_name_repetitions -A clippy::only_used_in_recursion - -build: - cargo build --release - -test: - bash ./tests/run.sh - -# It is important that e2e tests are run serially on a single thread -e2e-test: - cargo test - -install: - cargo install --path . diff --git a/crates/afj-rest/src/agent.rs b/crates/afj-rest/src/agent.rs index 849f8f59..3e436f11 100644 --- a/crates/afj-rest/src/agent.rs +++ b/crates/afj-rest/src/agent.rs @@ -30,13 +30,13 @@ impl std::fmt::Display for CloudAgentAfjRestVersion { let v = match self { CloudAgentAfjRestVersion::ZeroEightZero => "0.8.0", }; - write!(f, "{}", v) + write!(f, "{v}") } } impl std::fmt::Display for CloudAgentAfjRest { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "AFJ {}", self.version) + write!(f, "AFJ {0}", self.version) } } diff --git a/crates/afj-rest/src/cloudagent/connection.rs b/crates/afj-rest/src/cloudagent/connection.rs index 7c58da80..f0f45b00 100644 --- a/crates/afj-rest/src/cloudagent/connection.rs +++ b/crates/afj-rest/src/cloudagent/connection.rs @@ -24,7 +24,7 @@ pub struct Response { impl ConnectionModule for CloudAgentAfjRest { async fn get_all(&self, options: ConnectionGetAllOptions) -> Result> { let has_defined_value = has_any_value_in_struct!( - options, + options; alias, connection_protocol, invitation_key, diff --git a/crates/afj-rest/src/cloudagent/credential_definition.rs b/crates/afj-rest/src/cloudagent/credential_definition.rs index 3e8f5ab6..dde03385 100644 --- a/crates/afj-rest/src/cloudagent/credential_definition.rs +++ b/crates/afj-rest/src/cloudagent/credential_definition.rs @@ -30,6 +30,6 @@ impl CredentialDefinitionModule for CloudAgentAfjRest { } async fn get_all(&self) -> Result { - Err(Error::CommandNotAvailable(format!("{}", self)).into()) + Err(Error::CommandNotAvailable(format!("{self}")).into()) } } diff --git a/crates/afj-rest/src/cloudagent/schema.rs b/crates/afj-rest/src/cloudagent/schema.rs index 33239c11..2d4d1931 100644 --- a/crates/afj-rest/src/cloudagent/schema.rs +++ b/crates/afj-rest/src/cloudagent/schema.rs @@ -23,6 +23,6 @@ impl SchemaModule for CloudAgentAfjRest { } async fn get_all(&self) -> Result { - Err(Error::CommandNotAvailable(format!("{}", self)).into()) + Err(Error::CommandNotAvailable(format!("{self}")).into()) } } diff --git a/crates/afj-rest/src/lib.rs b/crates/afj-rest/src/lib.rs index 8d6d1599..2deaf42b 100644 --- a/crates/afj-rest/src/lib.rs +++ b/crates/afj-rest/src/lib.rs @@ -2,8 +2,6 @@ //! a minimal wrapper and does not do a lot of conversion and just sends it back to any frontend //! which relies on this. -#![deny(clippy::missing_docs_in_private_items)] - #[macro_use] extern crate siera_logger; diff --git a/crates/afj-rest/src/macros.rs b/crates/afj-rest/src/macros.rs index 18167e51..78e2e15b 100644 --- a/crates/afj-rest/src/macros.rs +++ b/crates/afj-rest/src/macros.rs @@ -4,13 +4,9 @@ /// { foo: Some(bar), bar: None } // true /// { foo: None, bar: None } // false macro_rules! has_any_value_in_struct { - ($options:expr, $($field:ident),*) => { + ($options:expr; $($field:ident),+ $(,)?) => { { - let mut query = Vec::new(); - $( - query.push($options.$field); - )* - query.iter().any(|v| v.is_some()) + vec![$($options.$field),+].iter().any(|v| v.is_some()) } }; } diff --git a/crates/agent/src/error.rs b/crates/agent/src/error.rs index 951f9e55..0ad16acd 100644 --- a/crates/agent/src/error.rs +++ b/crates/agent/src/error.rs @@ -50,14 +50,14 @@ impl Display for Error { Error::AuthorizationFailed => write!(f, "Failed to authorize. Api-key or authorization token is either wrong or missing."), Error::UnableToParseResponse => write!(f, "Unable to parse the response from the server. Is the cloudagent the correct version?"), Error::UrlDoesNotExist => write!(f, "Path does not exist on agent URL. This can happen when querying by id and the id is not valid or when attempting to use a feature that is not supported on the cloudagent."), - Error::UnknownResponseStatusCode(msg) => write!(f, "Received unknown status code from the server. Agent URL is likely incorrect. If the agent URL is correct, please report this error at https://github.com/animo/siera/issues/new \nAdditional info: {}", msg), - Error::InternalServerError(status, msg) => write!(f, "Internal Server Error (status code: {})! Message: {}", status, msg), + Error::UnknownResponseStatusCode(msg) => write!(f, "Received unknown status code from the server. Agent URL is likely incorrect. If the agent URL is correct, please report this error at https://github.com/animo/siera/issues/new \nAdditional info: {msg}"), + Error::InternalServerError(status, msg) => write!(f, "Internal Server Error (status code: {status})! Message: {msg}"), Error::UnreachableUrl => write!(f, "Provided url is unreachable. Is the provided agent URL valid?"), Error::HttpServiceUnavailable => write!(f, "Cloudagent is currently unavailable. Are you sure the agent is online?"), - Error::UnableToParseOutValue(val) => write!(f, "Unable to parse the predicate values from: {}. The following structure is required: (name,operator,value)", val), - Error::InvalidOperator(op) => write!(f, "Invalid Operator ({}). \">=\", \"<=\", \"=\", \"<\" and \">\" are allowed.", op), - Error::InvalidAgentUrl(url) => write!(f, "Invalid agent url ({})", url), - Error::CommandNotAvailable(agent) => write!(f, "Agent '{}' does not support this command", agent), + Error::UnableToParseOutValue(val) => write!(f, "Unable to parse the predicate values from: {val}. The following structure is required: (name,operator,value)"), + Error::InvalidOperator(op) => write!(f, "Invalid Operator ({op}). \">=\", \"<=\", \"=\", \"<\" and \">\" are allowed."), + Error::InvalidAgentUrl(url) => write!(f, "Invalid agent url ({url})"), + Error::CommandNotAvailable(agent) => write!(f, "Agent '{agent}' does not support this command"), } } } diff --git a/crates/agent/src/lib.rs b/crates/agent/src/lib.rs index a67342b5..e8b11581 100644 --- a/crates/agent/src/lib.rs +++ b/crates/agent/src/lib.rs @@ -2,8 +2,6 @@ //! or aries-framework-javascript REST. This does not contain any functionality as that should be //! handled by the other crates implementing this crate -#![deny(clippy::missing_docs_in_private_items)] - /// Error module that includes the user-level errors and the result type pub mod error; diff --git a/crates/automations/src/lib.rs b/crates/automations/src/lib.rs index 8917c388..4d1479f7 100644 --- a/crates/automations/src/lib.rs +++ b/crates/automations/src/lib.rs @@ -2,8 +2,6 @@ //! includes scripts like automatically create a connection, register the //! schema and credential definition and issue the credential afterwards. -#![deny(clippy::missing_docs_in_private_items)] - #[macro_use] extern crate siera_logger; diff --git a/crates/cli/Cargo.toml b/crates/cli/Cargo.toml index 2a4cfe94..cc19eacd 100644 --- a/crates/cli/Cargo.toml +++ b/crates/cli/Cargo.toml @@ -19,7 +19,6 @@ siera-cloudagent-python = { path = "../cloudagent-python", version = "0.*" } siera-logger = { path = "../logger", version = "0.*" } base64 = "0.13.0" clap = { version = "3.1.0", features = ["derive"] } -clipboard = "0.5.0" colored = "2.0.0" qr2term = "0.2.2" serde = { version = "1.0.130", features = ["derive"] } diff --git a/crates/cli/src/error.rs b/crates/cli/src/error.rs index 339bf30e..1e90477e 100644 --- a/crates/cli/src/error.rs +++ b/crates/cli/src/error.rs @@ -67,7 +67,7 @@ impl Display for Error { match self { Self::CannotReadConfigurationFile => write!(f, "Cannot not read configuration file. Try initializing first using: `siera configuration add --default`."), Self::InvalidConfigurationPath => write!(f, "Invalid configuration path."), - Self::InvalidEnvironment(env) => write!(f, "The environment {} does not exist.", env), + Self::InvalidEnvironment(env) => write!(f, "The environment {env} does not exist."), Self::NoAgentURLSupplied => write!(f, "No agent URL supplied. Supply an agent URL either via `--agent-url` or see `siera configuration --help` to learn about setting up an environment."), Self::NoEnvironmentSupplied => write!(f, "No Environment supplied. Supply the environment either via `--environment` or see `siera configuration --help` to learn about setting up an environment."), Self::UnequalAmountKeyValue => write!(f, "Supplies keys and values are not equal in size."), @@ -78,9 +78,9 @@ impl Display for Error { Self::InvalidAgentInvitation => write!(f, "The supplied agent url is incorrect. Make sure it contains the `c_i` query parameter and that the invitation part is correctly base64 encoded."), Self::InactiveConnection => write!(f, "The connection was not activated within the specified time. Please try again with a higher --timeout."), Self::EmptyConfiguration => write!(f, "Unable to delete from an empty configuration"), - Self::PredicateValueNonNumber(name, val) => write!(f, "Predicate value {}, for name {}, is not of type number.", val, name), - Self::InvalidAgent(agent) => write!(f, "Invalid agent '{}' supplied. Choose one of the following: 'aca-py' or 'afj'. (aca-py is default)", agent), - Self::SubcommandNotRegisteredForAgent(subcommand, agent) => write!(f, "Subcommand '{}' is not registered for {}.", subcommand, agent) + Self::PredicateValueNonNumber(name, val) => write!(f, "Predicate value {val}, for name {name}, is not of type number."), + Self::InvalidAgent(agent) => write!(f, "Invalid agent '{agent}' supplied. Choose one of the following: 'aca-py' or 'afj'. (aca-py is default)"), + Self::SubcommandNotRegisteredForAgent(subcommand, agent) => write!(f, "Subcommand '{subcommand}' is not registered for {agent}.") } } } diff --git a/crates/cli/src/help_strings.rs b/crates/cli/src/help_strings.rs index 14fbcf65..e5a7bc5c 100644 --- a/crates/cli/src/help_strings.rs +++ b/crates/cli/src/help_strings.rs @@ -2,7 +2,6 @@ use std::convert::From; /// Help documentation for CLI commands. - pub enum HelpStrings { // Top level Cli, @@ -153,6 +152,7 @@ impl From for Option<&str> { } } +#[allow(clippy::too_many_lines)] impl HelpStrings { const fn as_str(&self) -> &'static str { match self { @@ -274,14 +274,13 @@ impl HelpStrings { Self::Wallet => "Interacts with a wallet", Self::WalletCreate => "Create a local DID", Self::WalletCreateMethod => "The did method. One of 'key' or 'sov'", - Self::WalletCreateOptions => "Key types are e.g. ed25519, bls12381g2", + Self::WalletCreateOptions | Self::WalletListKeyType => "Key types are e.g. ed25519, bls12381g2", Self::WalletEndpoint => "The endpoint url", Self::WalletEndpointType => "The endpoint type. E.g. 'Endpoint'", Self::WalletFetchDidEndpoint => "Get the endpoint information associated with a DID", Self::WalletGetPublic => "Get the public DID of the wallet", Self::WalletList => "Query for DID associated with a wallet", Self::WalletListDid => "A DID to query for", - Self::WalletListKeyType => "Key types are e.g. ed25519, bls12381g2", Self::WalletListMethod => "DID method to query for. e.g. sov to only fetch indy/sov DIDs Available values : key, sov", Self::WalletListPosture => "The DID posture specifying whether the DID is the current public DID, posted to ledger but current public DID, or local to the wallet. Available values : public, posted, wallet_only", Self::WalletListVerkey => "The verification key of interest", diff --git a/crates/cli/src/main.rs b/crates/cli/src/main.rs index 5c946ea8..d4a86673 100644 --- a/crates/cli/src/main.rs +++ b/crates/cli/src/main.rs @@ -2,8 +2,6 @@ //! by some options, flags and subcommands. This is agent agnostic as long as //! it implements the `agent module`. -#![deny(clippy::missing_docs_in_private_items)] - /// Access logger macros #[macro_use] extern crate siera_logger; diff --git a/crates/cli/src/modules/automation.rs b/crates/cli/src/modules/automation.rs index a9230a91..c05beab8 100644 --- a/crates/cli/src/modules/automation.rs +++ b/crates/cli/src/modules/automation.rs @@ -128,7 +128,7 @@ pub async fn parse_automation_args( log_debug!("Looping {} times", timeout); for i in 1..=*timeout { let connection = - ConnectionModule::get_by_id(&agent, connection.id.to_owned()).await?; + ConnectionModule::get_by_id(&agent, connection.id.clone()).await?; if connection.state != "active" && connection.state != "response" { log_trace!( "Connection state is not active, waiting 1 second then trying again..." diff --git a/crates/cli/src/modules/basic_message.rs b/crates/cli/src/modules/basic_message.rs index 8c3d5efd..0df90c19 100644 --- a/crates/cli/src/modules/basic_message.rs +++ b/crates/cli/src/modules/basic_message.rs @@ -29,6 +29,6 @@ pub async fn parse_basic_message_args( }; agent.send_message(send_options).await.map(|_| { loader.stop(); - log!("Successfully sent message") + log!("Successfully sent message"); }) } diff --git a/crates/cli/src/register.rs b/crates/cli/src/register.rs index c60365f1..6b5daa40 100644 --- a/crates/cli/src/register.rs +++ b/crates/cli/src/register.rs @@ -82,10 +82,11 @@ pub async fn register() -> Result<()> { Commands::Schema(options) => parse_schema_args(options, agent).await, Commands::Wallet(options) => parse_wallet_args(options, agent).await, Commands::Webhook(_) => parse_webhook_args(agent).await, - _ => Err( - Error::SubcommandNotRegisteredForAgent(cli.commands.into(), "aca-py") - .into(), - ), + Commands::Configuration(_) => Err(Error::SubcommandNotRegisteredForAgent( + cli.commands.into(), + "aca-py", + ) + .into()), } } "afj" => { diff --git a/crates/cloudagent-python/src/cloudagent/webhook.rs b/crates/cloudagent-python/src/cloudagent/webhook.rs index 84a2a14e..22505418 100644 --- a/crates/cloudagent-python/src/cloudagent/webhook.rs +++ b/crates/cloudagent-python/src/cloudagent/webhook.rs @@ -15,8 +15,8 @@ impl WebhookModule for CloudAgentPython { s => return Err(Error::InvalidAgentUrl(s.clone()).into()), }; - let listen_url = format!("wss://{}/ws", stripped_agent_url); - log!("Listening on {}", listen_url); + let listen_url = format!("wss://{stripped_agent_url}/ws"); + log!("Listening on {listen_url}"); let (mut socket, _response) = connect(listen_url)?; diff --git a/crates/cloudagent-python/src/lib.rs b/crates/cloudagent-python/src/lib.rs index 4e003699..50916e7a 100644 --- a/crates/cloudagent-python/src/lib.rs +++ b/crates/cloudagent-python/src/lib.rs @@ -3,8 +3,6 @@ //! not do a lot of conversion and just sends it back to any frontend which //! relies on this. -#![deny(clippy::missing_docs_in_private_items)] - #[macro_use] extern crate siera_logger; diff --git a/crates/cloudagent-python/src/web.rs b/crates/cloudagent-python/src/web.rs index 13c6d316..9645438f 100644 --- a/crates/cloudagent-python/src/web.rs +++ b/crates/cloudagent-python/src/web.rs @@ -86,7 +86,7 @@ impl CloudAgentPython { }; let client = match &self.auth_token { - Some(t) => client.header("Authorization", format!("Bearer {}", t)), + Some(token) => client.header("Authorization", format!("Bearer {token}")), None => client, }; diff --git a/crates/logger/Cargo.toml b/crates/logger/Cargo.toml index a7eb85d5..ca0b13ad 100644 --- a/crates/logger/Cargo.toml +++ b/crates/logger/Cargo.toml @@ -12,7 +12,8 @@ license.workspace = true readme.workspace = true [dependencies] -clipboard = "0.5.0" +cli-clipboard = "0.4.0" +xcb = "1.2.0" serde = { version = "1.0.130", features = ["derive"] } lazy_static = "1.4.0" serde_json = "1.0.68" diff --git a/crates/logger/src/lib.rs b/crates/logger/src/lib.rs index babf125d..98320826 100644 --- a/crates/logger/src/lib.rs +++ b/crates/logger/src/lib.rs @@ -1,9 +1,7 @@ //! Logger for this crate //! Only cli bindings for now -#![deny(clippy::missing_docs_in_private_items)] - -use clipboard::{ClipboardContext, ClipboardProvider}; +use cli_clipboard::{ClipboardContext, ClipboardProvider}; use colored::Colorize; use serde::Serialize; use std::fmt; @@ -48,7 +46,7 @@ impl fmt::Display for LogLevel { Self::Trace => "trace".bold().purple(), Self::Off => "off".green(), }; - write!(f, "{}", s) + write!(f, "{s}") } } diff --git a/tests/Cargo.toml b/tests/Cargo.toml new file mode 100644 index 00000000..dcab66ac --- /dev/null +++ b/tests/Cargo.toml @@ -0,0 +1,17 @@ +[package] +name = "e2e-tests" + +version.workspace = true +edition.workspace = true +publish = false + +[dev-dependencies] +regex = "1.7.1" +serde_json = "1.0.94" +siera-agent = { path = "../crates/agent", version = "0.*" } +speculoos = "0.11.0" +tokio = { version = "1.26.0", features = ["macros", "rt"] } + +[[test]] +name = "end-to-end-tests" +path = "e2e.rs" diff --git a/tests/e2e.rs b/tests/e2e.rs index f93ddc57..8dbff0da 100644 --- a/tests/e2e.rs +++ b/tests/e2e.rs @@ -3,39 +3,42 @@ mod macros; mod utils; -use siera_agent::modules::connection::Connection; -use regex::Regex; -use speculoos::prelude::*; -use utils::helpers::{run_test, REGEX_UUID}; +#[cfg(test)] +mod e2e_tests { + use super::utils::helpers::{run_test, REGEX_UUID}; + use regex::Regex; + use siera_agent::modules::connection::Connection; + use speculoos::prelude::*; -test! { smoke |cli| { - let re = Regex::new(r"^siera \d\.\d.\d").unwrap(); - let ret = siera!(cli, "--version"); - assert_that(&ret).matches(|v| re.is_match(v)) -}} + test! { smoke |cli| { + let re = Regex::new(r"^siera \d\.\d.\d").unwrap(); + let ret = siera!(cli, "--version"); + assert_that(&ret).matches(|v| re.is_match(v)); + }} -test! { create_a_connection_and_list_connections |cli| { - let connections = siera!(cli, "connection list"); - assert_that(&connections).is_equal_to(String::from("[]")); - siera!(cli, "connection invite"); - let connections = siera!(cli, "connection list"); - let connections: Vec = serde_json::from_str(&connections).unwrap(); - assert_that(&connections).has_length(1); -}} + test! { create_a_connection_and_list_connections |cli| { + let connections = siera!(cli, "connection list"); + assert_that(&connections).is_equal_to(String::from("[]")); + siera!(cli, "connection invite"); + let connections = siera!(cli, "connection list"); + let connections: Vec = serde_json::from_str(&connections).unwrap(); + assert_that(&connections).has_length(1); + }} -test! { create_connection_and_send_a_message |cli| { - siera!(cli, "connection invite"); - let connections_str = siera!(cli, "connection list"); - let connection: Vec = serde_json::from_str(&connections_str).unwrap(); - let result = siera!(cli, "message --connection-id={} --message={}", connection[0].id, "bar"); - assert_that(&result).is_equal_to(String::from("Successfully sent message")) -}} + test! { create_connection_and_send_a_message |cli| { + siera!(cli, "connection invite"); + let connections_str = siera!(cli, "connection list"); + let connection: Vec = serde_json::from_str(&connections_str).unwrap(); + let result = siera!(cli, "message --connection-id={} --message={}", connection[0].id, "bar"); + assert_that(&result).is_equal_to(String::from("Successfully sent message")); + }} -test! { create_invitation_and_receive_invitation |cli| { - let invitation_str = siera!(cli, "connection invite"); - let list = invitation_str.split('\n').collect::>(); - let url = list.get(1).unwrap(); - let result = siera!(cli, "connection receive --url={}", *url); - let re = Regex::new(REGEX_UUID).unwrap(); - assert_that(&result).matches(|v| re.is_match(v)) -}} + test! { create_invitation_and_receive_invitation |cli| { + let invitation_str = siera!(cli, "connection invite"); + let list = invitation_str.split('\n').collect::>(); + let url = list.get(1).unwrap(); + let result = siera!(cli, "connection receive --url={}", *url); + let re = Regex::new(REGEX_UUID).unwrap(); + assert_that(&result).matches(|v| re.is_match(v)); + }} +} diff --git a/tests/run.sh b/tests/run.sh deleted file mode 100755 index 30868286..00000000 --- a/tests/run.sh +++ /dev/null @@ -1,90 +0,0 @@ -#!/usr/bin/env bash - -ENDPOINT=https://agent.community.animo.id - -echo "Some mock tests... Just for input/output parsing" -echo "------------------------------------------------" - -feature() { - echo "--- Features ---" - cargo run -q -- -u=$ENDPOINT feature &> /dev/null - handle_out $? 0 "Features: Get All" -} - -message() { - echo "--- Message ---" - cargo run -q -- -q -u=$ENDPOINT message --connection-id=FOO --message=BAR &> /dev/null - handle_out $? 1 "Message: Send Message" -} - -connection() { - echo "--- Connections ---" - cargo run -q -- -q -u=$ENDPOINT connection list &> /dev/null - handle_out $? 0 "Connections: Get All" - - cargo run -q -- -q -u=$ENDPOINT connection invite &> /dev/null - handle_out $? 0 "Connections: Invite" -} - -schema() { - echo "--- Schemas ---" - SCHEMA_ID=`cargo run -q -- -u=$ENDPOINT schema create -n=foo -a=bar -a=baz 2> /dev/null` - handle_out $? 0 "Schemas: Create" - - cargo run -q -- -q -u=$ENDPOINT schema list &> /dev/null - handle_out $? 0 "Schemas: Get All" - - cargo run -q -- -q -u=$ENDPOINT schema list --id=$SCHEMA_ID &> /dev/null - handle_out $? 0 "Schemas: Get By Id" -} - -credential_definition() { - echo "--- Credential Definitions --- " - SCHEMA_ID=`cargo run -q -- -u=$ENDPOINT schema create -n=foo -a=bar -a=baz 2> /dev/null` - - CRED_DEF_ID=`cargo run -q -- -u=$ENDPOINT credential-definition create --schema-id=$SCHEMA_ID 2> /dev/null` - handle_out $? 0 "Credential Definitions: create" - - cargo run -q -- -q -u=$ENDPOINT credential-definition list &> /dev/null - handle_out $? 0 "Credential Definitions: Get All" - - cargo run -q -- -q -u=$ENDPOINT credential-definition list --id=$CRED_DEF_ID &> /dev/null - handle_out $? 0 "Credential Definitions: Get By Id" -} - -credential() { - echo "--- Credentials ----" - SCHEMA_ID=`cargo run -q -- -u=$ENDPOINT schema create -n=foo -a=bar -a=baz 2> /dev/null 2> /dev/null` - CRED_DEF_ID=`cargo run -q -- -u=$ENDPOINT credential-definition create --schema-id=$SCHEMA_ID 2> /dev/null` - cargo run -q -- -q credential offer --connection-id=FOO --cred-def-id=$CRED_DEF_ID -k=bar -v=B -k=baz -v=C &> /dev/null - handle_out $? 1 "credential: Offer" -} - -finish() { - echo "+-----------------------+" - echo "| Tests have completed! |" - echo "+-----------------------+" -} - -handle_out() { - EXIT_CODE=$1 - SHOULD_BE=$2 - TEST_NAME=$3 - - if [[ $EXIT_CODE != $SHOULD_BE ]] - then - echo "${TEST_NAME} went wrong." - exit 1 - else - echo "${TEST_NAME} finished correctly with status $1" - fi -} - - -feature -message -connection -schema -credential_definition -credential -finish diff --git a/tests/utils/helpers.rs b/tests/utils/helpers.rs index 02416139..2640c0d2 100644 --- a/tests/utils/helpers.rs +++ b/tests/utils/helpers.rs @@ -3,7 +3,8 @@ use std::env; use std::panic; use std::process::Command; -pub const REGEX_UUID: &str = r"^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$"; +pub const REGEX_UUID: &str = + r"^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$"; /// Helper function which does test set up and teardown pub async fn run_test(test: T) @@ -30,7 +31,7 @@ async fn setup() -> (TestAgentCli, String) { fn teardown(agent_cli: &mut TestAgentCli, wallet_id: String) { agent_cli.unscope_from_wallet(); - agent_cli.exec(&format!("multitenancy remove --wallet-id={}", &wallet_id)); + agent_cli.exec(&format!("multitenancy remove --wallet-id={wallet_id}")); } /// A test utility that wraps common args we want to pass to every command @@ -56,23 +57,23 @@ impl TestAgentCli { pub fn exec(&self, command: &str) -> String { let agent_url = get_agent_url(); - let mut agent_args = format!("--agent-url={} ", &agent_url); + let mut agent_args = format!("--agent-url={agent_url} "); match &self.wallet_token { - Some(token) => agent_args.push_str(&format!("--token={} ", token)), + Some(token) => agent_args.push_str(&format!("--token={token} ")), None => (), } agent_args.push_str(command); let result = Command::new("cargo") - .args(["run", "--quiet", "--"]) + .args(["run", "--package=siera", "--quiet", "--"]) .args(agent_args.split(' ').collect::>()) .output(); let output = result - .map_err(|e| format!("Command failed \"{:?}\" with \"{}\"", &agent_args, e)) + .map_err(|e| format!("Command failed '{agent_args:?}' with '{e}'")) .unwrap(); if !output.status.success() { println!(); println!("============================="); - println!("Command failed: {:?}", &agent_args); + println!("Command failed: {agent_args:?}"); println!("[STDERR]: {}", String::from_utf8_lossy(&output.stderr)); println!("[STDOUT]: {}", String::from_utf8_lossy(&output.stdout)); println!("=============================");