diff --git a/.bazelrc b/.bazelrc index 30bcd2b7d..18140f8ef 100644 --- a/.bazelrc +++ b/.bazelrc @@ -6,7 +6,7 @@ build --@rules_rust//:clippy.toml=//:clippy.toml build --aspects=@rules_rust//rust:defs.bzl%rust_clippy_aspect build --output_groups=+clippy_checks -# Required on windows +# Required for Windows common --enable_platform_specific_config startup --windows_enable_symlinks build:windows --enable_runfiles @@ -18,9 +18,6 @@ common --experimental_allow_tags_propagation # Always show test output. test --test_output=all -# Include ./services/search-indexer/scripts/stamp.sh when building -build --stamp --workspace_status_command=./services/search-indexer/scripts/stamp.sh - # Allows importing from user-defined .bazelrc files; this is ignored # by Git by default. try-import %workspace%/.user.bazelrc diff --git a/.github/workflows/Release.yaml b/.github/workflows/Release.yaml index 4f938f206..c095af956 100644 --- a/.github/workflows/Release.yaml +++ b/.github/workflows/Release.yaml @@ -22,21 +22,35 @@ env: jobs: binary: name: Build Binary - runs-on: ${{matrix.runner}} + runs-on: ${{matrix.data.runner}} strategy: fail-fast: true matrix: - runner: [macos-latest, ubuntu-latest, self-hosted] - include: + data: - runner: ubuntu-latest - bazel-cache-dir: ~/.cache/bazel bazelisk-cache-dir: ~/.cache/bazelisk + os: linux + arch: x86_64 + ext: "" + bazel-args: "" - runner: self-hosted - bazel-cache-dir: ~/.cache/bazel bazelisk-cache-dir: ~/.cache/bazelisk + os: linux + arch: aarch64 + ext: "" + bazel-args: "" - runner: macos-latest - bazel-cache-dir: /private/var/tmp/_bazel_runner/ bazelisk-cache-dir: ~/Library/Caches/bazelisk + os: darwin + arch: x86_64 + ext: "" + bazel-args: "" + - runner: macos-latest + bazelisk-cache-dir: ~/Library/Caches/bazelisk + os: darwin + arch: aarch64 + ext: "" + bazel-args: "--platforms=//build/platforms:apple_silicon" steps: - name: Checkout source code uses: actions/checkout@v3 @@ -50,51 +64,240 @@ jobs: with: path: | ${{runner.temp}}/_bazel_${{runner.os}}_${{runner.arch}} - ${{matrix.runner}} - restore-keys: bazel-cache-${{matrix.runner}}- - key: bazel-cache-${{matrix.runner}}-${{ hashFiles('WORKSPACE', 'BUILD.bazel', '.bazelversion') }} - - - name: Synchronize dependencies - run: ./dev sync-deps - env: - BAZEL_ARGS: ${{env.BAZEL_ARGS}} --disk_cache=${{runner.temp}}/_bazel_${{runner.os}}_${{runner.arch}} + ${{matrix.data.runner}} + restore-keys: bazel-cache-${{matrix.data.runner}}- + key: bazel-cache-${{matrix.data.runner}}-${{ hashFiles('WORKSPACE', 'BUILD.bazel', '.bazelversion') }} - name: Build release binary id: binary run: | echo "===> Building release binary..." - bazel ${BAZEL_ARGS} build //cli:release_binary + bazel ${{env.BAZEL_ARGS}} ${{matrix.data.bazel-args}} build //cli:release_binary echo "===> Marking location as an output" - location=$(bazel cquery //cli:release_binary --output=files >/dev/null 2>&1 | grep bazel-out) + location=$(bazel ${{env.BAZEL_ARGS}} ${{matrix.data.bazel-args}} cquery //cli:release_binary --output=files >/dev/null 2>&1 | grep bazel-out) echo "location=$(location)" >> "${GITHUB_OUTPUT}" - - name: Create and update binary location - run: | - echo "===> Copying ${{steps.binary.outputs.location}} -> ./bin/charted" - mkdir -p ./bin && cp ${{steps.binary.outputs.location}} ./bin - mv ./bin/release_binary ./bin/charted + - name: Shutdown Bazel server + run: bazel shutdown - name: Upload to S3 bucket (/charted/server/${{steps.tag.outputs.version}}) uses: Noelware/s3-action@2.2.1 with: enforce-path-access-style: true access-key-id: ${{secrets.S3_ACCESS_KEY}} - path-format: $(prefix)/charted/server/${{steps.tag.outputs.version}}/binaries/charted-$(os)-$(arch) + path-format: $(prefix)/charted/server/${{steps.tag.outputs.version}}/charted-${{matrix.data.os}}-${{matrix.data.arch}}${{matrix.data.ext}} secret-key: ${{secrets.S3_SECRET_KEY}} endpoint: ${{secrets.S3_ENDPOINT}} region: us-east-1 prefix: /noelware/artifacts bucket: august + files: ${{steps.binary.outputs.location}} - name: Upload to S3 bucket (/charted/server/latest) uses: Noelware/s3-action@2.2.1 with: enforce-path-access-style: true access-key-id: ${{secrets.S3_ACCESS_KEY}} - path-format: $(prefix)/charted/server/latest/binaries/charted-$(os)-$(arch) + path-format: $(prefix)/charted/server/latest/charted-${{matrix.data.os}}-${{matrix.data.arch}}${{matrix.data.ext}} secret-key: ${{secrets.S3_SECRET_KEY}} endpoint: ${{secrets.S3_ENDPOINT}} region: us-east-1 prefix: /noelware/artifacts bucket: august + files: ${{steps.binary.outputs.location}} + docker-debian: + name: Build Debian image + runs-on: ${{matrix.runner}} + strategy: + fail-fast: true + matrix: + runner: [ubuntu-latest, self-hosted] + include: + - runner: ubuntu-latest + platform: linux/amd64 + arch: amd64 + - runner: self-hosted + platform: linux/arm64 + arch: arm64 + steps: + - name: Checkout source code + uses: actions/checkout@v3 + + - name: Get current release tag + uses: auguwu/git-tag-action@master + id: tag + + - name: Setup Docker buildx + uses: docker/setup-buildx-action@v2 + + - name: Login + uses: docker/login-action@v2 + with: + registry: cr.noelware.cloud + username: noelbot + password: ${{secrets.REGISTRY_PASSWORD}} + + - name: Build and push + uses: docker/build-push-action@v4 + with: + provenance: false + platforms: ${{matrix.platform}} + context: . + cache-from: type=gha,scope=debian-${{matrix.arch}} + file: ./distribution/docker/debian.Dockerfile + tags: | + cr.noelware.cloud/charted/charted:${{steps.tag.outputs.version}}-${{matrix.arch}}, + cr.noelware.cloud/charted/charted:${{steps.tag.outputs.major}}.${{steps.tag.outputs.minor}}-${{matrix.arch}}, + cr.noelware.cloud/charted/charted:${{steps.tag.outputs.major}}-${{matrix.arch}}, + cr.noelware.cloud/charted/charted:latest-${{matrix.arch}} + docker-alpine: + name: Build Alpine image + runs-on: ${{matrix.runner}} + strategy: + fail-fast: true + matrix: + runner: [ubuntu-latest] + include: + - runner: ubuntu-latest + platform: linux/amd64 + arch: amd64 + steps: + - name: Checkout source code + uses: actions/checkout@v3 + + - name: Get current release tag + uses: auguwu/git-tag-action@master + id: tag + + - name: Setup Docker buildx + uses: docker/setup-buildx-action@v2 + + - name: Login + uses: docker/login-action@v2 + with: + registry: cr.noelware.cloud + username: noelbot + password: ${{secrets.REGISTRY_PASSWORD}} + + - name: Build and push + uses: docker/build-push-action@v4 + with: + provenance: false + platforms: ${{matrix.platform}} + context: . + cache-from: type=gha,scope=alpine-${{matrix.arch}} + file: ./distribution/docker/alpine.Dockerfile + tags: | + cr.noelware.cloud/charted/charted:${{steps.tag.outputs.version}}-alpine-${{matrix.arch}}, + cr.noelware.cloud/charted/charted:${{steps.tag.outputs.major}}.${{steps.tag.outputs.minor}}-alpine-${{matrix.arch}}, + cr.noelware.cloud/charted/charted:${{steps.tag.outputs.major}}-alpine-${{matrix.arch}}, + cr.noelware.cloud/charted/charted:alpine-${{matrix.arch}} + docker-manifests: + name: Merge Manifests + runs-on: ubuntu-latest + needs: [docker-alpine, docker-debian] + if: ${{github.repository == 'charted-dev/charted'}} + steps: + - name: Get current release tag + uses: auguwu/git-tag-action@master + id: tag + + - name: Login + uses: docker/login-action@v2 + with: + registry: cr.noelware.cloud + username: noelbot + password: ${{secrets.REGISTRY_PASSWORD}} + + - name: Merge Manifests [cr.noelware.cloud/charted/charted:latest] + uses: Noelware/docker-manifest-action@0.4.0 + with: + images: cr.noelware.cloud/charted/charted:latest + inputs: cr.noelware.cloud/charted/charted:latest-amd64,cr.noelware.cloud/charted/charted:latest-arm64 + push: true + + - name: Merge Manifests [cr.noelware.cloud/charted/charted:${{steps.tag.outputs.major}}] + uses: Noelware/docker-manifest-action@0.4.0 + with: + images: cr.noelware.cloud/charted/charted:${{steps.tag.outputs.major}} + inputs: cr.noelware.cloud/charted/charted:${{steps.tag.outputs.major}}-amd64,cr.noelware.cloud/charted/charted:${{steps.tag.outputs.major}}-arm64 + push: true + + - name: Merge Manifests [cr.noelware.cloud/charted/charted:${{steps.tag.outputs.major}}.${{steps.tag.outputs.minor}}] + uses: Noelware/docker-manifest-action@0.4.0 + with: + images: cr.noelware.cloud/charted/charted:${{steps.tag.outputs.major}}.${{steps.tag.outputs.minor}} + inputs: cr.noelware.cloud/charted/charted:${{steps.tag.outputs.major}}.${{steps.tag.outputs.minor}}-amd64,cr.noelware.cloud/charted/charted:${{steps.tag.outputs.major}}.${{steps.tag.outputs.minor}}-arm64 + push: true + + - name: Merge Manifests [cr.noelware.cloud/charted/charted:${{steps.tag.outputs.version}}] + uses: Noelware/docker-manifest-action@0.4.0 + with: + images: cr.noelware.cloud/charted/charted:${{steps.tag.outputs.version}} + inputs: cr.noelware.cloud/charted/charted:${{steps.tag.outputs.version}}-amd64,cr.noelware.cloud/charted/charted:${{steps.tag.outputs.version}}-arm64 + push: true + + - name: Merge Manifests [cr.noelware.cloud/charted/charted:alpine] + uses: Noelware/docker-manifest-action@0.4.0 + with: + images: cr.noelware.cloud/charted/charted:alpine + inputs: cr.noelware.cloud/charted/charted:alpine-amd64,cr.noelware.cloud/charted/charted:alpine-arm64 + push: true + + - name: Merge Manifests [cr.noelware.cloud/charted/charted:${{steps.tag.outputs.major}}-alpine] + uses: Noelware/docker-manifest-action@0.4.0 + with: + images: cr.noelware.cloud/charted/charted:${{steps.tag.outputs.major}}-alpine + inputs: cr.noelware.cloud/charted/charted:${{steps.tag.outputs.major}}-alpine-amd64,cr.noelware.cloud/charted/charted:${{steps.tag.outputs.major}}-alpine-arm64 + push: true + + - name: Merge Manifests [cr.noelware.cloud/charted/charted:${{steps.tag.outputs.major}}.${{steps.tag.outputs.minor}}-alpine] + uses: Noelware/docker-manifest-action@0.4.0 + with: + images: cr.noelware.cloud/charted/charted:${{steps.tag.outputs.major}}.${{steps.tag.outputs.minor}}-alpine + inputs: cr.noelware.cloud/charted/charted:${{steps.tag.outputs.major}}.${{steps.tag.outputs.minor}}--alpineamd64,cr.noelware.cloud/charted/charted:${{steps.tag.outputs.major}}.${{steps.tag.outputs.minor}}-alpine-arm64 + push: true + + - name: Merge Manifests [cr.noelware.cloud/charted/charted:${{steps.tag.outputs.version}}-alpine] + uses: Noelware/docker-manifest-action@0.4.0 + with: + images: cr.noelware.cloud/charted/charted:${{steps.tag.outputs.version}}-alpine + inputs: cr.noelware.cloud/charted/charted:${{steps.tag.outputs.version}}-alpine-amd64,cr.noelware.cloud/charted/charted:${{steps.tag.outputs.version}}-alpine-arm64 + push: true + sentry: + name: Create Sentry release + runs-on: ubuntu-latest + if: ${{github.repository == 'charted-dev/charted'}} + steps: + - name: Get current release tag + uses: auguwu/git-tag-action@master + id: tag + + - name: Create! + uses: getsentry/action-release@v1 + env: + SENTRY_AUTH_TOKEN: ${{secrets.SENTRY_AUTH_TOKEN}} + SENTRY_PROJECT: charted-server + SENTRY_URL: https://sentry.noelware.cloud + with: + environment: production + version: ${{steps.tag.outputs.version}} + prod: + name: Push to Production + runs-on: ubuntu-latest + if: ${{github.repository == 'charted-dev/charted'}} + needs: [sentry, docker-manifests] + steps: + - name: Get current release tag + uses: auguwu/git-tag-action@master + id: tag + + - name: Update ~/.kube/config file + run: echo "${{secrets.KUBECONFIG}}" >> ~/.kube/config + + - name: Rollout + run: kubectl set image deployment/charted-server charted-server=cr.noelware.cloud/charted/charted:${{steps.tag.outputs.version}}-alpine + + - name: Wait for completion! + run: kubectl rollout status deployment/charted-server diff --git a/Cargo.lock b/Cargo.lock index ad54092d6..f9595892b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -23,7 +23,7 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "getrandom", "once_cell", "version_check", @@ -117,12 +117,6 @@ dependencies = [ "windows-sys", ] -[[package]] -name = "anyhow" -version = "1.0.75" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" - [[package]] name = "arc-swap" version = "1.6.0" @@ -141,18 +135,6 @@ dependencies = [ "password-hash", ] -[[package]] -name = "as-slice" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45403b49e3954a4b8428a0ac21a4b7afadccf92bfd96273f1a58cd4812496ae0" -dependencies = [ - "generic-array 0.12.4", - "generic-array 0.13.3", - "generic-array 0.14.7", - "stable_deref_trait", -] - [[package]] name = "async-channel" version = "1.9.0" @@ -188,28 +170,6 @@ dependencies = [ "syn 2.0.29", ] -[[package]] -name = "async-stream" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" -dependencies = [ - "async-stream-impl", - "futures-core", - "pin-project-lite", -] - -[[package]] -name = "async-stream-impl" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.29", -] - [[package]] name = "async-trait" version = "0.1.73" @@ -671,7 +631,7 @@ checksum = "4319208da049c43661739c5fade2ba182f09d1dc2299b32298d3a31692b17e12" dependencies = [ "addr2line", "cc", - "cfg-if 1.0.0", + "cfg-if", "libc", "miniz_oxide", "object", @@ -742,7 +702,7 @@ version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ - "generic-array 0.14.7", + "generic-array", ] [[package]] @@ -762,7 +722,7 @@ dependencies = [ "http", "hyper", "hyperlocal", - "log 0.4.20", + "log", "pin-project", "serde", "serde_derive", @@ -786,19 +746,6 @@ dependencies = [ "serde_with", ] -[[package]] -name = "build_id" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6deb6795d8b4d2269c3fcf87a87bff9f4cd45a99e259806603ee8007077daf3" -dependencies = [ - "byteorder", - "once_cell", - "palaver", - "twox-hash", - "uuid 0.8.2", -] - [[package]] name = "bumpalo" version = "3.13.0" @@ -842,12 +789,6 @@ dependencies = [ "libc", ] -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - [[package]] name = "cfg-if" version = "1.0.0" @@ -909,6 +850,7 @@ dependencies = [ "humantime", "md-5", "once_cell", + "paste", "rand", "regex", "rustc_version 0.4.0", @@ -948,7 +890,14 @@ dependencies = [ name = "charted-database" version = "0.0.0-devel.0" dependencies = [ + "async-trait", + "charted-common", + "charted-storage", + "eyre", + "sentry", + "serde", "sqlx", + "tracing", ] [[package]] @@ -973,39 +922,6 @@ dependencies = [ "which", ] -[[package]] -name = "charted-emails" -version = "0.0.0-devel.0" -dependencies = [ - "async-trait", - "charted-common", - "charted-config", - "charted-logging", - "chrono", - "color-eyre", - "dotenv", - "eyre", - "lettre", - "merge-struct", - "mustache", - "once_cell", - "prost", - "prost-types", - "regex", - "sentry", - "sentry-tower", - "sentry-tracing", - "serde", - "serde_json", - "serde_yaml", - "tokio", - "tonic", - "tonic-build", - "tonic-health", - "tracing", - "tracing-subscriber", -] - [[package]] name = "charted-emails-client" version = "0.0.0-devel.0" @@ -1048,6 +964,7 @@ dependencies = [ "dirs", "dotenv", "eyre", + "once_cell", "reqwest", "serde", "serde_json", @@ -1056,6 +973,7 @@ dependencies = [ "tokio", "tracing", "tracing-subscriber", + "url", "which", ] @@ -1196,6 +1114,7 @@ dependencies = [ "jsonwebtoken", "mime", "once_cell", + "paste", "remi-core", "sentry", "sentry-eyre", @@ -1234,7 +1153,7 @@ dependencies = [ "tokio-util 0.7.8", "tracing", "utoipa", - "uuid 1.4.1", + "uuid", ] [[package]] @@ -1255,7 +1174,7 @@ dependencies = [ "serde_json", "sqlx", "tracing", - "uuid 1.4.1", + "uuid", ] [[package]] @@ -1486,7 +1405,7 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -1495,7 +1414,7 @@ version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "crossbeam-utils", ] @@ -1505,7 +1424,7 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "crossbeam-epoch", "crossbeam-utils", ] @@ -1517,7 +1436,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" dependencies = [ "autocfg", - "cfg-if 1.0.0", + "cfg-if", "crossbeam-utils", "memoffset 0.9.0", "scopeguard", @@ -1529,7 +1448,7 @@ version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d1cfb3ea8a53f37c40dea2c7bedcbd88bdfae54f5e2175d6ecaff1c988353add" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "crossbeam-utils", ] @@ -1539,7 +1458,7 @@ version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -1548,7 +1467,7 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ - "generic-array 0.14.7", + "generic-array", "typenum", ] @@ -1660,7 +1579,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef552e6f588e446098f6ba40d89ac146c8c7b64aade83c051ee00bb5d2bc18d" dependencies = [ "serde", - "uuid 1.4.1", + "uuid", ] [[package]] @@ -1741,7 +1660,7 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "dirs-sys-next", ] @@ -1821,29 +1740,13 @@ dependencies = [ "void", ] -[[package]] -name = "email-encoding" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbfb21b9878cf7a348dcb8559109aabc0ec40d69924bd706fa5149846c4fef75" -dependencies = [ - "base64 0.21.2", - "memchr", -] - -[[package]] -name = "email_address" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2153bd83ebc09db15bcbdc3e2194d901804952e3dc96967e1cd3b0c5c32d112" - [[package]] name = "encoding_rs" version = "0.8.32" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -1904,7 +1807,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "136d1b5283a1ab77bd9257427ffd09d8667ced0570b6f938942bc7568ed5b943" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "home", "windows-sys", ] @@ -1946,7 +1849,7 @@ version = "3.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef033ed5e9bad94e55838ca0ca906db0e043f517adda0c8b79c7a8c66c93c1b5" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "rustix", "windows-sys", ] @@ -1963,7 +1866,7 @@ version = "0.2.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d4029edd3e734da6fe05b6cd7bd2960760a616bd2ddd0d59a0124746d6272af0" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", "redox_syscall 0.3.5", "windows-sys", @@ -1981,12 +1884,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "fixedbitset" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" - [[package]] name = "flate2" version = "1.0.27" @@ -2154,24 +2051,6 @@ dependencies = [ "slab", ] -[[package]] -name = "generic-array" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffdf9f34f1447443d37393cc6c2b8313aebddcd96906caf34e54c68d8e57d7bd" -dependencies = [ - "typenum", -] - -[[package]] -name = "generic-array" -version = "0.13.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f797e67af32588215eaaab8327027ee8e71b9dd0b2b26996aedf20c030fce309" -dependencies = [ - "typenum", -] - [[package]] name = "generic-array" version = "0.14.7" @@ -2188,7 +2067,7 @@ version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", "wasi 0.11.0+wasi-snapshot-preview1", ] @@ -2218,15 +2097,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "hash32" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4041af86e63ac4298ce40e5cca669066e75b6f1aa3390fe2561ffa5e1d9f4cc" -dependencies = [ - "byteorder", -] - [[package]] name = "hashbrown" version = "0.12.3" @@ -2277,18 +2147,6 @@ dependencies = [ "http", ] -[[package]] -name = "heapless" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74911a68a1658cfcfb61bc0ccfbd536e3b6e906f8c2f7883ee50157e3e2184f1" -dependencies = [ - "as-slice", - "generic-array 0.13.3", - "hash32", - "stable_deref_trait", -] - [[package]] name = "heck" version = "0.4.1" @@ -2426,25 +2284,13 @@ checksum = "1788965e61b367cd03a62950836d5cd41560c3577d90e40e0819373194d1661c" dependencies = [ "http", "hyper", - "log 0.4.20", + "log", "rustls", "rustls-native-certs", "tokio", "tokio-rustls", ] -[[package]] -name = "hyper-timeout" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" -dependencies = [ - "hyper", - "pin-project-lite", - "tokio", - "tokio-io-timeout", -] - [[package]] name = "hyper-tls" version = "0.5.0" @@ -2500,16 +2346,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" -[[package]] -name = "idna" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" -dependencies = [ - "unicode-bidi", - "unicode-normalization", -] - [[package]] name = "idna" version = "0.4.0" @@ -2565,7 +2401,7 @@ version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -2600,7 +2436,7 @@ dependencies = [ "event-listener", "futures-lite", "http", - "log 0.4.20", + "log", "mime", "once_cell", "polling", @@ -2618,7 +2454,7 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "924e5d73ea28f59011fec52a0d12185d496a9b075d360657aed2a5707f701153" dependencies = [ - "nom 7.1.3", + "nom", ] [[package]] @@ -2677,33 +2513,6 @@ dependencies = [ "spin 0.5.2", ] -[[package]] -name = "lettre" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76bd09637ae3ec7bd605b8e135e757980b3968430ff2b1a4a94fb7769e50166d" -dependencies = [ - "async-trait", - "base64 0.21.2", - "email-encoding", - "email_address", - "fastrand 1.9.0", - "futures-io", - "futures-util", - "hostname", - "httpdate", - "idna 0.3.0", - "mime", - "native-tls", - "nom 7.1.3", - "once_cell", - "quoted_printable", - "socket2 0.4.9", - "tokio", - "tokio-native-tls", - "tracing", -] - [[package]] name = "libc" version = "0.2.147" @@ -2775,30 +2584,12 @@ dependencies = [ "scopeguard", ] -[[package]] -name = "log" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" -dependencies = [ - "log 0.4.20", -] - [[package]] name = "log" version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" -[[package]] -name = "mach" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b823e83b2affd8f40a9ee8c29dbc56404c1e34cd2710921f2801e2cf29527afa" -dependencies = [ - "libc", -] - [[package]] name = "match_cfg" version = "0.1.0" @@ -2846,13 +2637,13 @@ dependencies = [ "iso8601", "js-sys", "jsonwebtoken", - "log 0.4.20", + "log", "meilisearch-index-setting-macro", "serde", "serde_json", "thiserror", "time 0.3.25", - "uuid 1.4.1", + "uuid", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", @@ -2865,15 +2656,6 @@ version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" -[[package]] -name = "memmap2" -version = "0.5.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" -dependencies = [ - "libc", -] - [[package]] name = "memoffset" version = "0.6.5" @@ -2954,29 +2736,13 @@ dependencies = [ "futures-util", "http", "httparse", - "log 0.4.20", + "log", "memchr", "mime", "spin 0.9.8", "version_check", ] -[[package]] -name = "multimap" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" - -[[package]] -name = "mustache" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51956ef1c5d20a1384524d91e616fb44dfc7d8f249bf696d49c97dd3289ecab5" -dependencies = [ - "log 0.3.9", - "serde", -] - [[package]] name = "native-tls" version = "0.2.11" @@ -2985,7 +2751,7 @@ checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" dependencies = [ "lazy_static", "libc", - "log 0.4.20", + "log", "openssl", "openssl-probe", "openssl-sys", @@ -3004,19 +2770,6 @@ dependencies = [ "smallvec", ] -[[package]] -name = "nix" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b2e0b4f3320ed72aaedb9a5ac838690a8047c7b275da22711fddff4f8a14229" -dependencies = [ - "bitflags 1.3.2", - "cc", - "cfg-if 0.1.10", - "libc", - "void", -] - [[package]] name = "nix" version = "0.23.2" @@ -3025,29 +2778,11 @@ checksum = "8f3790c00a0150112de0f4cd161e3d7fc4b2d8a5542ffc35f099a2562aecb35c" dependencies = [ "bitflags 1.3.2", "cc", - "cfg-if 1.0.0", + "cfg-if", "libc", "memoffset 0.6.5", ] -[[package]] -name = "nix" -version = "0.26.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfdda3d196821d6af13126e40375cdf7da646a96114af134d5f417a9a1dc8e1a" -dependencies = [ - "bitflags 1.3.2", - "cfg-if 1.0.0", - "libc", - "static_assertions", -] - -[[package]] -name = "nom" -version = "2.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf51a729ecf40266a2368ad335a5fdde43471f545a967109cd62146ecf8b66ff" - [[package]] name = "nom" version = "7.1.3" @@ -3168,7 +2903,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "729b745ad4a5575dd06a3e1af1414bd330ee561c01b3899eb584baeaa8def17e" dependencies = [ "bitflags 1.3.2", - "cfg-if 1.0.0", + "cfg-if", "foreign-types", "libc", "once_cell", @@ -3217,7 +2952,7 @@ version = "3.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "006e42d5b888366f1880eda20371fedde764ed2213dc8496f49622fa0c99cd5e" dependencies = [ - "log 0.4.20", + "log", "serde", "winapi", ] @@ -3240,23 +2975,6 @@ version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" -[[package]] -name = "palaver" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49dfc200733ac34dcd9a1e4a7e454b521723936010bef3710e2d8024a32d685f" -dependencies = [ - "bitflags 1.3.2", - "heapless", - "lazy_static", - "libc", - "mach", - "nix 0.15.0", - "procinfo", - "typenum", - "winapi", -] - [[package]] name = "parking" version = "2.1.0" @@ -3279,7 +2997,7 @@ version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", "redox_syscall 0.3.5", "smallvec", @@ -3327,16 +3045,6 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" -[[package]] -name = "petgraph" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dd7d28ee937e54fe3080c91faa1c3a46c06de6252988a7f4592ba2310ef22a4" -dependencies = [ - "fixedbitset", - "indexmap 1.9.3", -] - [[package]] name = "pin-project" version = "1.1.3" @@ -3404,50 +3112,20 @@ checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" dependencies = [ "autocfg", "bitflags 1.3.2", - "cfg-if 1.0.0", + "cfg-if", "concurrent-queue", "libc", - "log 0.4.20", + "log", "pin-project-lite", "windows-sys", ] -[[package]] -name = "pprof" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "196ded5d4be535690899a4631cc9f18cdc41b7ebf24a79400f46f48e49a11059" -dependencies = [ - "backtrace", - "cfg-if 1.0.0", - "findshlibs", - "libc", - "log 0.4.20", - "nix 0.26.2", - "once_cell", - "parking_lot", - "smallvec", - "symbolic-demangle", - "tempfile", - "thiserror", -] - [[package]] name = "ppv-lite86" version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" -[[package]] -name = "prettyplease" -version = "0.1.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8646e95016a7a6c4adea95bafa8a16baab64b583356217f2c85db4a39d9a86" -dependencies = [ - "proc-macro2", - "syn 1.0.109", -] - [[package]] name = "proc-macro-error" version = "1.0.4" @@ -3481,18 +3159,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "procinfo" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ab1427f3d2635891f842892dda177883dca0639e05fe66796a62c9d2f23b49c" -dependencies = [ - "byteorder", - "libc", - "nom 2.2.1", - "rustc_version 0.2.3", -] - [[package]] name = "prometheus-client" version = "0.21.2" @@ -3525,60 +3191,6 @@ dependencies = [ "rustyline", ] -[[package]] -name = "prost" -version = "0.11.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b82eaa1d779e9a4bc1c3217db8ffbeabaae1dca241bf70183242128d48681cd" -dependencies = [ - "bytes", - "prost-derive", -] - -[[package]] -name = "prost-build" -version = "0.11.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "119533552c9a7ffacc21e099c24a0ac8bb19c2a2a3f363de84cd9b844feab270" -dependencies = [ - "bytes", - "heck", - "itertools 0.10.5", - "lazy_static", - "log 0.4.20", - "multimap", - "petgraph", - "prettyplease", - "prost", - "prost-types", - "regex", - "syn 1.0.109", - "tempfile", - "which", -] - -[[package]] -name = "prost-derive" -version = "0.11.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4" -dependencies = [ - "anyhow", - "itertools 0.10.5", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "prost-types" -version = "0.11.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "213622a1460818959ac1181aaeb2dc9c7f63df720db7d788b3e24eacd1983e13" -dependencies = [ - "prost", -] - [[package]] name = "quote" version = "1.0.33" @@ -3588,12 +3200,6 @@ dependencies = [ "proc-macro2", ] -[[package]] -name = "quoted_printable" -version = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3866219251662ec3b26fc217e3e05bf9c4f84325234dfb96bf0bf840889e49" - [[package]] name = "radix_trie" version = "0.2.1" @@ -3805,7 +3411,7 @@ dependencies = [ "hyper-tls", "ipnet", "js-sys", - "log 0.4.20", + "log", "mime", "native-tls", "once_cell", @@ -3886,16 +3492,6 @@ dependencies = [ "semver 1.0.18", ] -[[package]] -name = "rustc_version_runtime" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d31b7153270ebf48bf91c65ae5b0c00e749c4cfad505f66530ac74950249582f" -dependencies = [ - "rustc_version 0.2.3", - "semver 0.9.0", -] - [[package]] name = "rustix" version = "0.38.8" @@ -3915,7 +3511,7 @@ version = "0.20.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f" dependencies = [ - "log 0.4.20", + "log", "ring", "sct", "webpki", @@ -3955,14 +3551,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "db7826789c0e25614b03e5a54a0717a86f9ff6e6e5247f92b369472869320039" dependencies = [ "bitflags 1.3.2", - "cfg-if 1.0.0", + "cfg-if", "clipboard-win", "dirs-next", "fd-lock", "libc", - "log 0.4.20", + "log", "memchr", - "nix 0.23.2", + "nix", "radix_trie", "scopeguard", "smallvec", @@ -4057,7 +3653,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "01b0ad16faa5d12372f914ed40d00bda21a6d1bdcc99264c5e5e1c9495cf3654" dependencies = [ "httpdate", - "log 0.4.20", + "log", "native-tls", "reqwest", "sentry-backtrace", @@ -4103,20 +3699,12 @@ version = "0.31.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7163491708804a74446642ff2c80b3acd668d4b9e9f497f85621f3d250fd012b" dependencies = [ - "build_id", - "findshlibs", - "indexmap 1.9.3", - "libc", - "log 0.4.20", + "log", "once_cell", - "pprof", "rand", - "rustc_version_runtime", "sentry-types", "serde", "serde_json", - "sys-info", - "uuid 1.4.1", ] [[package]] @@ -4191,23 +3779,23 @@ dependencies = [ "thiserror", "time 0.3.25", "url", - "uuid 1.4.1", + "uuid", ] [[package]] name = "serde" -version = "1.0.185" +version = "1.0.186" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be9b6f69f1dfd54c3b568ffa45c310d6973a5e5148fd40cf515acaf38cf5bc31" +checksum = "9f5db24220c009de9bd45e69fb2938f4b6d2df856aa9304ce377b3180f83b7c1" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.185" +version = "1.0.186" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc59dfdcbad1437773485e0367fea4b090a2e0a16d9ffc46af47764536a298ec" +checksum = "5ad697f7e0b65af4983a4ce8f56ed5b357e8d3c36651bf6a7e13639c17b8e670" dependencies = [ "proc-macro2", "quote", @@ -4297,7 +3885,7 @@ version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "digest", ] @@ -4314,7 +3902,7 @@ version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "digest", ] @@ -4465,7 +4053,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c12bc9199d1db8234678b7051747c07f517cdcf019262d1847b94ec8b1aee3e" dependencies = [ "itertools 0.10.5", - "nom 7.1.3", + "nom", "unicode_categories", ] @@ -4506,7 +4094,7 @@ dependencies = [ "hashlink", "hex", "indexmap 2.0.0", - "log 0.4.20", + "log", "memchr", "native-tls", "once_cell", @@ -4583,12 +4171,12 @@ dependencies = [ "futures-core", "futures-io", "futures-util", - "generic-array 0.14.7", + "generic-array", "hex", "hkdf", "hmac", "itoa", - "log 0.4.20", + "log", "md-5", "memchr", "once_cell", @@ -4629,7 +4217,7 @@ dependencies = [ "hmac", "home", "itoa", - "log 0.4.20", + "log", "md-5", "memchr", "once_cell", @@ -4661,7 +4249,7 @@ dependencies = [ "futures-intrusive", "futures-util", "libsqlite3-sys", - "log 0.4.20", + "log", "percent-encoding", "serde", "sqlx-core", @@ -4669,18 +4257,6 @@ dependencies = [ "url", ] -[[package]] -name = "stable_deref_trait" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" - -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - [[package]] name = "str-buf" version = "1.0.6" @@ -4709,28 +4285,6 @@ version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" -[[package]] -name = "symbolic-common" -version = "10.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b55cdc318ede251d0957f07afe5fed912119b8c1bc5a7804151826db999e737" -dependencies = [ - "debugid", - "memmap2", - "stable_deref_trait", - "uuid 1.4.1", -] - -[[package]] -name = "symbolic-demangle" -version = "10.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79be897be8a483a81fff6a3a4e195b4ac838ef73ca42d348b3f722da9902e489" -dependencies = [ - "rustc-demangle", - "symbolic-common", -] - [[package]] name = "syn" version = "1.0.109" @@ -4759,23 +4313,13 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" -[[package]] -name = "sys-info" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b3a0d0aba8bf96a0e1ddfdc352fc53b3df7f39318c71854910c3c4b024ae52c" -dependencies = [ - "cc", - "libc", -] - [[package]] name = "sysinfo" version = "0.29.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d10ed79c22663a35a255d289a7fdcb43559fc77ff15df5ce6c341809e7867528" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "core-foundation-sys", "libc", "ntapi", @@ -4801,7 +4345,7 @@ version = "3.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "fastrand 2.0.0", "redox_syscall 0.3.5", "rustix", @@ -4819,7 +4363,7 @@ dependencies = [ "futures", "hex", "hmac", - "log 0.4.20", + "log", "rand", "serde", "serde_json", @@ -4853,7 +4397,7 @@ version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "once_cell", ] @@ -4931,16 +4475,6 @@ dependencies = [ "windows-sys", ] -[[package]] -name = "tokio-io-timeout" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf" -dependencies = [ - "pin-project-lite", - "tokio", -] - [[package]] name = "tokio-macros" version = "2.1.0" @@ -5004,7 +4538,7 @@ dependencies = [ "bytes", "futures-core", "futures-sink", - "log 0.4.20", + "log", "pin-project-lite", "tokio", ] @@ -5057,60 +4591,6 @@ dependencies = [ "winnow", ] -[[package]] -name = "tonic" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3082666a3a6433f7f511c7192923fa1fe07c69332d3c6a2e6bb040b569199d5a" -dependencies = [ - "async-trait", - "axum", - "base64 0.21.2", - "bytes", - "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "hyper", - "hyper-timeout", - "percent-encoding", - "pin-project", - "prost", - "tokio", - "tokio-stream", - "tower", - "tower-layer", - "tower-service", - "tracing", -] - -[[package]] -name = "tonic-build" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6fdaae4c2c638bb70fe42803a26fbd6fc6ac8c72f5c59f67ecc2a2dcabf4b07" -dependencies = [ - "prettyplease", - "proc-macro2", - "prost-build", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "tonic-health" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "080964d45894b90273d2b1dd755fdd114560db8636bb41cea615213c45043c4d" -dependencies = [ - "async-stream", - "prost", - "tokio", - "tokio-stream", - "tonic", -] - [[package]] name = "tower" version = "0.4.13" @@ -5119,13 +4599,9 @@ checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" dependencies = [ "futures-core", "futures-util", - "indexmap 1.9.3", "pin-project", "pin-project-lite", - "rand", - "slab", "tokio", - "tokio-util 0.7.8", "tower-layer", "tower-service", "tracing", @@ -5171,8 +4647,8 @@ version = "0.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" dependencies = [ - "cfg-if 1.0.0", - "log 0.4.20", + "cfg-if", + "log", "pin-project-lite", "tracing-attributes", "tracing-core", @@ -5226,7 +4702,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922" dependencies = [ "lazy_static", - "log 0.4.20", + "log", "tracing-core", ] @@ -5250,16 +4726,6 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" -[[package]] -name = "twox-hash" -version = "1.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" -dependencies = [ - "cfg-if 1.0.0", - "static_assertions", -] - [[package]] name = "typenum" version = "1.16.0" @@ -5333,7 +4799,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b11c96ac7ee530603dcdf68ed1557050f374ce55a5a07193ebf8cbc9f8927e9" dependencies = [ "base64 0.21.2", - "log 0.4.20", + "log", "native-tls", "once_cell", "url", @@ -5346,7 +4812,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" dependencies = [ "form_urlencoded", - "idna 0.4.0", + "idna", "percent-encoding", "serde", ] @@ -5387,15 +4853,9 @@ dependencies = [ "quote", "regex", "syn 2.0.29", - "uuid 1.4.1", + "uuid", ] -[[package]] -name = "uuid" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" - [[package]] name = "uuid" version = "1.4.1" @@ -5412,7 +4872,7 @@ version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b92f40481c04ff1f4f61f304d61793c7b56ff76ac1469f1beb199b1445b253bd" dependencies = [ - "idna 0.4.0", + "idna", "lazy_static", "regex", "serde", @@ -5511,7 +4971,7 @@ version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "wasm-bindgen-macro", ] @@ -5522,7 +4982,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" dependencies = [ "bumpalo", - "log 0.4.20", + "log", "once_cell", "proc-macro2", "quote", @@ -5536,7 +4996,7 @@ version = "0.4.37" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "js-sys", "wasm-bindgen", "web-sys", diff --git a/Cargo.toml b/Cargo.toml index e14852f17..f2a5dd689 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -38,7 +38,6 @@ members = [ "crates/sessions/local", "crates/storage", "server", - "services/emails", "tools/devtools", "tools/helm-plugin", ] diff --git a/WORKSPACE b/WORKSPACE index fe508421e..6614e755a 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -120,29 +120,6 @@ load("@npm//:repositories.bzl", "npm_repositories") npm_repositories() -load("//:build/tools/golang.bzl", "GOLANG_VERSION", "charted_golang_repositories") - -charted_golang_repositories() - -load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies") - -go_rules_dependencies() - -go_register_toolchains(version = GOLANG_VERSION) - -load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies") - -gazelle_dependencies() - -load("@ash2k_bazel_tools//golangcilint:deps.bzl", "golangcilint_dependencies") - -golangcilint_dependencies() - -load("//services/search-indexer:deps.bzl", "go_dependencies") - -# gazelle:repository_macro services/search-indexer/deps.bzl%go_dependencies -go_dependencies() - load("//:build/tools/pkg.bzl", "charted_pkg_repositories") charted_pkg_repositories() diff --git a/assets/openapi.json b/assets/openapi.json index b4bacfd62..3add994ff 100644 --- a/assets/openapi.json +++ b/assets/openapi.json @@ -378,6 +378,25 @@ } } }, + "/users/repositories": { + "put": { + "tags": ["Repositories"], + "description": "Creates a [`Repository`] with the current authenticated user as the owner of the repository.", + "operationId": "create_user_repository", + "responses": { + "201": { + "description": "Repository created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/responses/ApiRepositoryResponse" + } + } + } + } + } + } + }, "/users/sessions/logout": { "delete": { "tags": ["Users", "Sessions"], @@ -546,6 +565,67 @@ } } } + }, + "/users/{idOrName}/repositories": { + "get": { + "tags": ["Users", "Repositories"], + "description": "Retrieve a list of all a user's repositories.", + "operationId": "list_user_repositories", + "parameters": [ + { + "name": "idOrName", + "in": "path", + "description": "Path parameter that can take a [`Name`] or [`Snowflake`] identifier.", + "required": true, + "schema": { + "$ref": "#/components/schemas/NameOrSnowflake" + } + }, + { + "name": "per_page", + "in": "query", + "description": "How many elements should be present in a page.", + "required": false, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "order", + "in": "query", + "description": "Order to sort the entries by.", + "required": false, + "schema": { + "$ref": "#/components/schemas/OrderBy" + } + }, + { + "name": "cursor", + "in": "query", + "description": "Cursor to passthrough to proceed into the next or previous page.", + "required": false, + "schema": { + "type": "integer", + "format": "int64", + "description": "Unique identifier for a resource. Based off the [Twitter Snowflake](https://blog.twitter.com/engineering/en_us/a/2010/announcing-snowflake) spec.", + "minLength": 15 + } + } + ], + "responses": { + "200": { + "description": "List of all the user's repositories", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/responses/ApiRepositoryPaginatedResponse" + } + } + } + } + } + } } }, "components": { @@ -1003,6 +1083,11 @@ ], "description": "Represents a union enum that can hold a Snowflake and a Name, which is a String that is validated with the Name regex." }, + "OrderBy": { + "type": "string", + "description": "The ordering to use when querying paginated REST calls.", + "enum": ["ASC", "DES"] + }, "Organization": { "type": "object", "description": "Represents a unified entity that can manage and own repositories outside\na User. Organizations to the server is used for business-related Helm charts\nthat aren't tied to a specific User.", @@ -1061,6 +1146,79 @@ } } }, + "PageInfo": { + "type": "object", + "description": "Information about a [pagination][Pagination] page.", + "required": ["next_cursor", "prev_cursor"], + "properties": { + "next_cursor": { + "$ref": "#/components/schemas/Snowflake" + }, + "prev_cursor": { + "$ref": "#/components/schemas/Snowflake" + } + } + }, + "PaginatedOrganization": { + "type": "object", + "required": ["data", "page_info"], + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Organization" + } + }, + "page_info": { + "$ref": "#/components/schemas/PageInfo" + } + } + }, + "PaginatedOrganizationMember": { + "type": "object", + "required": ["data", "page_info"], + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OrganizationMember" + } + }, + "page_info": { + "$ref": "#/components/schemas/PageInfo" + } + } + }, + "PaginatedRepository": { + "type": "object", + "required": ["data", "page_info"], + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Repository" + } + }, + "page_info": { + "$ref": "#/components/schemas/PageInfo" + } + } + }, + "PaginatedRepositoryMember": { + "type": "object", + "required": ["data", "page_info"], + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RepositoryMember" + } + }, + "page_info": { + "$ref": "#/components/schemas/PageInfo" + } + } + }, "Repository": { "type": "object", "required": ["created_at", "updated_at", "name", "type"], @@ -1374,6 +1532,86 @@ } } }, + "ApiOrganizationMemberPaginatedResponse": { + "description": "Response object for OrganizationMemberPaginatedResponse", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": ["success", "data"], + "properties": { + "data": { + "$ref": "#/components/schemas/ApiPaginatedOrganizationMember" + }, + "success": { + "type": "boolean", + "description": "Indicates whether if this response was a success or not" + } + } + } + } + } + }, + "ApiOrganizationPaginatedResponse": { + "description": "Response object for OrganizationPaginatedResponse", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": ["success", "data"], + "properties": { + "data": { + "$ref": "#/components/schemas/ApiPaginatedOrganization" + }, + "success": { + "type": "boolean", + "description": "Indicates whether if this response was a success or not" + } + } + } + } + } + }, + "ApiRepositoryMemberPaginatedResponse": { + "description": "Response object for RepositoryMemberPaginatedResponse", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": ["success", "data"], + "properties": { + "data": { + "$ref": "#/components/schemas/ApiPaginatedRepositoryMember" + }, + "success": { + "type": "boolean", + "description": "Indicates whether if this response was a success or not" + } + } + } + } + } + }, + "ApiRepositoryPaginatedResponse": { + "description": "Response object for RepositoryPaginatedResponse", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": ["success", "data"], + "properties": { + "data": { + "$ref": "#/components/schemas/ApiPaginatedRepository" + }, + "success": { + "type": "boolean", + "description": "Indicates whether if this response was a success or not" + } + } + } + } + } + }, "ApiSessionResponse": { "description": "Response object for SessionResponse", "content": { diff --git a/build/platforms/BUILD.bazel b/build/platforms/BUILD.bazel new file mode 100644 index 000000000..c801809a8 --- /dev/null +++ b/build/platforms/BUILD.bazel @@ -0,0 +1,55 @@ +# 🐻‍❄️📦 charted-server: Free, open source, and reliable Helm Chart registry made in Rust +# Copyright 2022-2023 Noelware, LLC. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# mainly for CI to build Apple Silicon variants of charted-server +platform( + name = "apple_silicon", + constraint_values = [ + "@platforms//os:macos", + "@platforms//cpu:aarch64", + ], +) + +platform( + name = "apple_intel", + constraint_values = [ + "@platforms//os:macos", + "@platforms//cpu:x86_64", + ], +) + +platform( + name = "linux_x64", + constraint_values = [ + "@platforms//os:linux", + "@platforms//cpu:x86_64", + ], +) + +platform( + name = "linux_aarch64", + constraint_values = [ + "@platforms//os:linux", + "@platforms//cpu:aarch64", + ], +) + +platform( + name = "windows_x64", + constraint_values = [ + "@platforms//os:windows", + "@platforms//cpu:x86_64", + ], +) diff --git a/build/utils.bzl b/build/utils.bzl index a6288570c..2f21050b8 100644 --- a/build/utils.bzl +++ b/build/utils.bzl @@ -36,7 +36,6 @@ CARGO_MANIFESTS = ["//{}:Cargo.toml".format(f) for f in [ "crates/sessions/ldap", "crates/sessions", "crates/storage", - "services/emails", "tools/helm-plugin", "tools/devtools", "server", diff --git a/crates/common/Cargo.toml b/crates/common/Cargo.toml index 27c7b014a..e0f129b78 100644 --- a/crates/common/Cargo.toml +++ b/crates/common/Cargo.toml @@ -31,6 +31,7 @@ hex = "0.4.3" humantime = "2.1.0" md-5 = "0.10.5" once_cell = "1.18.0" +paste = "1.0.14" rand = "0.8.5" regex = "1.9.0" semver = { version = "1.0.17", features = ["serde"] } diff --git a/crates/common/src/models/payloads.rs b/crates/common/src/models/payloads.rs index 9ca01eb55..d0cc5f9d0 100644 --- a/crates/common/src/models/payloads.rs +++ b/crates/common/src/models/payloads.rs @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use super::Name; +use super::{helm::ChartType, Name}; use serde::{Deserialize, Serialize}; use utoipa::ToSchema; use validator::Validate; @@ -38,6 +38,7 @@ pub struct CreateUserPayload { pub email: String, } +/// Payload for patching your user metadata. #[derive(Debug, Clone, Serialize, Deserialize, ToSchema, Validate)] pub struct PatchUserPayload { /// Optional field to update this user's gravatar email. If this user doesn't @@ -74,6 +75,8 @@ pub struct PatchUserPayload { pub name: Option, } +/// Payload to login as a user from the `GET /users/login` endpoint for session-based +/// authentication. #[derive(Debug, Clone, Serialize, Deserialize, ToSchema, Validate)] pub struct UserLoginPayload { /// Password to authenticate as. @@ -91,3 +94,78 @@ pub struct UserLoginPayload { #[validate(email)] pub email: Option, } + +/// Payload to create a Repository entity. +#[derive(Debug, Clone, Default, Serialize, Deserialize, ToSchema, Validate)] +pub struct CreateRepositoryPayload { + /// Short description about this repository. + #[serde(default)] + #[validate(length(max = 140))] + pub description: Option, + + /// Whether if this repository is private. + #[serde(default)] + pub private: bool, + + /// The contents of the README that will be displayed on the repository. If you're + /// using charted's official Helm plugin, new releases can update its README and it'll + /// be reflected. + /// + /// This should be valid Markdown, but XSS cross scripting is impossible as scripts + /// in codeblocks or via `