diff --git a/.aspect/rules/external_repository_action_cache/npm_translate_lock_MTA1Nzg5MzQ0MQ== b/.aspect/rules/external_repository_action_cache/npm_translate_lock_MTA1Nzg5MzQ0MQ== deleted file mode 100755 index 88484ad2c..000000000 --- a/.aspect/rules/external_repository_action_cache/npm_translate_lock_MTA1Nzg5MzQ0MQ== +++ /dev/null @@ -1,6 +0,0 @@ -# @generated -# Input hashes for repository rule npm_translate_lock(name = "ci_testing_npm", pnpm_lock = "//scripts/ci/testing:pnpm-lock.yaml"). -# This file should be checked into version control along with the pnpm-lock.yaml file. -scripts/ci/testing/.npmrc=-592547263 -scripts/ci/testing/pnpm-lock.yaml=812078161 -scripts/ci/testing/package.json=476052452 diff --git a/.coder/scripts/pre-init/install-sqlx-cli.sh b/.coder/scripts/pre-init/install-sqlx-cli.sh new file mode 100755 index 000000000..a2aec6936 --- /dev/null +++ b/.coder/scripts/pre-init/install-sqlx-cli.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +# 🐻‍❄️📦 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. + +if ! command -v sqlx; then + echo "===> Installing sqlx cli!" + cargo install sqlx-cli --no-default-features --features native-tls,postgres +fi diff --git a/.coder/scripts/pre-init/symlink.sh b/.coder/scripts/pre-init/symlink.sh index d87a14b29..60dcffc29 100755 --- a/.coder/scripts/pre-init/symlink.sh +++ b/.coder/scripts/pre-init/symlink.sh @@ -15,12 +15,12 @@ # See the License for the specific language governing permissions and # limitations under the License. -if ! [ -f "/usr/local/bin/buildifier" ]; then +if ! [ -L "/usr/local/bin/buildifier" ]; then echo "===> Symlinking \`bazel-buildifier\` ~> \`buildifier\`!" sudo ln -s /usr/local/bin/bazel-buildifier /usr/local/bin/buildifier fi -if ! [ -f "/usr/local/bin/sync-deps" ]; then +if ! [ -L "/usr/local/bin/sync-deps" ]; then echo "===> Symlinking ./scripts/sync_deps.sh ~> sync-deps" sudo ln -s $HOME/workspace/scripts/sync_deps.sh /usr/local/bin/sync-deps fi diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 2826b5817..b8225899f 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -23,6 +23,7 @@ "hashicorp.terraform", "redhat.vscode-yaml", "antfu.iconify", + "hashicorp.hcl", "Vue.volar" ], "settings": { diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 0b4cd3c72..21c50ab93 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -13,6 +13,7 @@ "hashicorp.terraform", "redhat.vscode-yaml", "antfu.iconify", + "hashicorp.hcl", "Vue.volar" ] } diff --git a/BUILD.bazel b/BUILD.bazel index fb0582250..26aa687f5 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -34,3 +34,15 @@ exports_files([ # determine where this build was compiled from. ".git", ]) + +alias( + name = "helm-plugin", + actual = "//tools/helm-plugin:bin", + visibility = ["//visibility:public"], +) + +alias( + name = "cli", + actual = "//cli:bin", + visibility = ["//visibility:public"], +) diff --git a/Cargo.bzl.lock b/Cargo.bzl.lock index 8112483e9..7b2165965 100644 --- a/Cargo.bzl.lock +++ b/Cargo.bzl.lock @@ -1,5 +1,5 @@ { - "checksum": "3631d2b368155c83cad22dc48c633e17d484a232f6c07860e993ec8e4b5f82d7", + "checksum": "be3221c35971a91f96f416eaa69335518927a7293d308be20f2f5b48f8454bf9", "crates": { "addr2line 0.20.0": { "name": "addr2line", @@ -70,6 +70,92 @@ }, "license": "0BSD OR MIT OR Apache-2.0" }, + "ahash 0.8.3": { + "name": "ahash", + "version": "0.8.3", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/ahash/0.8.3/download", + "sha256": "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" + } + }, + "targets": [ + { + "Library": { + "crate_name": "ahash", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "ahash", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "default", + "getrandom", + "runtime-rng", + "std" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "ahash 0.8.3", + "target": "build_script_build" + }, + { + "id": "cfg-if 1.0.0", + "target": "cfg_if" + }, + { + "id": "getrandom 0.2.10", + "target": "getrandom" + } + ], + "selects": { + "cfg(not(all(target_arch = \"arm\", target_os = \"none\")))": [ + { + "id": "once_cell 1.18.0", + "target": "once_cell" + } + ] + } + }, + "edition": "2018", + "version": "0.8.3" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "version_check 0.9.4", + "target": "version_check" + } + ], + "selects": {} + } + }, + "license": "MIT OR Apache-2.0" + }, "aho-corasick 1.0.2": { "name": "aho-corasick", "version": "1.0.2", @@ -117,6 +203,42 @@ }, "license": "Unlicense OR MIT" }, + "allocator-api2 0.2.15": { + "name": "allocator-api2", + "version": "0.2.15", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/allocator-api2/0.2.15/download", + "sha256": "56fc6cf8dc8c4158eed8649f9b8b0ea1518eb62b544fe9490d66fa0b349eafe9" + } + }, + "targets": [ + { + "Library": { + "crate_name": "allocator_api2", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "allocator_api2", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "alloc" + ], + "selects": {} + }, + "edition": "2018", + "version": "0.2.15" + }, + "license": "MIT OR Apache-2.0" + }, "android-tzdata 0.1.1": { "name": "android-tzdata", "version": "0.1.1", @@ -471,6 +593,69 @@ }, "license": "MIT OR Apache-2.0" }, + "argon2 0.5.1": { + "name": "argon2", + "version": "0.5.1", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/argon2/0.5.1/download", + "sha256": "b2e554a8638bdc1e4eae9984845306cc95f8a9208ba8d49c3859fd958b46774d" + } + }, + "targets": [ + { + "Library": { + "crate_name": "argon2", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "argon2", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "alloc", + "default", + "password-hash", + "rand" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "base64ct 1.6.0", + "target": "base64ct" + }, + { + "id": "blake2 0.10.6", + "target": "blake2" + }, + { + "id": "password-hash 0.5.0", + "target": "password_hash" + } + ], + "selects": { + "cfg(any(target_arch = \"x86\", target_arch = \"x86_64\"))": [ + { + "id": "cpufeatures 0.2.9", + "target": "cpufeatures" + } + ] + } + }, + "edition": "2021", + "version": "0.5.1" + }, + "license": "MIT OR Apache-2.0" + }, "async-trait 0.1.71": { "name": "async-trait", "version": "0.1.71", @@ -520,7 +705,7 @@ "target": "quote" }, { - "id": "syn 2.0.23", + "id": "syn 2.0.25", "target": "syn" } ], @@ -536,6 +721,52 @@ }, "license": "MIT OR Apache-2.0" }, + "atoi 2.0.0": { + "name": "atoi", + "version": "2.0.0", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/atoi/2.0.0/download", + "sha256": "f28d99ec8bfea296261ca1af174f24225171fea9664ba9003cbebee704810528" + } + }, + "targets": [ + { + "Library": { + "crate_name": "atoi", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "atoi", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "default", + "std" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "num-traits 0.2.15", + "target": "num_traits" + } + ], + "selects": {} + }, + "edition": "2021", + "version": "2.0.0" + }, + "license": "MIT" + }, "autocfg 1.1.0": { "name": "autocfg", "version": "1.1.0", @@ -2273,7 +2504,7 @@ "target": "pin_project_lite" }, { - "id": "serde 1.0.167", + "id": "serde 1.0.171", "target": "serde" }, { @@ -2502,7 +2733,7 @@ "target": "quote" }, { - "id": "syn 2.0.23", + "id": "syn 2.0.25", "target": "syn" } ], @@ -2733,19 +2964,19 @@ }, "license": "MIT" }, - "bitflags 1.3.2": { - "name": "bitflags", - "version": "1.3.2", + "base64ct 1.6.0": { + "name": "base64ct", + "version": "1.6.0", "repository": { "Http": { - "url": "https://crates.io/api/v1/crates/bitflags/1.3.2/download", - "sha256": "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + "url": "https://crates.io/api/v1/crates/base64ct/1.6.0/download", + "sha256": "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" } }, "targets": [ { "Library": { - "crate_name": "bitflags", + "crate_name": "base64ct", "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" @@ -2753,29 +2984,29 @@ } } ], - "library_target_name": "bitflags", + "library_target_name": "base64ct", "common_attrs": { "compile_data_glob": [ "**" ], "crate_features": { "common": [ - "default" + "alloc" ], "selects": {} }, - "edition": "2018", - "version": "1.3.2" + "edition": "2021", + "version": "1.6.0" }, - "license": "MIT/Apache-2.0" + "license": "Apache-2.0 OR MIT" }, - "bitflags 2.3.3": { + "bitflags 1.3.2": { "name": "bitflags", - "version": "2.3.3", + "version": "1.3.2", "repository": { "Http": { - "url": "https://crates.io/api/v1/crates/bitflags/2.3.3/download", - "sha256": "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" + "url": "https://crates.io/api/v1/crates/bitflags/1.3.2/download", + "sha256": "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" } }, "targets": [ @@ -2796,28 +3027,28 @@ ], "crate_features": { "common": [ - "std" + "default" ], "selects": {} }, - "edition": "2021", - "version": "2.3.3" + "edition": "2018", + "version": "1.3.2" }, - "license": "MIT OR Apache-2.0" + "license": "MIT/Apache-2.0" }, - "block-buffer 0.10.4": { - "name": "block-buffer", - "version": "0.10.4", + "bitflags 2.3.3": { + "name": "bitflags", + "version": "2.3.3", "repository": { "Http": { - "url": "https://crates.io/api/v1/crates/block-buffer/0.10.4/download", - "sha256": "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" + "url": "https://crates.io/api/v1/crates/bitflags/2.3.3/download", + "sha256": "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" } }, "targets": [ { "Library": { - "crate_name": "block_buffer", + "crate_name": "bitflags", "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" @@ -2825,28 +3056,239 @@ } } ], - "library_target_name": "block_buffer", + "library_target_name": "bitflags", "common_attrs": { "compile_data_glob": [ "**" ], - "deps": { - "common": [ - { - "id": "generic-array 0.14.7", - "target": "generic_array" - } - ], - "selects": {} - }, - "edition": "2018", - "version": "0.10.4" - }, - "license": "MIT OR Apache-2.0" - }, - "bumpalo 3.13.0": { - "name": "bumpalo", - "version": "3.13.0", + "crate_features": { + "common": [], + "selects": { + "aarch64-apple-darwin": [ + "std" + ], + "aarch64-apple-ios": [ + "std" + ], + "aarch64-apple-ios-sim": [ + "std" + ], + "aarch64-fuchsia": [ + "std" + ], + "aarch64-linux-android": [ + "std" + ], + "aarch64-unknown-linux-gnu": [ + "std" + ], + "arm-unknown-linux-gnueabi": [ + "std" + ], + "armv7-linux-androideabi": [ + "std" + ], + "armv7-unknown-linux-gnueabi": [ + "std" + ], + "i686-apple-darwin": [ + "std" + ], + "i686-linux-android": [ + "std" + ], + "i686-unknown-freebsd": [ + "std" + ], + "i686-unknown-linux-gnu": [ + "std" + ], + "powerpc-unknown-linux-gnu": [ + "std" + ], + "riscv32imc-unknown-none-elf": [ + "std" + ], + "riscv64gc-unknown-none-elf": [ + "std" + ], + "s390x-unknown-linux-gnu": [ + "std" + ], + "thumbv7em-none-eabi": [ + "std" + ], + "thumbv8m.main-none-eabi": [ + "std" + ], + "wasm32-wasi": [ + "std" + ], + "x86_64-apple-darwin": [ + "std" + ], + "x86_64-apple-ios": [ + "std" + ], + "x86_64-fuchsia": [ + "std" + ], + "x86_64-linux-android": [ + "std" + ], + "x86_64-unknown-freebsd": [ + "std" + ], + "x86_64-unknown-linux-gnu": [ + "std" + ], + "x86_64-unknown-none": [ + "std" + ] + } + }, + "deps": { + "common": [ + { + "id": "serde 1.0.171", + "target": "serde" + } + ], + "selects": {} + }, + "edition": "2021", + "version": "2.3.3" + }, + "license": "MIT OR Apache-2.0" + }, + "blake2 0.10.6": { + "name": "blake2", + "version": "0.10.6", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/blake2/0.10.6/download", + "sha256": "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" + } + }, + "targets": [ + { + "Library": { + "crate_name": "blake2", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "blake2", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "digest 0.10.7", + "target": "digest" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.10.6" + }, + "license": "MIT OR Apache-2.0" + }, + "block-buffer 0.10.4": { + "name": "block-buffer", + "version": "0.10.4", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/block-buffer/0.10.4/download", + "sha256": "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" + } + }, + "targets": [ + { + "Library": { + "crate_name": "block_buffer", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "block_buffer", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "generic-array 0.14.7", + "target": "generic_array" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.10.4" + }, + "license": "MIT OR Apache-2.0" + }, + "bollard-stubs 1.41.0": { + "name": "bollard-stubs", + "version": "1.41.0", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/bollard-stubs/1.41.0/download", + "sha256": "ed2f2e73fffe9455141e170fb9c1feb0ac521ec7e7dcd47a7cab72a658490fb8" + } + }, + "targets": [ + { + "Library": { + "crate_name": "bollard_stubs", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "bollard_stubs", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "chrono 0.4.26", + "target": "chrono" + }, + { + "id": "serde 1.0.171", + "target": "serde" + }, + { + "id": "serde_with 1.14.0", + "target": "serde_with" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "1.41.0" + }, + "license": "Apache-2.0" + }, + "bumpalo 3.13.0": { + "name": "bumpalo", + "version": "3.13.0", "repository": { "Http": { "url": "https://crates.io/api/v1/crates/bumpalo/3.13.0/download", @@ -2880,6 +3322,42 @@ }, "license": "MIT/Apache-2.0" }, + "byteorder 1.4.3": { + "name": "byteorder", + "version": "1.4.3", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/byteorder/1.4.3/download", + "sha256": "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" + } + }, + "targets": [ + { + "Library": { + "crate_name": "byteorder", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "byteorder", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "std" + ], + "selects": {} + }, + "edition": "2018", + "version": "1.4.3" + }, + "license": "Unlicense OR MIT" + }, "bytes 1.4.0": { "name": "bytes", "version": "1.4.0", @@ -3186,15 +3664,19 @@ "target": "semver" }, { - "id": "serde 1.0.167", + "id": "serde 1.0.171", "target": "serde" }, + { + "id": "sqlx 0.7.0", + "target": "sqlx" + }, { "id": "thiserror 1.0.43", "target": "thiserror" }, { - "id": "utoipa 3.3.0", + "id": "utoipa 3.4.0", "target": "utoipa" } ], @@ -3282,7 +3764,7 @@ "target": "remi_s3" }, { - "id": "serde 1.0.167", + "id": "serde 1.0.171", "target": "serde" }, { @@ -3334,7 +3816,61 @@ "compile_data_glob": [ "**" ], + "deps": { + "common": [ + { + "id": "argon2 0.5.1", + "target": "argon2" + }, + { + "id": "eyre 0.6.8", + "target": "eyre" + }, + { + "id": "false 0.0.0", + "target": "false" + }, + { + "id": "once_cell 1.18.0", + "target": "once_cell" + }, + { + "id": "regex 1.9.1", + "target": "regex" + }, + { + "id": "serde 1.0.171", + "target": "serde" + }, + { + "id": "sqlx 0.7.0", + "target": "sqlx" + }, + { + "id": "tracing 0.1.37", + "target": "tracing" + }, + { + "id": "utoipa 3.4.0", + "target": "utoipa" + }, + { + "id": "validator 0.16.1", + "target": "validator" + } + ], + "selects": {} + }, "edition": "2021", + "proc_macro_deps": { + "common": [ + { + "id": "async-trait 0.1.71", + "target": "async_trait" + } + ], + "selects": {} + }, "version": "0.0.0-devel.0" }, "license": null @@ -3513,7 +4049,16 @@ "compile_data_glob": [ "**" ], - "edition": "2021", + "deps": { + "common": [ + { + "id": "utoipa 3.4.0", + "target": "utoipa" + } + ], + "selects": {} + }, + "edition": "2021", "version": "0.0.0-devel.0" }, "license": null @@ -3685,7 +4230,7 @@ "target": "sentry_tracing" }, { - "id": "serde 1.0.167", + "id": "serde 1.0.171", "target": "serde" }, { @@ -3696,6 +4241,10 @@ "id": "serde_yaml 0.9.22", "target": "serde_yaml" }, + { + "id": "sqlx 0.7.0", + "target": "sqlx" + }, { "id": "tokio 1.29.1", "target": "tokio" @@ -3721,13 +4270,22 @@ "target": "tracing_subscriber" }, { - "id": "utoipa 3.3.0", + "id": "utoipa 3.4.0", "target": "utoipa" } ], "selects": {} }, "edition": "2021", + "proc_macro_deps": { + "common": [ + { + "id": "async-trait 0.1.71", + "target": "async_trait" + } + ], + "selects": {} + }, "version": "0.0.0-devel.0" }, "license": null @@ -3778,6 +4336,78 @@ }, "license": null }, + "charted-testcontainers 0.0.0-devel.0": { + "name": "charted-testcontainers", + "version": "0.0.0-devel.0", + "repository": null, + "targets": [ + { + "Library": { + "crate_name": "charted_testcontainers", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "charted_testcontainers", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "testcontainers 0.14.0", + "target": "testcontainers" + } + ], + "selects": {} + }, + "edition": "2021", + "version": "0.0.0-devel.0" + }, + "license": null + }, + "charted-testcontainers-macros 0.0.0-devel.0": { + "name": "charted-testcontainers-macros", + "version": "0.0.0-devel.0", + "repository": null, + "targets": [ + { + "ProcMacro": { + "crate_name": "charted_testcontainers_macros", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "charted_testcontainers_macros", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "quote 1.0.29", + "target": "quote" + }, + { + "id": "syn 2.0.25", + "target": "syn" + } + ], + "selects": {} + }, + "edition": "2021", + "version": "0.0.0-devel.0" + }, + "license": null + }, "chrono 0.4.26": { "name": "chrono", "version": "0.4.26", @@ -3826,7 +4456,7 @@ "target": "num_traits" }, { - "id": "serde 1.0.167", + "id": "serde 1.0.171", "target": "serde" }, { @@ -4090,7 +4720,7 @@ "target": "quote" }, { - "id": "syn 2.0.23", + "id": "syn 2.0.25", "target": "syn" } ], @@ -4291,6 +4921,36 @@ }, "license": "MIT OR Apache-2.0" }, + "const-oid 0.9.4": { + "name": "const-oid", + "version": "0.9.4", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/const-oid/0.9.4/download", + "sha256": "795bc6e66a8e340f075fcf6227e417a2dc976b92b91f3cdc778bb858778b6747" + } + }, + "targets": [ + { + "Library": { + "crate_name": "const_oid", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "const_oid", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "edition": "2021", + "version": "0.9.4" + }, + "license": "Apache-2.0 OR MIT" + }, "core-foundation 0.9.3": { "name": "core-foundation", "version": "0.9.3", @@ -4364,13 +5024,13 @@ }, "license": "MIT / Apache-2.0" }, - "cpufeatures 0.2.8": { + "cpufeatures 0.2.9": { "name": "cpufeatures", - "version": "0.2.8", + "version": "0.2.9", "repository": { "Http": { - "url": "https://crates.io/api/v1/crates/cpufeatures/0.2.8/download", - "sha256": "03e69e28e9f7f77debdedbaafa2866e1de9ba56df55a8bd7cfc724c25a09987c" + "url": "https://crates.io/api/v1/crates/cpufeatures/0.2.9/download", + "sha256": "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" } }, "targets": [ @@ -4413,7 +5073,76 @@ } }, "edition": "2018", - "version": "0.2.8" + "version": "0.2.9" + }, + "license": "MIT OR Apache-2.0" + }, + "crc 3.0.1": { + "name": "crc", + "version": "3.0.1", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/crc/3.0.1/download", + "sha256": "86ec7a15cbe22e59248fc7eadb1907dab5ba09372595da4d73dd805ed4417dfe" + } + }, + "targets": [ + { + "Library": { + "crate_name": "crc", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "crc", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "crc-catalog 2.2.0", + "target": "crc_catalog" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "3.0.1" + }, + "license": "MIT OR Apache-2.0" + }, + "crc-catalog 2.2.0": { + "name": "crc-catalog", + "version": "2.2.0", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/crc-catalog/2.2.0/download", + "sha256": "9cace84e55f07e7301bae1c519df89cdad8cc3cd868413d3fdbdeca9ff3db484" + } + }, + "targets": [ + { + "Library": { + "crate_name": "crc_catalog", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "crc_catalog", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "edition": "2018", + "version": "2.2.0" }, "license": "MIT OR Apache-2.0" }, @@ -4735,6 +5464,75 @@ }, "license": "MIT OR Apache-2.0" }, + "crossbeam-queue 0.3.8": { + "name": "crossbeam-queue", + "version": "0.3.8", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/crossbeam-queue/0.3.8/download", + "sha256": "d1cfb3ea8a53f37c40dea2c7bedcbd88bdfae54f5e2175d6ecaff1c988353add" + } + }, + "targets": [ + { + "Library": { + "crate_name": "crossbeam_queue", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "crossbeam_queue", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "alloc", + "default", + "std" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "cfg-if 1.0.0", + "target": "cfg_if" + }, + { + "id": "crossbeam-queue 0.3.8", + "target": "build_script_build" + }, + { + "id": "crossbeam-utils 0.8.16", + "target": "crossbeam_utils" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.3.8" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ] + }, + "license": "MIT OR Apache-2.0" + }, "crossbeam-utils 0.8.16": { "name": "crossbeam-utils", "version": "0.8.16", @@ -4848,13 +5646,13 @@ }, "license": "MIT OR Apache-2.0" }, - "darling 0.14.4": { + "darling 0.13.4": { "name": "darling", - "version": "0.14.4", + "version": "0.13.4", "repository": { "Http": { - "url": "https://crates.io/api/v1/crates/darling/0.14.4/download", - "sha256": "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" + "url": "https://crates.io/api/v1/crates/darling/0.13.4/download", + "sha256": "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c" } }, "targets": [ @@ -4883,7 +5681,7 @@ "deps": { "common": [ { - "id": "darling_core 0.14.4", + "id": "darling_core 0.13.4", "target": "darling_core" } ], @@ -4893,29 +5691,29 @@ "proc_macro_deps": { "common": [ { - "id": "darling_macro 0.14.4", + "id": "darling_macro 0.13.4", "target": "darling_macro" } ], "selects": {} }, - "version": "0.14.4" + "version": "0.13.4" }, "license": "MIT" }, - "darling_core 0.14.4": { - "name": "darling_core", + "darling 0.14.4": { + "name": "darling", "version": "0.14.4", "repository": { "Http": { - "url": "https://crates.io/api/v1/crates/darling_core/0.14.4/download", - "sha256": "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" + "url": "https://crates.io/api/v1/crates/darling/0.14.4/download", + "sha256": "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" } }, "targets": [ { "Library": { - "crate_name": "darling_core", + "crate_name": "darling", "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" @@ -4923,14 +5721,14 @@ } } ], - "library_target_name": "darling_core", + "library_target_name": "darling", "common_attrs": { "compile_data_glob": [ "**" ], "crate_features": { "common": [ - "strsim", + "default", "suggestions" ], "selects": {} @@ -4938,11 +5736,132 @@ "deps": { "common": [ { - "id": "fnv 1.0.7", - "target": "fnv" - }, + "id": "darling_core 0.14.4", + "target": "darling_core" + } + ], + "selects": {} + }, + "edition": "2018", + "proc_macro_deps": { + "common": [ { - "id": "ident_case 1.0.1", + "id": "darling_macro 0.14.4", + "target": "darling_macro" + } + ], + "selects": {} + }, + "version": "0.14.4" + }, + "license": "MIT" + }, + "darling_core 0.13.4": { + "name": "darling_core", + "version": "0.13.4", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/darling_core/0.13.4/download", + "sha256": "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610" + } + }, + "targets": [ + { + "Library": { + "crate_name": "darling_core", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "darling_core", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "strsim", + "suggestions" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "fnv 1.0.7", + "target": "fnv" + }, + { + "id": "ident_case 1.0.1", + "target": "ident_case" + }, + { + "id": "proc-macro2 1.0.63", + "target": "proc_macro2" + }, + { + "id": "quote 1.0.29", + "target": "quote" + }, + { + "id": "strsim 0.10.0", + "target": "strsim" + }, + { + "id": "syn 1.0.109", + "target": "syn" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.13.4" + }, + "license": "MIT" + }, + "darling_core 0.14.4": { + "name": "darling_core", + "version": "0.14.4", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/darling_core/0.14.4/download", + "sha256": "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" + } + }, + "targets": [ + { + "Library": { + "crate_name": "darling_core", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "darling_core", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "strsim", + "suggestions" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "fnv 1.0.7", + "target": "fnv" + }, + { + "id": "ident_case 1.0.1", "target": "ident_case" }, { @@ -4969,6 +5888,53 @@ }, "license": "MIT" }, + "darling_macro 0.13.4": { + "name": "darling_macro", + "version": "0.13.4", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/darling_macro/0.13.4/download", + "sha256": "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" + } + }, + "targets": [ + { + "ProcMacro": { + "crate_name": "darling_macro", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "darling_macro", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "darling_core 0.13.4", + "target": "darling_core" + }, + { + "id": "quote 1.0.29", + "target": "quote" + }, + { + "id": "syn 1.0.109", + "target": "syn" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.13.4" + }, + "license": "MIT" + }, "darling_macro 0.14.4": { "name": "darling_macro", "version": "0.14.4", @@ -5050,7 +6016,7 @@ "deps": { "common": [ { - "id": "serde 1.0.167", + "id": "serde 1.0.171", "target": "serde" }, { @@ -5065,6 +6031,53 @@ }, "license": "Apache-2.0" }, + "der 0.7.7": { + "name": "der", + "version": "0.7.7", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/der/0.7.7/download", + "sha256": "0c7ed52955ce76b1554f509074bb357d3fb8ac9b51288a65a3fd480d1dfba946" + } + }, + "targets": [ + { + "Library": { + "crate_name": "der", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "der", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "const-oid 0.9.4", + "target": "const_oid" + }, + { + "id": "pem-rfc7468 0.7.0", + "target": "pem_rfc7468" + }, + { + "id": "zeroize 1.6.0", + "target": "zeroize" + } + ], + "selects": {} + }, + "edition": "2021", + "version": "0.7.7" + }, + "license": "Apache-2.0 OR MIT" + }, "derive_builder 0.12.0": { "name": "derive_builder", "version": "0.12.0", @@ -5248,6 +6261,10 @@ "id": "block-buffer 0.10.4", "target": "block_buffer" }, + { + "id": "const-oid 0.9.4", + "target": "const_oid" + }, { "id": "crypto-common 0.1.6", "target": "crypto_common" @@ -5391,6 +6408,36 @@ }, "license": "MIT" }, + "dotenvy 0.15.7": { + "name": "dotenvy", + "version": "0.15.7", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/dotenvy/0.15.7/download", + "sha256": "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" + } + }, + "targets": [ + { + "Library": { + "crate_name": "dotenvy", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "dotenvy", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "edition": "2018", + "version": "0.15.7" + }, + "license": "MIT" + }, "either 1.8.1": { "name": "either", "version": "1.8.1", @@ -5419,10 +6466,20 @@ "crate_features": { "common": [ "default", + "serde", "use_std" ], "selects": {} }, + "deps": { + "common": [ + { + "id": "serde 1.0.171", + "target": "serde" + } + ], + "selects": {} + }, "edition": "2018", "version": "1.8.1" }, @@ -5635,64 +6692,144 @@ }, "license": "MIT" }, - "eyre 0.6.8": { - "name": "eyre", - "version": "0.6.8", + "etcetera 0.8.0": { + "name": "etcetera", + "version": "0.8.0", "repository": { "Http": { - "url": "https://crates.io/api/v1/crates/eyre/0.6.8/download", - "sha256": "4c2b6b5a29c02cdc822728b7d7b8ae1bab3e3b05d44522770ddd49722eeac7eb" + "url": "https://crates.io/api/v1/crates/etcetera/0.8.0/download", + "sha256": "136d1b5283a1ab77bd9257427ffd09d8667ced0570b6f938942bc7568ed5b943" } }, "targets": [ { "Library": { - "crate_name": "eyre", + "crate_name": "etcetera", "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" ] } - }, - { - "BuildScript": { - "crate_name": "build_script_build", - "crate_root": "build.rs", - "srcs": [ - "**/*.rs" - ] - } } ], - "library_target_name": "eyre", + "library_target_name": "etcetera", "common_attrs": { "compile_data_glob": [ "**" ], - "crate_features": { - "common": [ - "auto-install", - "default", - "track-caller" - ], - "selects": {} - }, "deps": { "common": [ { - "id": "eyre 0.6.8", - "target": "build_script_build" - }, - { - "id": "indenter 0.3.3", - "target": "indenter" + "id": "cfg-if 1.0.0", + "target": "cfg_if" }, { - "id": "once_cell 1.18.0", - "target": "once_cell" + "id": "home 0.5.5", + "target": "home" } ], - "selects": {} + "selects": { + "cfg(windows)": [ + { + "id": "windows-sys 0.48.0", + "target": "windows_sys" + } + ] + } + }, + "edition": "2018", + "version": "0.8.0" + }, + "license": "MIT OR Apache-2.0" + }, + "event-listener 2.5.3": { + "name": "event-listener", + "version": "2.5.3", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/event-listener/2.5.3/download", + "sha256": "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" + } + }, + "targets": [ + { + "Library": { + "crate_name": "event_listener", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "event_listener", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "edition": "2018", + "version": "2.5.3" + }, + "license": "Apache-2.0 OR MIT" + }, + "eyre 0.6.8": { + "name": "eyre", + "version": "0.6.8", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/eyre/0.6.8/download", + "sha256": "4c2b6b5a29c02cdc822728b7d7b8ae1bab3e3b05d44522770ddd49722eeac7eb" + } + }, + "targets": [ + { + "Library": { + "crate_name": "eyre", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "eyre", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "auto-install", + "default", + "track-caller" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "eyre 0.6.8", + "target": "build_script_build" + }, + { + "id": "indenter 0.3.3", + "target": "indenter" + }, + { + "id": "once_cell 1.18.0", + "target": "once_cell" + } + ], + "selects": {} }, "edition": "2018", "version": "0.6.8" @@ -5704,6 +6841,36 @@ }, "license": "MIT OR Apache-2.0" }, + "false 0.0.0": { + "name": "false", + "version": "0.0.0", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/false/0.0.0/download", + "sha256": "849bcc293a0d93c4d4adbebc8decf828a832a1d5e445af888cd99bc81ec0f96b" + } + }, + "targets": [ + { + "Library": { + "crate_name": "false", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "false", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "edition": "2018", + "version": "0.0.0" + }, + "license": "MIT" + }, "fastrand 1.9.0": { "name": "fastrand", "version": "1.9.0", @@ -5824,6 +6991,58 @@ }, "license": "MIT OR Apache-2.0" }, + "flume 0.10.14": { + "name": "flume", + "version": "0.10.14", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/flume/0.10.14/download", + "sha256": "1657b4441c3403d9f7b3409e47575237dac27b1b5726df654a6ecbf92f0f7577" + } + }, + "targets": [ + { + "Library": { + "crate_name": "flume", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "flume", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "futures-core 0.3.28", + "target": "futures_core" + }, + { + "id": "futures-sink 0.3.28", + "target": "futures_sink" + }, + { + "id": "pin-project 1.1.2", + "target": "pin_project" + }, + { + "id": "spin 0.9.8", + "target": "spin", + "alias": "spin1" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.10.14" + }, + "license": "Apache-2.0/MIT" + }, "fnv 1.0.7": { "name": "fnv", "version": "1.0.7", @@ -6236,6 +7455,62 @@ }, "license": "MIT OR Apache-2.0" }, + "futures-intrusive 0.5.0": { + "name": "futures-intrusive", + "version": "0.5.0", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/futures-intrusive/0.5.0/download", + "sha256": "1d930c203dd0b6ff06e0201a4a2fe9149b43c684fd4420555b26d21b1a02956f" + } + }, + "targets": [ + { + "Library": { + "crate_name": "futures_intrusive", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "futures_intrusive", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "alloc", + "default", + "parking_lot", + "std" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "futures-core 0.3.28", + "target": "futures_core" + }, + { + "id": "lock_api 0.4.10", + "target": "lock_api" + }, + { + "id": "parking_lot 0.12.1", + "target": "parking_lot" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.5.0" + }, + "license": "MIT OR Apache-2.0" + }, "futures-io 0.3.28": { "name": "futures-io", "version": "0.3.28", @@ -6263,6 +7538,7 @@ ], "crate_features": { "common": [ + "default", "std" ], "selects": {} @@ -6308,7 +7584,7 @@ "target": "quote" }, { - "id": "syn 2.0.23", + "id": "syn 2.0.25", "target": "syn" } ], @@ -6842,15 +8118,71 @@ ], "crate_features": { "common": [ + "ahash", + "allocator-api2", + "default", + "inline-more", "raw" ], "selects": {} }, + "deps": { + "common": [ + { + "id": "ahash 0.8.3", + "target": "ahash" + }, + { + "id": "allocator-api2 0.2.15", + "target": "allocator_api2" + } + ], + "selects": {} + }, "edition": "2021", "version": "0.14.0" }, "license": "MIT OR Apache-2.0" }, + "hashlink 0.8.3": { + "name": "hashlink", + "version": "0.8.3", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/hashlink/0.8.3/download", + "sha256": "312f66718a2d7789ffef4f4b7b213138ed9f1eb3aa1d0d82fc99f88fb3ffd26f" + } + }, + "targets": [ + { + "Library": { + "crate_name": "hashlink", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "hashlink", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "hashbrown 0.14.0", + "target": "hashbrown" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.8.3" + }, + "license": "MIT OR Apache-2.0" + }, "headers 0.3.8": { "name": "headers", "version": "0.3.8", @@ -6984,11 +8316,22 @@ ], "crate_features": { "common": [ - "default" + "default", + "unicode", + "unicode-segmentation" ], "selects": {} }, - "edition": "2018", + "deps": { + "common": [ + { + "id": "unicode-segmentation 1.10.1", + "target": "unicode_segmentation" + } + ], + "selects": {} + }, + "edition": "2018", "version": "0.4.1" }, "license": "MIT OR Apache-2.0" @@ -7061,6 +8404,45 @@ }, "license": "MIT OR Apache-2.0" }, + "hkdf 0.12.3": { + "name": "hkdf", + "version": "0.12.3", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/hkdf/0.12.3/download", + "sha256": "791a029f6b9fc27657f6f188ec6e5e43f6911f6f878e0dc5501396e09809d437" + } + }, + "targets": [ + { + "Library": { + "crate_name": "hkdf", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "hkdf", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "hmac 0.12.1", + "target": "hmac" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.12.3" + }, + "license": "MIT OR Apache-2.0" + }, "hmac 0.12.1": { "name": "hmac", "version": "0.12.1", @@ -7100,6 +8482,47 @@ }, "license": "MIT OR Apache-2.0" }, + "home 0.5.5": { + "name": "home", + "version": "0.5.5", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/home/0.5.5/download", + "sha256": "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" + } + }, + "targets": [ + { + "Library": { + "crate_name": "home", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "home", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [], + "selects": { + "cfg(windows)": [ + { + "id": "windows-sys 0.48.0", + "target": "windows_sys" + } + ] + } + }, + "edition": "2018", + "version": "0.5.5" + }, + "license": "MIT OR Apache-2.0" + }, "hostname 0.3.1": { "name": "hostname", "version": "0.3.1", @@ -7878,7 +9301,6 @@ ], "crate_features": { "common": [ - "serde", "std" ], "selects": {} @@ -7892,10 +9314,6 @@ { "id": "indexmap 1.9.3", "target": "build_script_build" - }, - { - "id": "serde 1.0.167", - "target": "serde" } ], "selects": {} @@ -7947,6 +9365,7 @@ "crate_features": { "common": [ "default", + "serde", "std" ], "selects": {} @@ -7960,6 +9379,10 @@ { "id": "hashbrown 0.14.0", "target": "hashbrown" + }, + { + "id": "serde 1.0.171", + "target": "serde" } ], "selects": {} @@ -8209,6 +9632,53 @@ }, "license": "MIT" }, + "itertools 0.10.5": { + "name": "itertools", + "version": "0.10.5", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/itertools/0.10.5/download", + "sha256": "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" + } + }, + "targets": [ + { + "Library": { + "crate_name": "itertools", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "itertools", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "default", + "use_alloc", + "use_std" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "either 1.8.1", + "target": "either" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.10.5" + }, + "license": "MIT/Apache-2.0" + }, "itoa 1.0.8": { "name": "itoa", "version": "1.0.8", @@ -8303,6 +9773,15 @@ "compile_data_glob": [ "**" ], + "deps": { + "common": [ + { + "id": "spin 0.5.2", + "target": "spin" + } + ], + "selects": {} + }, "edition": "2015", "version": "1.4.0" }, @@ -8345,76 +9824,10 @@ "crate_features": { "common": [ "default", + "extra_traits", "std" ], - "selects": { - "aarch64-apple-darwin": [ - "extra_traits" - ], - "aarch64-apple-ios": [ - "extra_traits" - ], - "aarch64-apple-ios-sim": [ - "extra_traits" - ], - "aarch64-fuchsia": [ - "extra_traits" - ], - "aarch64-linux-android": [ - "extra_traits" - ], - "armv7-linux-androideabi": [ - "extra_traits" - ], - "i686-apple-darwin": [ - "extra_traits" - ], - "i686-linux-android": [ - "extra_traits" - ], - "i686-unknown-freebsd": [ - "extra_traits" - ], - "powerpc-unknown-linux-gnu": [ - "extra_traits" - ], - "riscv32imc-unknown-none-elf": [ - "extra_traits" - ], - "riscv64gc-unknown-none-elf": [ - "extra_traits" - ], - "s390x-unknown-linux-gnu": [ - "extra_traits" - ], - "thumbv7em-none-eabi": [ - "extra_traits" - ], - "thumbv8m.main-none-eabi": [ - "extra_traits" - ], - "wasm32-wasi": [ - "extra_traits" - ], - "x86_64-apple-darwin": [ - "extra_traits" - ], - "x86_64-apple-ios": [ - "extra_traits" - ], - "x86_64-fuchsia": [ - "extra_traits" - ], - "x86_64-linux-android": [ - "extra_traits" - ], - "x86_64-unknown-freebsd": [ - "extra_traits" - ], - "x86_64-unknown-none": [ - "extra_traits" - ] - } + "selects": {} }, "deps": { "common": [ @@ -8435,103 +9848,72 @@ }, "license": "MIT OR Apache-2.0" }, - "linux-raw-sys 0.3.8": { - "name": "linux-raw-sys", - "version": "0.3.8", + "libm 0.2.7": { + "name": "libm", + "version": "0.2.7", "repository": { "Http": { - "url": "https://crates.io/api/v1/crates/linux-raw-sys/0.3.8/download", - "sha256": "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" + "url": "https://crates.io/api/v1/crates/libm/0.2.7/download", + "sha256": "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4" } }, "targets": [ { "Library": { - "crate_name": "linux_raw_sys", + "crate_name": "libm", "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" ] } - } - ], - "library_target_name": "linux_raw_sys", - "common_attrs": { - "compile_data_glob": [ - "**" - ], - "edition": "2018", - "version": "0.3.8" - }, - "license": "Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT" - }, - "linux-raw-sys 0.4.3": { - "name": "linux-raw-sys", - "version": "0.4.3", - "repository": { - "Http": { - "url": "https://crates.io/api/v1/crates/linux-raw-sys/0.4.3/download", - "sha256": "09fc20d2ca12cb9f044c93e3bd6d32d523e6e2ec3db4f7b2939cd99026ecd3f0" - } - }, - "targets": [ + }, { - "Library": { - "crate_name": "linux_raw_sys", - "crate_root": "src/lib.rs", + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", "srcs": [ "**/*.rs" ] } } ], - "library_target_name": "linux_raw_sys", + "library_target_name": "libm", "common_attrs": { "compile_data_glob": [ "**" ], - "crate_features": { + "deps": { "common": [ - "general", - "ioctl", - "no_std" + { + "id": "libm 0.2.7", + "target": "build_script_build" + } ], - "selects": { - "aarch64-unknown-linux-gnu": [ - "errno" - ], - "arm-unknown-linux-gnueabi": [ - "errno" - ], - "armv7-unknown-linux-gnueabi": [ - "errno" - ], - "i686-unknown-linux-gnu": [ - "errno" - ], - "x86_64-unknown-linux-gnu": [ - "errno" - ] - } + "selects": {} }, - "edition": "2021", - "version": "0.4.3" + "edition": "2018", + "version": "0.2.7" }, - "license": "Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT" + "build_script_attrs": { + "data_glob": [ + "**" + ] + }, + "license": "MIT OR Apache-2.0" }, - "lock_api 0.4.10": { - "name": "lock_api", - "version": "0.4.10", + "libsqlite3-sys 0.26.0": { + "name": "libsqlite3-sys", + "version": "0.26.0", "repository": { "Http": { - "url": "https://crates.io/api/v1/crates/lock_api/0.4.10/download", - "sha256": "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" + "url": "https://crates.io/api/v1/crates/libsqlite3-sys/0.26.0/download", + "sha256": "afc22eff61b133b115c6e8c74e818c628d6d5e7a502afea6f64dee076dd94326" } }, "targets": [ { "Library": { - "crate_name": "lock_api", + "crate_name": "libsqlite3_sys", "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" @@ -8548,7 +9930,171 @@ } } ], - "library_target_name": "lock_api", + "library_target_name": "libsqlite3_sys", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "libsqlite3-sys 0.26.0", + "target": "build_script_build" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.26.0" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "cc 1.0.79", + "target": "cc" + }, + { + "id": "pkg-config 0.3.27", + "target": "pkg_config" + }, + { + "id": "vcpkg 0.2.15", + "target": "vcpkg" + } + ], + "selects": {} + }, + "links": "sqlite3" + }, + "license": "MIT" + }, + "linux-raw-sys 0.3.8": { + "name": "linux-raw-sys", + "version": "0.3.8", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/linux-raw-sys/0.3.8/download", + "sha256": "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" + } + }, + "targets": [ + { + "Library": { + "crate_name": "linux_raw_sys", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "linux_raw_sys", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "errno", + "general", + "ioctl", + "no_std" + ], + "selects": {} + }, + "edition": "2018", + "version": "0.3.8" + }, + "license": "Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT" + }, + "linux-raw-sys 0.4.3": { + "name": "linux-raw-sys", + "version": "0.4.3", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/linux-raw-sys/0.4.3/download", + "sha256": "09fc20d2ca12cb9f044c93e3bd6d32d523e6e2ec3db4f7b2939cd99026ecd3f0" + } + }, + "targets": [ + { + "Library": { + "crate_name": "linux_raw_sys", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "linux_raw_sys", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "general", + "ioctl", + "no_std" + ], + "selects": { + "aarch64-unknown-linux-gnu": [ + "errno" + ], + "arm-unknown-linux-gnueabi": [ + "errno" + ], + "armv7-unknown-linux-gnueabi": [ + "errno" + ], + "i686-unknown-linux-gnu": [ + "errno" + ], + "x86_64-unknown-linux-gnu": [ + "errno" + ] + } + }, + "edition": "2021", + "version": "0.4.3" + }, + "license": "Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT" + }, + "lock_api 0.4.10": { + "name": "lock_api", + "version": "0.4.10", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/lock_api/0.4.10/download", + "sha256": "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" + } + }, + "targets": [ + { + "Library": { + "crate_name": "lock_api", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "lock_api", "common_attrs": { "compile_data_glob": [ "**" @@ -8903,7 +10449,7 @@ "deps": { "common": [ { - "id": "serde 1.0.167", + "id": "serde 1.0.171", "target": "serde" }, { @@ -8948,6 +10494,42 @@ }, "license": "MIT OR Apache-2.0" }, + "minimal-lexical 0.2.1": { + "name": "minimal-lexical", + "version": "0.2.1", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/minimal-lexical/0.2.1/download", + "sha256": "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + } + }, + "targets": [ + { + "Library": { + "crate_name": "minimal_lexical", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "minimal_lexical", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "std" + ], + "selects": {} + }, + "edition": "2018", + "version": "0.2.1" + }, + "license": "MIT/Apache-2.0" + }, "miniz_oxide 0.7.1": { "name": "miniz_oxide", "version": "0.7.1", @@ -9256,6 +10838,57 @@ }, "license": "MIT/Apache-2.0" }, + "nom 7.1.3": { + "name": "nom", + "version": "7.1.3", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/nom/7.1.3/download", + "sha256": "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" + } + }, + "targets": [ + { + "Library": { + "crate_name": "nom", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "nom", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "alloc", + "default", + "std" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "memchr 2.5.0", + "target": "memchr" + }, + { + "id": "minimal-lexical 0.2.1", + "target": "minimal_lexical" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "7.1.3" + }, + "license": "MIT" + }, "ntapi 0.4.1": { "name": "ntapi", "version": "0.4.1", @@ -9366,19 +10999,19 @@ }, "license": "MIT" }, - "num-integer 0.1.45": { - "name": "num-integer", - "version": "0.1.45", + "num-bigint-dig 0.8.4": { + "name": "num-bigint-dig", + "version": "0.8.4", "repository": { "Http": { - "url": "https://crates.io/api/v1/crates/num-integer/0.1.45/download", - "sha256": "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" + "url": "https://crates.io/api/v1/crates/num-bigint-dig/0.8.4/download", + "sha256": "dc84195820f291c7697304f3cbdadd1cb7199c0efc917ff5eafd71225c136151" } }, "targets": [ { "Library": { - "crate_name": "num_integer", + "crate_name": "num_bigint_dig", "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" @@ -9395,28 +11028,117 @@ } } ], - "library_target_name": "num_integer", + "library_target_name": "num_bigint_dig", "common_attrs": { "compile_data_glob": [ "**" ], - "crate_features": { - "common": [ - "default", - "std" - ], - "selects": {} - }, "deps": { "common": [ { - "id": "num-integer 0.1.45", + "id": "byteorder 1.4.3", + "target": "byteorder" + }, + { + "id": "lazy_static 1.4.0", + "target": "lazy_static" + }, + { + "id": "libm 0.2.7", + "target": "libm" + }, + { + "id": "num-bigint-dig 0.8.4", "target": "build_script_build" }, { - "id": "num-traits 0.2.15", - "target": "num_traits" - } + "id": "num-integer 0.1.45", + "target": "num_integer" + }, + { + "id": "num-iter 0.1.43", + "target": "num_iter" + }, + { + "id": "num-traits 0.2.15", + "target": "num_traits" + }, + { + "id": "rand 0.8.5", + "target": "rand" + }, + { + "id": "smallvec 1.10.0", + "target": "smallvec" + }, + { + "id": "zeroize 1.6.0", + "target": "zeroize" + } + ], + "selects": {} + }, + "edition": "2021", + "version": "0.8.4" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ] + }, + "license": "MIT/Apache-2.0" + }, + "num-integer 0.1.45": { + "name": "num-integer", + "version": "0.1.45", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/num-integer/0.1.45/download", + "sha256": "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" + } + }, + "targets": [ + { + "Library": { + "crate_name": "num_integer", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "num_integer", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "default", + "std" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "num-integer 0.1.45", + "target": "build_script_build" + }, + { + "id": "num-traits 0.2.15", + "target": "num_traits" + } ], "selects": {} }, @@ -9439,6 +11161,76 @@ }, "license": "MIT OR Apache-2.0" }, + "num-iter 0.1.43": { + "name": "num-iter", + "version": "0.1.43", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/num-iter/0.1.43/download", + "sha256": "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252" + } + }, + "targets": [ + { + "Library": { + "crate_name": "num_iter", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "num_iter", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "num-integer 0.1.45", + "target": "num_integer" + }, + { + "id": "num-iter 0.1.43", + "target": "build_script_build" + }, + { + "id": "num-traits 0.2.15", + "target": "num_traits" + } + ], + "selects": {} + }, + "edition": "2015", + "version": "0.1.43" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "autocfg 1.1.0", + "target": "autocfg" + } + ], + "selects": {} + } + }, + "license": "MIT OR Apache-2.0" + }, "num-traits 0.2.15": { "name": "num-traits", "version": "0.2.15", @@ -9481,6 +11273,10 @@ }, "deps": { "common": [ + { + "id": "libm 0.2.7", + "target": "libm" + }, { "id": "num-traits 0.2.15", "target": "build_script_build" @@ -9635,7 +11431,8 @@ "alloc", "default", "race", - "std" + "std", + "unstable" ], "selects": {} }, @@ -9783,7 +11580,7 @@ "target": "quote" }, { - "id": "syn 2.0.23", + "id": "syn 2.0.25", "target": "syn" } ], @@ -9971,7 +11768,7 @@ "target": "log" }, { - "id": "serde 1.0.167", + "id": "serde 1.0.171", "target": "serde" } ], @@ -10208,6 +12005,61 @@ }, "license": "MIT OR Apache-2.0" }, + "password-hash 0.5.0": { + "name": "password-hash", + "version": "0.5.0", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/password-hash/0.5.0/download", + "sha256": "346f04948ba92c43e8469c1ee6736c7563d71012b17d40745260fe106aac2166" + } + }, + "targets": [ + { + "Library": { + "crate_name": "password_hash", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "password_hash", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "alloc", + "default", + "rand_core" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "base64ct 1.6.0", + "target": "base64ct" + }, + { + "id": "rand_core 0.6.4", + "target": "rand_core" + }, + { + "id": "subtle 2.5.0", + "target": "subtle" + } + ], + "selects": {} + }, + "edition": "2021", + "version": "0.5.0" + }, + "license": "MIT OR Apache-2.0" + }, "paste 1.0.13": { "name": "paste", "version": "1.0.13", @@ -10261,6 +12113,45 @@ }, "license": "MIT OR Apache-2.0" }, + "pem-rfc7468 0.7.0": { + "name": "pem-rfc7468", + "version": "0.7.0", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/pem-rfc7468/0.7.0/download", + "sha256": "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412" + } + }, + "targets": [ + { + "Library": { + "crate_name": "pem_rfc7468", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "pem_rfc7468", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "base64ct 1.6.0", + "target": "base64ct" + } + ], + "selects": {} + }, + "edition": "2021", + "version": "0.7.0" + }, + "license": "Apache-2.0 OR MIT" + }, "percent-encoding 2.3.0": { "name": "percent-encoding", "version": "2.3.0", @@ -10374,7 +12265,7 @@ "target": "quote" }, { - "id": "syn 2.0.23", + "id": "syn 2.0.25", "target": "syn" } ], @@ -10445,19 +12336,19 @@ }, "license": "MIT OR Apache-2.0" }, - "pkg-config 0.3.27": { - "name": "pkg-config", - "version": "0.3.27", + "pkcs1 0.7.5": { + "name": "pkcs1", + "version": "0.7.5", "repository": { "Http": { - "url": "https://crates.io/api/v1/crates/pkg-config/0.3.27/download", - "sha256": "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" + "url": "https://crates.io/api/v1/crates/pkcs1/0.7.5/download", + "sha256": "c8ffb9f10fa047879315e6625af03c164b16962a5368d724ed16323b68ace47f" } }, "targets": [ { "Library": { - "crate_name": "pkg_config", + "crate_name": "pkcs1", "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" @@ -10465,23 +12356,113 @@ } } ], - "library_target_name": "pkg_config", + "library_target_name": "pkcs1", "common_attrs": { "compile_data_glob": [ "**" ], - "edition": "2015", - "version": "0.3.27" + "deps": { + "common": [ + { + "id": "der 0.7.7", + "target": "der" + }, + { + "id": "pkcs8 0.10.2", + "target": "pkcs8" + }, + { + "id": "spki 0.7.2", + "target": "spki" + } + ], + "selects": {} + }, + "edition": "2021", + "version": "0.7.5" }, - "license": "MIT OR Apache-2.0" + "license": "Apache-2.0 OR MIT" }, - "ppv-lite86 0.2.17": { - "name": "ppv-lite86", - "version": "0.2.17", + "pkcs8 0.10.2": { + "name": "pkcs8", + "version": "0.10.2", "repository": { "Http": { - "url": "https://crates.io/api/v1/crates/ppv-lite86/0.2.17/download", - "sha256": "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + "url": "https://crates.io/api/v1/crates/pkcs8/0.10.2/download", + "sha256": "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" + } + }, + "targets": [ + { + "Library": { + "crate_name": "pkcs8", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "pkcs8", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "der 0.7.7", + "target": "der" + }, + { + "id": "spki 0.7.2", + "target": "spki" + } + ], + "selects": {} + }, + "edition": "2021", + "version": "0.10.2" + }, + "license": "Apache-2.0 OR MIT" + }, + "pkg-config 0.3.27": { + "name": "pkg-config", + "version": "0.3.27", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/pkg-config/0.3.27/download", + "sha256": "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" + } + }, + "targets": [ + { + "Library": { + "crate_name": "pkg_config", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "pkg_config", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "edition": "2015", + "version": "0.3.27" + }, + "license": "MIT OR Apache-2.0" + }, + "ppv-lite86 0.2.17": { + "name": "ppv-lite86", + "version": "0.2.17", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/ppv-lite86/0.2.17/download", + "sha256": "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" } }, "targets": [ @@ -11508,7 +13489,7 @@ "target": "remi_core" }, { - "id": "serde 1.0.167", + "id": "serde 1.0.171", "target": "serde" }, { @@ -11595,7 +13576,7 @@ "target": "remi_core" }, { - "id": "serde 1.0.167", + "id": "serde 1.0.171", "target": "serde" }, { @@ -11680,7 +13661,7 @@ "target": "http" }, { - "id": "serde 1.0.167", + "id": "serde 1.0.171", "target": "serde" }, { @@ -11902,6 +13883,98 @@ }, "license": null }, + "rsa 0.9.2": { + "name": "rsa", + "version": "0.9.2", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/rsa/0.9.2/download", + "sha256": "6ab43bb47d23c1a631b4b680199a45255dce26fa9ab2fa902581f624ff13e6a8" + } + }, + "targets": [ + { + "Library": { + "crate_name": "rsa", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "rsa", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "byteorder 1.4.3", + "target": "byteorder" + }, + { + "id": "const-oid 0.9.4", + "target": "const_oid" + }, + { + "id": "digest 0.10.7", + "target": "digest" + }, + { + "id": "num-bigint-dig 0.8.4", + "target": "num_bigint_dig", + "alias": "num_bigint" + }, + { + "id": "num-integer 0.1.45", + "target": "num_integer" + }, + { + "id": "num-iter 0.1.43", + "target": "num_iter" + }, + { + "id": "num-traits 0.2.15", + "target": "num_traits" + }, + { + "id": "pkcs1 0.7.5", + "target": "pkcs1" + }, + { + "id": "pkcs8 0.10.2", + "target": "pkcs8" + }, + { + "id": "rand_core 0.6.4", + "target": "rand_core" + }, + { + "id": "signature 2.1.0", + "target": "signature" + }, + { + "id": "spki 0.7.2", + "target": "spki" + }, + { + "id": "subtle 2.5.0", + "target": "subtle" + }, + { + "id": "zeroize 1.6.0", + "target": "zeroize" + } + ], + "selects": {} + }, + "edition": "2021", + "version": "0.9.2" + }, + "license": "MIT OR Apache-2.0" + }, "rustc-demangle 0.1.23": { "name": "rustc-demangle", "version": "0.1.23", @@ -12714,7 +14787,7 @@ "target": "build_script_build" }, { - "id": "serde 1.0.167", + "id": "serde 1.0.171", "target": "serde" } ], @@ -13019,7 +15092,7 @@ "target": "sentry_types" }, { - "id": "serde 1.0.167", + "id": "serde 1.0.171", "target": "serde" }, { @@ -13296,7 +15369,7 @@ "target": "hex" }, { - "id": "serde 1.0.167", + "id": "serde 1.0.171", "target": "serde" }, { @@ -13327,13 +15400,13 @@ }, "license": "Apache-2.0" }, - "serde 1.0.167": { + "serde 1.0.171": { "name": "serde", - "version": "1.0.167", + "version": "1.0.171", "repository": { "Http": { - "url": "https://crates.io/api/v1/crates/serde/1.0.167/download", - "sha256": "7daf513456463b42aa1d94cff7e0c24d682b429f020b9afa4f5ba5c40a22b237" + "url": "https://crates.io/api/v1/crates/serde/1.0.171/download", + "sha256": "30e27d1e4fd7659406c492fd6cfaf2066ba8773de45ca75e855590f856dc34a9" } }, "targets": [ @@ -13365,6 +15438,7 @@ "common": [ "default", "derive", + "rc", "serde_derive", "std" ], @@ -13373,7 +15447,7 @@ "deps": { "common": [ { - "id": "serde 1.0.167", + "id": "serde 1.0.171", "target": "build_script_build" } ], @@ -13383,13 +15457,13 @@ "proc_macro_deps": { "common": [ { - "id": "serde_derive 1.0.167", + "id": "serde_derive 1.0.171", "target": "serde_derive" } ], "selects": {} }, - "version": "1.0.167" + "version": "1.0.171" }, "build_script_attrs": { "data_glob": [ @@ -13398,13 +15472,13 @@ }, "license": "MIT OR Apache-2.0" }, - "serde_derive 1.0.167": { + "serde_derive 1.0.171": { "name": "serde_derive", - "version": "1.0.167", + "version": "1.0.171", "repository": { "Http": { - "url": "https://crates.io/api/v1/crates/serde_derive/1.0.167/download", - "sha256": "b69b106b68bc8054f0e974e70d19984040f8a5cf9215ca82626ea4853f82c4b9" + "url": "https://crates.io/api/v1/crates/serde_derive/1.0.171/download", + "sha256": "389894603bd18c46fa56231694f8d827779c0951a667087194cf9de94ed24682" } }, "targets": [ @@ -13440,14 +15514,14 @@ "target": "quote" }, { - "id": "syn 2.0.23", + "id": "syn 2.0.25", "target": "syn" } ], "selects": {} }, "edition": "2015", - "version": "1.0.167" + "version": "1.0.171" }, "license": "MIT OR Apache-2.0" }, @@ -13504,7 +15578,7 @@ "target": "ryu" }, { - "id": "serde 1.0.167", + "id": "serde 1.0.171", "target": "serde" }, { @@ -13556,7 +15630,7 @@ "target": "itoa" }, { - "id": "serde 1.0.167", + "id": "serde 1.0.171", "target": "serde" } ], @@ -13607,7 +15681,7 @@ "target": "ryu" }, { - "id": "serde 1.0.167", + "id": "serde 1.0.171", "target": "serde" } ], @@ -13618,6 +15692,113 @@ }, "license": "MIT/Apache-2.0" }, + "serde_with 1.14.0": { + "name": "serde_with", + "version": "1.14.0", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/serde_with/1.14.0/download", + "sha256": "678b5a069e50bf00ecd22d0cd8ddf7c236f68581b03db652061ed5eb13a312ff" + } + }, + "targets": [ + { + "Library": { + "crate_name": "serde_with", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "serde_with", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "default", + "macros", + "serde_with_macros" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "serde 1.0.171", + "target": "serde" + } + ], + "selects": {} + }, + "edition": "2018", + "proc_macro_deps": { + "common": [ + { + "id": "serde_with_macros 1.5.2", + "target": "serde_with_macros" + } + ], + "selects": {} + }, + "version": "1.14.0" + }, + "license": "MIT OR Apache-2.0" + }, + "serde_with_macros 1.5.2": { + "name": "serde_with_macros", + "version": "1.5.2", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/serde_with_macros/1.5.2/download", + "sha256": "e182d6ec6f05393cc0e5ed1bf81ad6db3a8feedf8ee515ecdd369809bcce8082" + } + }, + "targets": [ + { + "ProcMacro": { + "crate_name": "serde_with_macros", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "serde_with_macros", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "darling 0.13.4", + "target": "darling" + }, + { + "id": "proc-macro2 1.0.63", + "target": "proc_macro2" + }, + { + "id": "quote 1.0.29", + "target": "quote" + }, + { + "id": "syn 1.0.109", + "target": "syn" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "1.5.2" + }, + "license": "MIT OR Apache-2.0" + }, "serde_yaml 0.9.22": { "name": "serde_yaml", "version": "0.9.22", @@ -13658,7 +15839,7 @@ "target": "ryu" }, { - "id": "serde 1.0.167", + "id": "serde 1.0.171", "target": "serde" }, { @@ -13719,7 +15900,7 @@ "selects": { "cfg(any(target_arch = \"aarch64\", target_arch = \"x86\", target_arch = \"x86_64\"))": [ { - "id": "cpufeatures 0.2.8", + "id": "cpufeatures 0.2.9", "target": "cpufeatures" } ] @@ -13776,7 +15957,7 @@ "selects": { "cfg(any(target_arch = \"aarch64\", target_arch = \"x86_64\", target_arch = \"x86\"))": [ { - "id": "cpufeatures 0.2.8", + "id": "cpufeatures 0.2.9", "target": "cpufeatures" } ] @@ -13865,58 +16046,101 @@ }, "license": "Apache-2.0/MIT" }, - "slab 0.4.8": { - "name": "slab", - "version": "0.4.8", + "signature 2.1.0": { + "name": "signature", + "version": "2.1.0", "repository": { "Http": { - "url": "https://crates.io/api/v1/crates/slab/0.4.8/download", - "sha256": "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" + "url": "https://crates.io/api/v1/crates/signature/2.1.0/download", + "sha256": "5e1788eed21689f9cf370582dfc467ef36ed9c707f073528ddafa8d83e3b8500" } }, "targets": [ { "Library": { - "crate_name": "slab", + "crate_name": "signature", "crate_root": "src/lib.rs", "srcs": [ "**/*.rs" ] } - }, - { - "BuildScript": { - "crate_name": "build_script_build", - "crate_root": "build.rs", - "srcs": [ - "**/*.rs" - ] - } } ], - "library_target_name": "slab", + "library_target_name": "signature", "common_attrs": { "compile_data_glob": [ "**" ], - "crate_features": { - "common": [ - "default", - "std" - ], - "selects": {} - }, "deps": { "common": [ { - "id": "slab 0.4.8", - "target": "build_script_build" + "id": "digest 0.10.7", + "target": "digest" + }, + { + "id": "rand_core 0.6.4", + "target": "rand_core" } ], "selects": {} }, - "edition": "2018", - "version": "0.4.8" + "edition": "2021", + "version": "2.1.0" + }, + "license": "Apache-2.0 OR MIT" + }, + "slab 0.4.8": { + "name": "slab", + "version": "0.4.8", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/slab/0.4.8/download", + "sha256": "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" + } + }, + "targets": [ + { + "Library": { + "crate_name": "slab", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "slab", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "default", + "std" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "slab 0.4.8", + "target": "build_script_build" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.4.8" }, "build_script_attrs": { "data_glob": [ @@ -14079,10 +16303,1040 @@ ], "selects": {} }, + "deps": { + "common": [ + { + "id": "lock_api 0.4.10", + "target": "lock_api", + "alias": "lock_api_crate" + } + ], + "selects": {} + }, + "edition": "2015", + "version": "0.9.8" + }, + "license": "MIT" + }, + "spki 0.7.2": { + "name": "spki", + "version": "0.7.2", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/spki/0.7.2/download", + "sha256": "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a" + } + }, + "targets": [ + { + "Library": { + "crate_name": "spki", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "spki", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "der 0.7.7", + "target": "der" + } + ], + "selects": {} + }, + "edition": "2021", + "version": "0.7.2" + }, + "license": "Apache-2.0 OR MIT" + }, + "sqlformat 0.2.1": { + "name": "sqlformat", + "version": "0.2.1", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/sqlformat/0.2.1/download", + "sha256": "0c12bc9199d1db8234678b7051747c07f517cdcf019262d1847b94ec8b1aee3e" + } + }, + "targets": [ + { + "Library": { + "crate_name": "sqlformat", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "sqlformat", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "itertools 0.10.5", + "target": "itertools" + }, + { + "id": "nom 7.1.3", + "target": "nom" + }, + { + "id": "unicode_categories 0.1.1", + "target": "unicode_categories" + } + ], + "selects": {} + }, + "edition": "2021", + "version": "0.2.1" + }, + "license": "MIT OR Apache-2.0" + }, + "sqlx 0.7.0": { + "name": "sqlx", + "version": "0.7.0", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/sqlx/0.7.0/download", + "sha256": "91ef53c86d2066e04f0ac6b1364f16d13d82388e2d07f11a5c71782345555761" + } + }, + "targets": [ + { + "Library": { + "crate_name": "sqlx", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "sqlx", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "_rt-tokio", + "any", + "chrono", + "default", + "json", + "macros", + "migrate", + "postgres", + "runtime-tokio", + "sqlx-macros", + "sqlx-postgres", + "tls-native-tls" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "sqlx-core 0.7.0", + "target": "sqlx_core" + }, + { + "id": "sqlx-postgres 0.7.0", + "target": "sqlx_postgres" + } + ], + "selects": {} + }, + "edition": "2021", + "proc_macro_deps": { + "common": [ + { + "id": "sqlx-macros 0.7.0", + "target": "sqlx_macros" + } + ], + "selects": {} + }, + "version": "0.7.0" + }, + "license": "MIT OR Apache-2.0" + }, + "sqlx-core 0.7.0": { + "name": "sqlx-core", + "version": "0.7.0", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/sqlx-core/0.7.0/download", + "sha256": "8a22fd81e9c1ad53c562edb869ff042b215d4eadefefc4784bacfbfd19835945" + } + }, + "targets": [ + { + "Library": { + "crate_name": "sqlx_core", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "sqlx_core", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "_rt-tokio", + "_tls-native-tls", + "any", + "chrono", + "crc", + "default", + "json", + "migrate", + "native-tls", + "offline", + "serde", + "serde_json", + "sha2", + "tokio", + "tokio-stream" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "ahash 0.8.3", + "target": "ahash" + }, + { + "id": "atoi 2.0.0", + "target": "atoi" + }, + { + "id": "byteorder 1.4.3", + "target": "byteorder" + }, + { + "id": "bytes 1.4.0", + "target": "bytes" + }, + { + "id": "chrono 0.4.26", + "target": "chrono" + }, + { + "id": "crc 3.0.1", + "target": "crc" + }, + { + "id": "crossbeam-queue 0.3.8", + "target": "crossbeam_queue" + }, + { + "id": "dotenvy 0.15.7", + "target": "dotenvy" + }, + { + "id": "either 1.8.1", + "target": "either" + }, + { + "id": "event-listener 2.5.3", + "target": "event_listener" + }, + { + "id": "futures-channel 0.3.28", + "target": "futures_channel" + }, + { + "id": "futures-core 0.3.28", + "target": "futures_core" + }, + { + "id": "futures-intrusive 0.5.0", + "target": "futures_intrusive" + }, + { + "id": "futures-io 0.3.28", + "target": "futures_io" + }, + { + "id": "futures-util 0.3.28", + "target": "futures_util" + }, + { + "id": "hashlink 0.8.3", + "target": "hashlink" + }, + { + "id": "hex 0.4.3", + "target": "hex" + }, + { + "id": "indexmap 2.0.0", + "target": "indexmap" + }, + { + "id": "log 0.4.19", + "target": "log" + }, + { + "id": "memchr 2.5.0", + "target": "memchr" + }, + { + "id": "native-tls 0.2.11", + "target": "native_tls" + }, + { + "id": "once_cell 1.18.0", + "target": "once_cell" + }, + { + "id": "percent-encoding 2.3.0", + "target": "percent_encoding" + }, + { + "id": "serde 1.0.171", + "target": "serde" + }, + { + "id": "serde_json 1.0.100", + "target": "serde_json" + }, + { + "id": "sha2 0.10.7", + "target": "sha2" + }, + { + "id": "smallvec 1.10.0", + "target": "smallvec" + }, + { + "id": "sqlformat 0.2.1", + "target": "sqlformat" + }, + { + "id": "thiserror 1.0.43", + "target": "thiserror" + }, + { + "id": "tokio 1.29.1", + "target": "tokio" + }, + { + "id": "tokio-stream 0.1.14", + "target": "tokio_stream" + }, + { + "id": "tracing 0.1.37", + "target": "tracing" + }, + { + "id": "url 2.4.0", + "target": "url" + } + ], + "selects": {} + }, + "edition": "2021", + "proc_macro_deps": { + "common": [ + { + "id": "paste 1.0.13", + "target": "paste" + } + ], + "selects": {} + }, + "version": "0.7.0" + }, + "license": "MIT OR Apache-2.0" + }, + "sqlx-macros 0.7.0": { + "name": "sqlx-macros", + "version": "0.7.0", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/sqlx-macros/0.7.0/download", + "sha256": "00bb7c096a202b8164c175614cbfb79fe0e1e0a3d50e0374526183ef2974e4a2" + } + }, + "targets": [ + { + "ProcMacro": { + "crate_name": "sqlx_macros", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "sqlx_macros", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "_rt-tokio", + "_tls-native-tls", + "chrono", + "default", + "json", + "migrate", + "postgres" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "proc-macro2 1.0.63", + "target": "proc_macro2" + }, + { + "id": "quote 1.0.29", + "target": "quote" + }, + { + "id": "sqlx-core 0.7.0", + "target": "sqlx_core" + }, + { + "id": "sqlx-macros-core 0.7.0", + "target": "sqlx_macros_core" + }, + { + "id": "syn 1.0.109", + "target": "syn" + } + ], + "selects": {} + }, + "edition": "2021", + "version": "0.7.0" + }, + "license": "MIT OR Apache-2.0" + }, + "sqlx-macros-core 0.7.0": { + "name": "sqlx-macros-core", + "version": "0.7.0", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/sqlx-macros-core/0.7.0/download", + "sha256": "37d644623ab9699014e5b3cb61a040d16caa50fd477008f63f1399ae35498a58" + } + }, + "targets": [ + { + "Library": { + "crate_name": "sqlx_macros_core", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "sqlx_macros_core", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "_rt-tokio", + "_tls-native-tls", + "chrono", + "default", + "json", + "migrate", + "postgres", + "sqlx-postgres", + "tokio" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "dotenvy 0.15.7", + "target": "dotenvy" + }, + { + "id": "either 1.8.1", + "target": "either" + }, + { + "id": "heck 0.4.1", + "target": "heck" + }, + { + "id": "hex 0.4.3", + "target": "hex" + }, + { + "id": "once_cell 1.18.0", + "target": "once_cell" + }, + { + "id": "proc-macro2 1.0.63", + "target": "proc_macro2" + }, + { + "id": "quote 1.0.29", + "target": "quote" + }, + { + "id": "serde 1.0.171", + "target": "serde" + }, + { + "id": "serde_json 1.0.100", + "target": "serde_json" + }, + { + "id": "sha2 0.10.7", + "target": "sha2" + }, + { + "id": "sqlx-core 0.7.0", + "target": "sqlx_core" + }, + { + "id": "sqlx-postgres 0.7.0", + "target": "sqlx_postgres" + }, + { + "id": "syn 1.0.109", + "target": "syn" + }, + { + "id": "tempfile 3.6.0", + "target": "tempfile" + }, + { + "id": "tokio 1.29.1", + "target": "tokio" + }, + { + "id": "url 2.4.0", + "target": "url" + } + ], + "selects": {} + }, + "edition": "2021", + "version": "0.7.0" + }, + "license": "MIT OR Apache-2.0" + }, + "sqlx-mysql 0.7.0": { + "name": "sqlx-mysql", + "version": "0.7.0", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/sqlx-mysql/0.7.0/download", + "sha256": "8264c59b28b6858796acfcedc660aa4c9075cc6e4ec8eb03cdca2a3e725726db" + } + }, + "targets": [ + { + "Library": { + "crate_name": "sqlx_mysql", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "sqlx_mysql", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "atoi 2.0.0", + "target": "atoi" + }, + { + "id": "base64 0.21.2", + "target": "base64" + }, + { + "id": "bitflags 2.3.3", + "target": "bitflags" + }, + { + "id": "byteorder 1.4.3", + "target": "byteorder" + }, + { + "id": "bytes 1.4.0", + "target": "bytes" + }, + { + "id": "chrono 0.4.26", + "target": "chrono" + }, + { + "id": "crc 3.0.1", + "target": "crc" + }, + { + "id": "digest 0.10.7", + "target": "digest" + }, + { + "id": "dotenvy 0.15.7", + "target": "dotenvy" + }, + { + "id": "either 1.8.1", + "target": "either" + }, + { + "id": "futures-channel 0.3.28", + "target": "futures_channel" + }, + { + "id": "futures-core 0.3.28", + "target": "futures_core" + }, + { + "id": "futures-io 0.3.28", + "target": "futures_io" + }, + { + "id": "futures-util 0.3.28", + "target": "futures_util" + }, + { + "id": "generic-array 0.14.7", + "target": "generic_array" + }, + { + "id": "hex 0.4.3", + "target": "hex" + }, + { + "id": "hkdf 0.12.3", + "target": "hkdf" + }, + { + "id": "hmac 0.12.1", + "target": "hmac" + }, + { + "id": "itoa 1.0.8", + "target": "itoa" + }, + { + "id": "log 0.4.19", + "target": "log" + }, + { + "id": "md-5 0.10.5", + "target": "md5" + }, + { + "id": "memchr 2.5.0", + "target": "memchr" + }, + { + "id": "once_cell 1.18.0", + "target": "once_cell" + }, + { + "id": "percent-encoding 2.3.0", + "target": "percent_encoding" + }, + { + "id": "rand 0.8.5", + "target": "rand" + }, + { + "id": "rsa 0.9.2", + "target": "rsa" + }, + { + "id": "serde 1.0.171", + "target": "serde" + }, + { + "id": "sha1 0.10.5", + "target": "sha1" + }, + { + "id": "sha2 0.10.7", + "target": "sha2" + }, + { + "id": "smallvec 1.10.0", + "target": "smallvec" + }, + { + "id": "sqlx-core 0.7.0", + "target": "sqlx_core" + }, + { + "id": "stringprep 0.1.2", + "target": "stringprep" + }, + { + "id": "thiserror 1.0.43", + "target": "thiserror" + }, + { + "id": "tracing 0.1.37", + "target": "tracing" + }, + { + "id": "whoami 1.4.1", + "target": "whoami" + } + ], + "selects": {} + }, + "edition": "2021", + "version": "0.7.0" + }, + "license": "MIT OR Apache-2.0" + }, + "sqlx-postgres 0.7.0": { + "name": "sqlx-postgres", + "version": "0.7.0", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/sqlx-postgres/0.7.0/download", + "sha256": "1cab6147b81ca9213a7578f1b4c9d24c449a53953cd2222a7b5d7cd29a5c3139" + } + }, + "targets": [ + { + "Library": { + "crate_name": "sqlx_postgres", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "sqlx_postgres", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "any", + "chrono", + "json", + "migrate", + "offline" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "atoi 2.0.0", + "target": "atoi" + }, + { + "id": "base64 0.21.2", + "target": "base64" + }, + { + "id": "bitflags 2.3.3", + "target": "bitflags" + }, + { + "id": "byteorder 1.4.3", + "target": "byteorder" + }, + { + "id": "chrono 0.4.26", + "target": "chrono" + }, + { + "id": "crc 3.0.1", + "target": "crc" + }, + { + "id": "dotenvy 0.15.7", + "target": "dotenvy" + }, + { + "id": "futures-channel 0.3.28", + "target": "futures_channel" + }, + { + "id": "futures-core 0.3.28", + "target": "futures_core" + }, + { + "id": "futures-io 0.3.28", + "target": "futures_io" + }, + { + "id": "futures-util 0.3.28", + "target": "futures_util" + }, + { + "id": "hex 0.4.3", + "target": "hex" + }, + { + "id": "hkdf 0.12.3", + "target": "hkdf" + }, + { + "id": "hmac 0.12.1", + "target": "hmac" + }, + { + "id": "home 0.5.5", + "target": "home" + }, + { + "id": "itoa 1.0.8", + "target": "itoa" + }, + { + "id": "log 0.4.19", + "target": "log" + }, + { + "id": "md-5 0.10.5", + "target": "md5" + }, + { + "id": "memchr 2.5.0", + "target": "memchr" + }, + { + "id": "once_cell 1.18.0", + "target": "once_cell" + }, + { + "id": "rand 0.8.5", + "target": "rand" + }, + { + "id": "serde 1.0.171", + "target": "serde" + }, + { + "id": "serde_json 1.0.100", + "target": "serde_json" + }, + { + "id": "sha1 0.10.5", + "target": "sha1" + }, + { + "id": "sha2 0.10.7", + "target": "sha2" + }, + { + "id": "smallvec 1.10.0", + "target": "smallvec" + }, + { + "id": "sqlx-core 0.7.0", + "target": "sqlx_core" + }, + { + "id": "stringprep 0.1.2", + "target": "stringprep" + }, + { + "id": "thiserror 1.0.43", + "target": "thiserror" + }, + { + "id": "tracing 0.1.37", + "target": "tracing" + }, + { + "id": "whoami 1.4.1", + "target": "whoami" + } + ], + "selects": { + "cfg(target_os = \"windows\")": [ + { + "id": "etcetera 0.8.0", + "target": "etcetera" + } + ] + } + }, + "edition": "2021", + "version": "0.7.0" + }, + "license": "MIT OR Apache-2.0" + }, + "sqlx-sqlite 0.7.0": { + "name": "sqlx-sqlite", + "version": "0.7.0", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/sqlx-sqlite/0.7.0/download", + "sha256": "59fba60afa64718104b71eec6984f8779d4caffff3b30cde91a75843c7efc126" + } + }, + "targets": [ + { + "Library": { + "crate_name": "sqlx_sqlite", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "sqlx_sqlite", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "atoi 2.0.0", + "target": "atoi" + }, + { + "id": "chrono 0.4.26", + "target": "chrono" + }, + { + "id": "flume 0.10.14", + "target": "flume" + }, + { + "id": "futures-channel 0.3.28", + "target": "futures_channel" + }, + { + "id": "futures-core 0.3.28", + "target": "futures_core" + }, + { + "id": "futures-executor 0.3.28", + "target": "futures_executor" + }, + { + "id": "futures-intrusive 0.5.0", + "target": "futures_intrusive" + }, + { + "id": "futures-util 0.3.28", + "target": "futures_util" + }, + { + "id": "libsqlite3-sys 0.26.0", + "target": "libsqlite3_sys" + }, + { + "id": "log 0.4.19", + "target": "log" + }, + { + "id": "percent-encoding 2.3.0", + "target": "percent_encoding" + }, + { + "id": "serde 1.0.171", + "target": "serde" + }, + { + "id": "sqlx-core 0.7.0", + "target": "sqlx_core" + }, + { + "id": "tracing 0.1.37", + "target": "tracing" + }, + { + "id": "url 2.4.0", + "target": "url" + } + ], + "selects": {} + }, + "edition": "2021", + "version": "0.7.0" + }, + "license": "MIT OR Apache-2.0" + }, + "stringprep 0.1.2": { + "name": "stringprep", + "version": "0.1.2", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/stringprep/0.1.2/download", + "sha256": "8ee348cb74b87454fff4b551cbf727025810a004f88aeacae7f85b87f4e9a1c1" + } + }, + "targets": [ + { + "Library": { + "crate_name": "stringprep", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "stringprep", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "unicode-bidi 0.3.13", + "target": "unicode_bidi" + }, + { + "id": "unicode-normalization 0.1.22", + "target": "unicode_normalization" + } + ], + "selects": {} + }, "edition": "2015", - "version": "0.9.8" + "version": "0.1.2" }, - "license": "MIT" + "license": "MIT/Apache-2.0" }, "strsim 0.10.0": { "name": "strsim", @@ -14223,13 +17477,13 @@ }, "license": "MIT OR Apache-2.0" }, - "syn 2.0.23": { + "syn 2.0.25": { "name": "syn", - "version": "2.0.23", + "version": "2.0.25", "repository": { "Http": { - "url": "https://crates.io/api/v1/crates/syn/2.0.23/download", - "sha256": "59fb7d6d8281a51045d62b8eb3a7d1ce347b76f312af50cd3dc0af39c87c1737" + "url": "https://crates.io/api/v1/crates/syn/2.0.25/download", + "sha256": "15e3fc8c0c74267e2df136e5e5fb656a464158aa57624053375eb9c8c6e25ae2" } }, "targets": [ @@ -14288,7 +17542,7 @@ "selects": {} }, "edition": "2021", - "version": "2.0.23" + "version": "2.0.25" }, "license": "MIT OR Apache-2.0" }, @@ -14491,6 +17745,83 @@ }, "license": "MIT OR Apache-2.0" }, + "testcontainers 0.14.0": { + "name": "testcontainers", + "version": "0.14.0", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/testcontainers/0.14.0/download", + "sha256": "0e2b1567ca8a2b819ea7b28c92be35d9f76fb9edb214321dcc86eb96023d1f87" + } + }, + "targets": [ + { + "Library": { + "crate_name": "testcontainers", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "testcontainers", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "default" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "bollard-stubs 1.41.0", + "target": "bollard_stubs" + }, + { + "id": "futures 0.3.28", + "target": "futures" + }, + { + "id": "hex 0.4.3", + "target": "hex" + }, + { + "id": "hmac 0.12.1", + "target": "hmac" + }, + { + "id": "log 0.4.19", + "target": "log" + }, + { + "id": "rand 0.8.5", + "target": "rand" + }, + { + "id": "serde 1.0.171", + "target": "serde" + }, + { + "id": "serde_json 1.0.100", + "target": "serde_json" + }, + { + "id": "sha2 0.10.7", + "target": "sha2" + } + ], + "selects": {} + }, + "edition": "2021", + "version": "0.14.0" + }, + "license": "MIT OR Apache-2.0" + }, "thiserror 1.0.43": { "name": "thiserror", "version": "1.0.43", @@ -14589,7 +17920,7 @@ "target": "quote" }, { - "id": "syn 2.0.23", + "id": "syn 2.0.25", "target": "syn" } ], @@ -15086,7 +18417,7 @@ "target": "quote" }, { - "id": "syn 2.0.23", + "id": "syn 2.0.25", "target": "syn" } ], @@ -15222,6 +18553,7 @@ "crate_features": { "common": [ "default", + "fs", "time" ], "selects": {} @@ -15566,7 +18898,7 @@ "target": "quote" }, { - "id": "syn 2.0.23", + "id": "syn 2.0.25", "target": "syn" } ], @@ -15961,6 +19293,7 @@ ], "crate_features": { "common": [ + "default", "hardcoded-data", "std" ], @@ -16028,6 +19361,7 @@ ], "crate_features": { "common": [ + "default", "std" ], "selects": {} @@ -16046,6 +19380,66 @@ }, "license": "MIT/Apache-2.0" }, + "unicode-segmentation 1.10.1": { + "name": "unicode-segmentation", + "version": "1.10.1", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/unicode-segmentation/1.10.1/download", + "sha256": "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" + } + }, + "targets": [ + { + "Library": { + "crate_name": "unicode_segmentation", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "unicode_segmentation", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "edition": "2018", + "version": "1.10.1" + }, + "license": "MIT/Apache-2.0" + }, + "unicode_categories 0.1.1": { + "name": "unicode_categories", + "version": "0.1.1", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/unicode_categories/0.1.1/download", + "sha256": "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" + } + }, + "targets": [ + { + "Library": { + "crate_name": "unicode_categories", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "unicode_categories", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "edition": "2015", + "version": "0.1.1" + }, + "license": "MIT OR Apache-2.0" + }, "unsafe-libyaml 0.2.8": { "name": "unsafe-libyaml", "version": "0.2.8", @@ -16208,7 +19602,7 @@ "target": "percent_encoding" }, { - "id": "serde 1.0.167", + "id": "serde 1.0.171", "target": "serde" } ], @@ -16285,13 +19679,13 @@ }, "license": "Apache-2.0 OR MIT" }, - "utoipa 3.3.0": { + "utoipa 3.4.0": { "name": "utoipa", - "version": "3.3.0", + "version": "3.4.0", "repository": { "Http": { - "url": "https://crates.io/api/v1/crates/utoipa/3.3.0/download", - "sha256": "68ae74ef183fae36d650f063ae7bde1cacbe1cd7e72b617cbe1e985551878b98" + "url": "https://crates.io/api/v1/crates/utoipa/3.4.0/download", + "sha256": "520434cac5c98120177d5cc15be032703f6dca7d5ef82e725c798113b375000a" } }, "targets": [ @@ -16323,11 +19717,11 @@ "deps": { "common": [ { - "id": "indexmap 1.9.3", + "id": "indexmap 2.0.0", "target": "indexmap" }, { - "id": "serde 1.0.167", + "id": "serde 1.0.171", "target": "serde" }, { @@ -16345,23 +19739,23 @@ "proc_macro_deps": { "common": [ { - "id": "utoipa-gen 3.3.0", + "id": "utoipa-gen 3.4.1", "target": "utoipa_gen" } ], "selects": {} }, - "version": "3.3.0" + "version": "3.4.0" }, "license": "MIT OR Apache-2.0" }, - "utoipa-gen 3.3.0": { + "utoipa-gen 3.4.1": { "name": "utoipa-gen", - "version": "3.3.0", + "version": "3.4.1", "repository": { "Http": { - "url": "https://crates.io/api/v1/crates/utoipa-gen/3.3.0/download", - "sha256": "7ea8ac818da7e746a63285594cce8a96f5e00ee31994e655bd827569cb8b137b" + "url": "https://crates.io/api/v1/crates/utoipa-gen/3.4.1/download", + "sha256": "6e22e88a487b6e0374533871b79b1f5ded05671bd0936bd547eb42f82fb9060d" } }, "targets": [ @@ -16384,6 +19778,7 @@ "common": [ "axum_extras", "chrono", + "regex", "uuid" ], "selects": {} @@ -16403,7 +19798,11 @@ "target": "quote" }, { - "id": "syn 2.0.23", + "id": "regex 1.9.1", + "target": "regex" + }, + { + "id": "syn 2.0.25", "target": "syn" }, { @@ -16414,7 +19813,7 @@ "selects": {} }, "edition": "2021", - "version": "3.3.0" + "version": "3.4.1" }, "license": "MIT OR Apache-2.0" }, @@ -16461,7 +19860,7 @@ "target": "getrandom" }, { - "id": "serde 1.0.167", + "id": "serde 1.0.171", "target": "serde" } ], @@ -16472,6 +19871,74 @@ }, "license": "Apache-2.0 OR MIT" }, + "validator 0.16.1": { + "name": "validator", + "version": "0.16.1", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/validator/0.16.1/download", + "sha256": "b92f40481c04ff1f4f61f304d61793c7b56ff76ac1469f1beb199b1445b253bd" + } + }, + "targets": [ + { + "Library": { + "crate_name": "validator", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "validator", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "idna 0.4.0", + "target": "idna" + }, + { + "id": "lazy_static 1.4.0", + "target": "lazy_static" + }, + { + "id": "regex 1.9.1", + "target": "regex" + }, + { + "id": "serde 1.0.171", + "target": "serde" + }, + { + "id": "serde_json 1.0.100", + "target": "serde_json" + }, + { + "id": "url 2.4.0", + "target": "url" + } + ], + "selects": {} + }, + "edition": "2018", + "proc_macro_deps": { + "common": [ + { + "id": "serde_derive 1.0.171", + "target": "serde_derive" + } + ], + "selects": {} + }, + "version": "0.16.1" + }, + "license": "MIT" + }, "valuable 0.1.0": { "name": "valuable", "version": "0.1.0", @@ -16864,7 +20331,7 @@ "target": "quote" }, { - "id": "syn 2.0.23", + "id": "syn 2.0.25", "target": "syn" }, { @@ -17024,7 +20491,7 @@ "target": "quote" }, { - "id": "syn 2.0.23", + "id": "syn 2.0.25", "target": "syn" }, { @@ -17216,6 +20683,36 @@ }, "license": null }, + "whoami 1.4.1": { + "name": "whoami", + "version": "1.4.1", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/whoami/1.4.1/download", + "sha256": "22fc3756b8a9133049b26c7f61ab35416c130e8c09b660f5b3958b446f52cc50" + } + }, + "targets": [ + { + "Library": { + "crate_name": "whoami", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "whoami", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "edition": "2018", + "version": "1.4.1" + }, + "license": "Apache-2.0 OR BSL-1.0 OR MIT" + }, "winapi 0.3.9": { "name": "winapi", "version": "0.3.9", @@ -18150,7 +21647,9 @@ "charted-search-elasticsearch 0.0.0-devel.0": "crates/search/elasticsearch", "charted-search-meilisearch 0.0.0-devel.0": "crates/search/meilisearch", "charted-server 0.0.0-devel.0": "server", - "charted-storage 0.0.0-devel.0": "crates/storage" + "charted-storage 0.0.0-devel.0": "crates/storage", + "charted-testcontainers 0.0.0-devel.0": "test/containers", + "charted-testcontainers-macros 0.0.0-devel.0": "test/proc-macro-libs/containers" }, "conditions": { "aarch64-linux-android": [ @@ -18333,6 +21832,21 @@ "x86_64-unknown-linux-gnu", "x86_64-unknown-none" ], + "cfg(any(target_arch = \"x86\", target_arch = \"x86_64\"))": [ + "i686-apple-darwin", + "i686-linux-android", + "i686-pc-windows-msvc", + "i686-unknown-freebsd", + "i686-unknown-linux-gnu", + "x86_64-apple-darwin", + "x86_64-apple-ios", + "x86_64-fuchsia", + "x86_64-linux-android", + "x86_64-pc-windows-msvc", + "x86_64-unknown-freebsd", + "x86_64-unknown-linux-gnu", + "x86_64-unknown-none" + ], "cfg(any(target_arch = \"x86\", target_arch = \"x86_64\", all(any(target_arch = \"aarch64\", target_arch = \"arm\"), any(target_os = \"android\", target_os = \"fuchsia\", target_os = \"linux\"))))": [ "aarch64-fuchsia", "aarch64-linux-android", @@ -18442,6 +21956,39 @@ "x86_64-pc-windows-msvc", "x86_64-unknown-linux-gnu" ], + "cfg(not(all(target_arch = \"arm\", target_os = \"none\")))": [ + "aarch64-apple-darwin", + "aarch64-apple-ios", + "aarch64-apple-ios-sim", + "aarch64-fuchsia", + "aarch64-linux-android", + "aarch64-pc-windows-msvc", + "aarch64-unknown-linux-gnu", + "arm-unknown-linux-gnueabi", + "armv7-linux-androideabi", + "armv7-unknown-linux-gnueabi", + "i686-apple-darwin", + "i686-linux-android", + "i686-pc-windows-msvc", + "i686-unknown-freebsd", + "i686-unknown-linux-gnu", + "powerpc-unknown-linux-gnu", + "riscv32imc-unknown-none-elf", + "riscv64gc-unknown-none-elf", + "s390x-unknown-linux-gnu", + "thumbv7em-none-eabi", + "thumbv8m.main-none-eabi", + "wasm32-unknown-unknown", + "wasm32-wasi", + "x86_64-apple-darwin", + "x86_64-apple-ios", + "x86_64-fuchsia", + "x86_64-linux-android", + "x86_64-pc-windows-msvc", + "x86_64-unknown-freebsd", + "x86_64-unknown-linux-gnu", + "x86_64-unknown-none" + ], "cfg(not(any(target_arch = \"wasm32\", target_arch = \"wasm64\")))": [ "aarch64-apple-darwin", "aarch64-apple-ios", diff --git a/Cargo.lock b/Cargo.lock index fb4afe305..26e9e9dfe 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -17,6 +17,18 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "ahash" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" +dependencies = [ + "cfg-if", + "getrandom", + "once_cell", + "version_check", +] + [[package]] name = "aho-corasick" version = "1.0.2" @@ -26,6 +38,12 @@ dependencies = [ "memchr", ] +[[package]] +name = "allocator-api2" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56fc6cf8dc8c4158eed8649f9b8b0ea1518eb62b544fe9490d66fa0b349eafe9" + [[package]] name = "android-tzdata" version = "0.1.1" @@ -99,6 +117,18 @@ dependencies = [ "windows-sys", ] +[[package]] +name = "argon2" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2e554a8638bdc1e4eae9984845306cc95f8a9208ba8d49c3859fd958b46774d" +dependencies = [ + "base64ct", + "blake2", + "cpufeatures", + "password-hash", +] + [[package]] name = "async-trait" version = "0.1.71" @@ -107,7 +137,16 @@ checksum = "a564d521dd56509c4c47480d00b80ee55f7e385ae48db5744c67ad50c92d2ebf" dependencies = [ "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.25", +] + +[[package]] +name = "atoi" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f28d99ec8bfea296261ca1af174f24225171fea9664ba9003cbebee704810528" +dependencies = [ + "num-traits", ] [[package]] @@ -540,7 +579,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.25", ] [[package]] @@ -580,6 +619,12 @@ dependencies = [ "vsimd", ] +[[package]] +name = "base64ct" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" + [[package]] name = "bitflags" version = "1.3.2" @@ -591,6 +636,18 @@ name = "bitflags" version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" +dependencies = [ + "serde", +] + +[[package]] +name = "blake2" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" +dependencies = [ + "digest", +] [[package]] name = "block-buffer" @@ -601,12 +658,29 @@ dependencies = [ "generic-array", ] +[[package]] +name = "bollard-stubs" +version = "1.41.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed2f2e73fffe9455141e170fb9c1feb0ac521ec7e7dcd47a7cab72a658490fb8" +dependencies = [ + "chrono", + "serde", + "serde_with", +] + [[package]] name = "bumpalo" version = "3.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" +[[package]] +name = "byteorder" +version = "1.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" + [[package]] name = "bytes" version = "1.4.0" @@ -673,6 +747,7 @@ dependencies = [ "rustc_version", "semver", "serde", + "sqlx", "thiserror", "utoipa", ] @@ -701,6 +776,20 @@ dependencies = [ [[package]] name = "charted-database" version = "0.0.0-devel.0" +dependencies = [ + "argon2", + "async-trait", + "charted-common", + "eyre", + "false", + "once_cell", + "regex", + "serde", + "sqlx", + "tracing", + "utoipa", + "validator", +] [[package]] name = "charted-helm-charts" @@ -712,6 +801,7 @@ version = "0.0.0-devel.0" dependencies = [ "ansi_term", "async-trait", + "charted-common", "chrono", "clap", "clap_complete", @@ -738,6 +828,11 @@ dependencies = [ [[package]] name = "charted-openapi" version = "0.0.0-devel.0" +dependencies = [ + "charted-common", + "charted-config", + "utoipa", +] [[package]] name = "charted-redis" @@ -760,6 +855,7 @@ name = "charted-server" version = "0.0.0-devel.0" dependencies = [ "ansi_term", + "async-trait", "axum", "charted-common", "charted-config", @@ -784,6 +880,7 @@ dependencies = [ "serde", "serde_json", "serde_yaml", + "sqlx", "tokio", "tower", "tower-layer", @@ -804,6 +901,22 @@ dependencies = [ "remi-s3", ] +[[package]] +name = "charted-testcontainers" +version = "0.0.0-devel.0" +dependencies = [ + "charted-testcontainers-macros", + "testcontainers", +] + +[[package]] +name = "charted-testcontainers-macros" +version = "0.0.0-devel.0" +dependencies = [ + "quote", + "syn 2.0.25", +] + [[package]] name = "chrono" version = "0.4.26" @@ -861,7 +974,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.25", ] [[package]] @@ -904,6 +1017,12 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" +[[package]] +name = "const-oid" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "795bc6e66a8e340f075fcf6227e417a2dc976b92b91f3cdc778bb858778b6747" + [[package]] name = "core-foundation" version = "0.9.3" @@ -922,13 +1041,28 @@ checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" [[package]] name = "cpufeatures" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03e69e28e9f7f77debdedbaafa2866e1de9ba56df55a8bd7cfc724c25a09987c" +checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" dependencies = [ "libc", ] +[[package]] +name = "crc" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86ec7a15cbe22e59248fc7eadb1907dab5ba09372595da4d73dd805ed4417dfe" +dependencies = [ + "crc-catalog", +] + +[[package]] +name = "crc-catalog" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cace84e55f07e7301bae1c519df89cdad8cc3cd868413d3fdbdeca9ff3db484" + [[package]] name = "crc32c" version = "0.6.3" @@ -981,6 +1115,16 @@ dependencies = [ "scopeguard", ] +[[package]] +name = "crossbeam-queue" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1cfb3ea8a53f37c40dea2c7bedcbd88bdfae54f5e2175d6ecaff1c988353add" +dependencies = [ + "cfg-if", + "crossbeam-utils", +] + [[package]] name = "crossbeam-utils" version = "0.8.16" @@ -1000,14 +1144,38 @@ dependencies = [ "typenum", ] +[[package]] +name = "darling" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c" +dependencies = [ + "darling_core 0.13.4", + "darling_macro 0.13.4", +] + [[package]] name = "darling" version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" dependencies = [ - "darling_core", - "darling_macro", + "darling_core 0.14.4", + "darling_macro 0.14.4", +] + +[[package]] +name = "darling_core" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 1.0.109", ] [[package]] @@ -1024,13 +1192,24 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "darling_macro" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" +dependencies = [ + "darling_core 0.13.4", + "quote", + "syn 1.0.109", +] + [[package]] name = "darling_macro" version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" dependencies = [ - "darling_core", + "darling_core 0.14.4", "quote", "syn 1.0.109", ] @@ -1045,6 +1224,17 @@ dependencies = [ "uuid", ] +[[package]] +name = "der" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c7ed52955ce76b1554f509074bb357d3fb8ac9b51288a65a3fd480d1dfba946" +dependencies = [ + "const-oid", + "pem-rfc7468", + "zeroize", +] + [[package]] name = "derive_builder" version = "0.12.0" @@ -1060,7 +1250,7 @@ version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c11bdc11a0c47bc7d37d582b5285da6849c96681023680b906673c5707af7b0f" dependencies = [ - "darling", + "darling 0.14.4", "proc-macro2", "quote", "syn 1.0.109", @@ -1083,6 +1273,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer", + "const-oid", "crypto-common", "subtle", ] @@ -1114,11 +1305,20 @@ version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f" +[[package]] +name = "dotenvy" +version = "0.15.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" + [[package]] name = "either" version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" +dependencies = [ + "serde", +] [[package]] name = "encoding_rs" @@ -1156,6 +1356,23 @@ dependencies = [ "libc", ] +[[package]] +name = "etcetera" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "136d1b5283a1ab77bd9257427ffd09d8667ced0570b6f938942bc7568ed5b943" +dependencies = [ + "cfg-if", + "home", + "windows-sys", +] + +[[package]] +name = "event-listener" +version = "2.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" + [[package]] name = "eyre" version = "0.6.8" @@ -1166,6 +1383,12 @@ dependencies = [ "once_cell", ] +[[package]] +name = "false" +version = "0.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "849bcc293a0d93c4d4adbebc8decf828a832a1d5e445af888cd99bc81ec0f96b" + [[package]] name = "fastrand" version = "1.9.0" @@ -1187,6 +1410,18 @@ dependencies = [ "winapi", ] +[[package]] +name = "flume" +version = "0.10.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1657b4441c3403d9f7b3409e47575237dac27b1b5726df654a6ecbf92f0f7577" +dependencies = [ + "futures-core", + "futures-sink", + "pin-project", + "spin 0.9.8", +] + [[package]] name = "fnv" version = "1.0.7" @@ -1259,6 +1494,17 @@ dependencies = [ "futures-util", ] +[[package]] +name = "futures-intrusive" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d930c203dd0b6ff06e0201a4a2fe9149b43c684fd4420555b26d21b1a02956f" +dependencies = [ + "futures-core", + "lock_api", + "parking_lot", +] + [[package]] name = "futures-io" version = "0.3.28" @@ -1273,7 +1519,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.25", ] [[package]] @@ -1363,6 +1609,19 @@ name = "hashbrown" version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" +dependencies = [ + "ahash", + "allocator-api2", +] + +[[package]] +name = "hashlink" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "312f66718a2d7789ffef4f4b7b213138ed9f1eb3aa1d0d82fc99f88fb3ffd26f" +dependencies = [ + "hashbrown 0.14.0", +] [[package]] name = "headers" @@ -1394,6 +1653,9 @@ name = "heck" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +dependencies = [ + "unicode-segmentation", +] [[package]] name = "hermit-abi" @@ -1407,6 +1669,15 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +[[package]] +name = "hkdf" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "791a029f6b9fc27657f6f188ec6e5e43f6911f6f878e0dc5501396e09809d437" +dependencies = [ + "hmac", +] + [[package]] name = "hmac" version = "0.12.1" @@ -1416,6 +1687,15 @@ dependencies = [ "digest", ] +[[package]] +name = "home" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" +dependencies = [ + "windows-sys", +] + [[package]] name = "hostname" version = "0.3.1" @@ -1566,7 +1846,6 @@ checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", "hashbrown 0.12.3", - "serde", ] [[package]] @@ -1577,6 +1856,7 @@ checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" dependencies = [ "equivalent", "hashbrown 0.14.0", + "serde", ] [[package]] @@ -1622,6 +1902,15 @@ dependencies = [ "windows-sys", ] +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.8" @@ -1642,6 +1931,9 @@ name = "lazy_static" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +dependencies = [ + "spin 0.5.2", +] [[package]] name = "libc" @@ -1649,6 +1941,23 @@ version = "0.2.147" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" +[[package]] +name = "libm" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4" + +[[package]] +name = "libsqlite3-sys" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afc22eff61b133b115c6e8c74e818c628d6d5e7a502afea6f64dee076dd94326" +dependencies = [ + "cc", + "pkg-config", + "vcpkg", +] + [[package]] name = "linux-raw-sys" version = "0.3.8" @@ -1729,6 +2038,12 @@ 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 = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + [[package]] name = "miniz_oxide" version = "0.7.1" @@ -1785,6 +2100,16 @@ dependencies = [ "tempfile", ] +[[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 = "ntapi" version = "0.4.1" @@ -1804,6 +2129,23 @@ dependencies = [ "winapi", ] +[[package]] +name = "num-bigint-dig" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc84195820f291c7697304f3cbdadd1cb7199c0efc917ff5eafd71225c136151" +dependencies = [ + "byteorder", + "lazy_static", + "libm", + "num-integer", + "num-iter", + "num-traits", + "rand", + "smallvec", + "zeroize", +] + [[package]] name = "num-integer" version = "0.1.45" @@ -1814,6 +2156,17 @@ dependencies = [ "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-traits" version = "0.2.15" @@ -1821,6 +2174,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" dependencies = [ "autocfg", + "libm", ] [[package]] @@ -1871,7 +2225,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.25", ] [[package]] @@ -1950,12 +2304,32 @@ dependencies = [ "windows-targets", ] +[[package]] +name = "password-hash" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "346f04948ba92c43e8469c1ee6736c7563d71012b17d40745260fe106aac2166" +dependencies = [ + "base64ct", + "rand_core", + "subtle", +] + [[package]] name = "paste" version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4b27ab7be369122c218afc2079489cdcb4b517c0a3fc386ff11e1fedfcc2b35" +[[package]] +name = "pem-rfc7468" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412" +dependencies = [ + "base64ct", +] + [[package]] name = "percent-encoding" version = "2.3.0" @@ -1979,7 +2353,7 @@ checksum = "ec2e072ecce94ec471b13398d5402c188e76ac03cf74dd1a975161b23a3f6d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.25", ] [[package]] @@ -1994,6 +2368,27 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +[[package]] +name = "pkcs1" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8ffb9f10fa047879315e6625af03c164b16962a5368d724ed16323b68ace47f" +dependencies = [ + "der", + "pkcs8", + "spki", +] + +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", +] + [[package]] name = "pkg-config" version = "0.3.27" @@ -2258,6 +2653,28 @@ dependencies = [ "winapi", ] +[[package]] +name = "rsa" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ab43bb47d23c1a631b4b680199a45255dce26fa9ab2fa902581f624ff13e6a8" +dependencies = [ + "byteorder", + "const-oid", + "digest", + "num-bigint-dig", + "num-integer", + "num-iter", + "num-traits", + "pkcs1", + "pkcs8", + "rand_core", + "signature", + "spki", + "subtle", + "zeroize", +] + [[package]] name = "rustc-demangle" version = "0.1.23" @@ -2527,22 +2944,22 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.167" +version = "1.0.171" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7daf513456463b42aa1d94cff7e0c24d682b429f020b9afa4f5ba5c40a22b237" +checksum = "30e27d1e4fd7659406c492fd6cfaf2066ba8773de45ca75e855590f856dc34a9" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.167" +version = "1.0.171" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b69b106b68bc8054f0e974e70d19984040f8a5cf9215ca82626ea4853f82c4b9" +checksum = "389894603bd18c46fa56231694f8d827779c0951a667087194cf9de94ed24682" dependencies = [ "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.25", ] [[package]] @@ -2578,6 +2995,28 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_with" +version = "1.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "678b5a069e50bf00ecd22d0cd8ddf7c236f68581b03db652061ed5eb13a312ff" +dependencies = [ + "serde", + "serde_with_macros", +] + +[[package]] +name = "serde_with_macros" +version = "1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e182d6ec6f05393cc0e5ed1bf81ad6db3a8feedf8ee515ecdd369809bcce8082" +dependencies = [ + "darling 0.13.4", + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "serde_yaml" version = "0.9.22" @@ -2631,6 +3070,16 @@ dependencies = [ "libc", ] +[[package]] +name = "signature" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e1788eed21689f9cf370582dfc467ef36ed9c707f073528ddafa8d83e3b8500" +dependencies = [ + "digest", + "rand_core", +] + [[package]] name = "slab" version = "0.4.8" @@ -2667,6 +3116,240 @@ name = "spin" version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +dependencies = [ + "lock_api", +] + +[[package]] +name = "spki" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a" +dependencies = [ + "base64ct", + "der", +] + +[[package]] +name = "sqlformat" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c12bc9199d1db8234678b7051747c07f517cdcf019262d1847b94ec8b1aee3e" +dependencies = [ + "itertools", + "nom", + "unicode_categories", +] + +[[package]] +name = "sqlx" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ef53c86d2066e04f0ac6b1364f16d13d82388e2d07f11a5c71782345555761" +dependencies = [ + "sqlx-core", + "sqlx-macros", + "sqlx-mysql", + "sqlx-postgres", + "sqlx-sqlite", +] + +[[package]] +name = "sqlx-core" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a22fd81e9c1ad53c562edb869ff042b215d4eadefefc4784bacfbfd19835945" +dependencies = [ + "ahash", + "atoi", + "byteorder", + "bytes", + "chrono", + "crc", + "crossbeam-queue", + "dotenvy", + "either", + "event-listener", + "futures-channel", + "futures-core", + "futures-intrusive", + "futures-io", + "futures-util", + "hashlink", + "hex", + "indexmap 2.0.0", + "log", + "memchr", + "native-tls", + "once_cell", + "paste", + "percent-encoding", + "serde", + "serde_json", + "sha2", + "smallvec", + "sqlformat", + "thiserror", + "tokio", + "tokio-stream", + "tracing", + "url", +] + +[[package]] +name = "sqlx-macros" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00bb7c096a202b8164c175614cbfb79fe0e1e0a3d50e0374526183ef2974e4a2" +dependencies = [ + "proc-macro2", + "quote", + "sqlx-core", + "sqlx-macros-core", + "syn 1.0.109", +] + +[[package]] +name = "sqlx-macros-core" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37d644623ab9699014e5b3cb61a040d16caa50fd477008f63f1399ae35498a58" +dependencies = [ + "dotenvy", + "either", + "heck", + "hex", + "once_cell", + "proc-macro2", + "quote", + "serde", + "serde_json", + "sha2", + "sqlx-core", + "sqlx-mysql", + "sqlx-postgres", + "sqlx-sqlite", + "syn 1.0.109", + "tempfile", + "tokio", + "url", +] + +[[package]] +name = "sqlx-mysql" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8264c59b28b6858796acfcedc660aa4c9075cc6e4ec8eb03cdca2a3e725726db" +dependencies = [ + "atoi", + "base64 0.21.2", + "bitflags 2.3.3", + "byteorder", + "bytes", + "chrono", + "crc", + "digest", + "dotenvy", + "either", + "futures-channel", + "futures-core", + "futures-io", + "futures-util", + "generic-array", + "hex", + "hkdf", + "hmac", + "itoa", + "log", + "md-5", + "memchr", + "once_cell", + "percent-encoding", + "rand", + "rsa", + "serde", + "sha1", + "sha2", + "smallvec", + "sqlx-core", + "stringprep", + "thiserror", + "tracing", + "whoami", +] + +[[package]] +name = "sqlx-postgres" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cab6147b81ca9213a7578f1b4c9d24c449a53953cd2222a7b5d7cd29a5c3139" +dependencies = [ + "atoi", + "base64 0.21.2", + "bitflags 2.3.3", + "byteorder", + "chrono", + "crc", + "dotenvy", + "etcetera", + "futures-channel", + "futures-core", + "futures-io", + "futures-util", + "hex", + "hkdf", + "hmac", + "home", + "itoa", + "log", + "md-5", + "memchr", + "once_cell", + "rand", + "serde", + "serde_json", + "sha1", + "sha2", + "smallvec", + "sqlx-core", + "stringprep", + "thiserror", + "tracing", + "whoami", +] + +[[package]] +name = "sqlx-sqlite" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59fba60afa64718104b71eec6984f8779d4caffff3b30cde91a75843c7efc126" +dependencies = [ + "atoi", + "chrono", + "flume", + "futures-channel", + "futures-core", + "futures-executor", + "futures-intrusive", + "futures-util", + "libsqlite3-sys", + "log", + "percent-encoding", + "serde", + "sqlx-core", + "tracing", + "url", +] + +[[package]] +name = "stringprep" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ee348cb74b87454fff4b551cbf727025810a004f88aeacae7f85b87f4e9a1c1" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] [[package]] name = "strsim" @@ -2693,9 +3376,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.23" +version = "2.0.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59fb7d6d8281a51045d62b8eb3a7d1ce347b76f312af50cd3dc0af39c87c1737" +checksum = "15e3fc8c0c74267e2df136e5e5fb656a464158aa57624053375eb9c8c6e25ae2" dependencies = [ "proc-macro2", "quote", @@ -2737,6 +3420,23 @@ dependencies = [ "windows-sys", ] +[[package]] +name = "testcontainers" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e2b1567ca8a2b819ea7b28c92be35d9f76fb9edb214321dcc86eb96023d1f87" +dependencies = [ + "bollard-stubs", + "futures", + "hex", + "hmac", + "log", + "rand", + "serde", + "serde_json", + "sha2", +] + [[package]] name = "thiserror" version = "1.0.43" @@ -2754,7 +3454,7 @@ checksum = "463fe12d7993d3b327787537ce8dd4dfa058de32fc2b195ef3cde03dc4771e8f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.25", ] [[package]] @@ -2848,7 +3548,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.25", ] [[package]] @@ -2946,7 +3646,7 @@ checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.25", ] [[package]] @@ -3036,6 +3736,18 @@ dependencies = [ "tinyvec", ] +[[package]] +name = "unicode-segmentation" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" + +[[package]] +name = "unicode_categories" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" + [[package]] name = "unsafe-libyaml" version = "0.2.8" @@ -3087,11 +3799,11 @@ checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" [[package]] name = "utoipa" -version = "3.3.0" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68ae74ef183fae36d650f063ae7bde1cacbe1cd7e72b617cbe1e985551878b98" +checksum = "520434cac5c98120177d5cc15be032703f6dca7d5ef82e725c798113b375000a" dependencies = [ - "indexmap 1.9.3", + "indexmap 2.0.0", "serde", "serde_json", "serde_yaml", @@ -3100,14 +3812,15 @@ dependencies = [ [[package]] name = "utoipa-gen" -version = "3.3.0" +version = "3.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ea8ac818da7e746a63285594cce8a96f5e00ee31994e655bd827569cb8b137b" +checksum = "6e22e88a487b6e0374533871b79b1f5ded05671bd0936bd547eb42f82fb9060d" dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.23", + "regex", + "syn 2.0.25", "uuid", ] @@ -3121,6 +3834,21 @@ dependencies = [ "serde", ] +[[package]] +name = "validator" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b92f40481c04ff1f4f61f304d61793c7b56ff76ac1469f1beb199b1445b253bd" +dependencies = [ + "idna", + "lazy_static", + "regex", + "serde", + "serde_derive", + "serde_json", + "url", +] + [[package]] name = "valuable" version = "0.1.0" @@ -3187,7 +3915,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.25", "wasm-bindgen-shared", ] @@ -3221,7 +3949,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.25", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -3252,6 +3980,12 @@ dependencies = [ "untrusted", ] +[[package]] +name = "whoami" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22fc3756b8a9133049b26c7f61ab35416c130e8c09b660f5b3958b446f52cc50" + [[package]] name = "winapi" version = "0.3.9" diff --git a/Cargo.toml b/Cargo.toml index 78529cc88..7cdccf7d9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,5 +29,7 @@ members = [ "crates/search/elasticsearch", "crates/search/meilisearch", "crates/storage", + "test/proc-macro-libs/containers", + "test/containers", "tools/helm-plugin" ] diff --git a/build/rust_project.bzl b/build/rust_project.bzl index a5f93caf9..62fb2f15a 100644 --- a/build/rust_project.bzl +++ b/build/rust_project.bzl @@ -80,13 +80,14 @@ def rust_project( srcs = ["src/main.rs"], deps = [":charted_{name}".format(name = name)] + deps, rustc_flags = ["-C", "incremental=true"], + visibility = ["//visibility:public"], ) rust_binary( name = "release_bin", srcs = ["src/main.rs"], deps = [":charted_{name}".format(name = name)] + deps, - rustc_flags = ["-C", "debuginfo=0", "-C", "opt-level=3", "-C", "lto=fat", "-C", "incremental=true"], + rustc_flags = ["-C", "lto=fat", "-C", "incremental=true"], ) if build_script: diff --git a/build/utils.bzl b/build/utils.bzl index 8d56154f2..3535a97c4 100644 --- a/build/utils.bzl +++ b/build/utils.bzl @@ -34,6 +34,8 @@ def get_cargo_manifests(): "crates/search/meilisearch", "crates/storage", "tools/helm-plugin", + "test/proc-macro-libs/containers", + "test/containers", "server", "cli", "", diff --git a/crates/common/BUILD.bazel b/crates/common/BUILD.bazel index 0cde282cf..faae15cba 100644 --- a/crates/common/BUILD.bazel +++ b/crates/common/BUILD.bazel @@ -37,6 +37,7 @@ rust_project( "@crate_index//:regex", "@crate_index//:semver", "@crate_index//:serde", + "@crate_index//:sqlx", "@crate_index//:thiserror", "@crate_index//:utoipa", ], diff --git a/crates/common/Cargo.toml b/crates/common/Cargo.toml index ad021af1c..c2fe21168 100644 --- a/crates/common/Cargo.toml +++ b/crates/common/Cargo.toml @@ -31,6 +31,7 @@ rand = "0.8.5" regex = "1.9.0" semver = { version = "1.0.17", features = ["serde"] } serde = { version = "1.0.166", features = ["derive"] } +sqlx = "0.7.0" thiserror = "1.0.41" utoipa = "3.3.0" diff --git a/crates/common/src/bitfield.rs b/crates/common/src/bitfield.rs index 59dfa288f..6ad52de90 100644 --- a/crates/common/src/bitfield.rs +++ b/crates/common/src/bitfield.rs @@ -13,9 +13,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -use std::collections::HashMap; - use crate::hashmap; +use std::collections::HashMap; #[derive(Debug, Clone, PartialEq, Eq, thiserror::Error)] pub enum BitfieldError { diff --git a/crates/common/src/models.rs b/crates/common/src/models.rs index f76745677..e0a01cbd1 100644 --- a/crates/common/src/models.rs +++ b/crates/common/src/models.rs @@ -31,7 +31,7 @@ lazy_static! { static ref NAME_REGEX: Regex = Regex::new(r"^([A-z]|-|_|\\d{0,9}){0,32}").unwrap(); } -pub type DateTime = chrono::DateTime; +pub type DateTime = chrono::DateTime; /// Represents a union enum that can hold a Snowflake ([u64]-based integer) /// and a Name, which is a String that is validated with the Name regex. @@ -56,7 +56,7 @@ impl<'s> ToSchema<'s> for NameOrSnowflake { "NameOrSnowflake", RefOr::T(Schema::OneOf( OneOfBuilder::new() - .description(Some("Represents a union enum that can hold a Snowflake ([u64]-based integer) and a Name, which is a String that is validated with the Name regex.")) + .description(Some("Represents a union enum that can hold a Snowflake and a Name, which is a String that is validated with the Name regex.")) .item(ID::schema().1) .item(Name::schema().1) .build(), @@ -77,21 +77,7 @@ impl NameOrSnowflake { Ok(()) } - NameOrSnowflake::Name(s) => { - if s.is_empty() { - return Err("is empty"); - } - - if s.len() > 32 { - return Err("exceeded over 32 characters"); - } - - if !NAME_REGEX.is_match(s.as_str()) { - return Err("did not match to a valid Name"); - } - - Ok(()) - } + NameOrSnowflake::Name(s) => Name::is_valid(s), } } } @@ -116,6 +102,7 @@ impl From for NameOrSnowflake { /// Represents the distribution that this instance is running off from. #[derive(Debug, Clone, Copy, Serialize, Deserialize, Default, PartialEq, Eq, PartialOrd, Ord)] +#[serde(rename_all = "lowercase")] pub enum Distribution { /// Running on a Kubernetes cluster, it can also be running /// from the [official Helm chart](https://charts.noelware.org/~/charted/server). @@ -180,9 +167,7 @@ impl<'s> ToSchema<'s> for Distribution { /// pointer. /// /// Names are validated with the following regex: `^([A-z]|-|_|\\d{0,9}){0,32}` -/// -/// This struct is only here for OpenAPI purposes, should never be used anywhere else. -pub(crate) struct Name; +pub struct Name; impl<'s> ToSchema<'s> for Name { fn schema() -> (&'s str, RefOr) { @@ -200,6 +185,25 @@ impl<'s> ToSchema<'s> for Name { } } +impl Name { + pub fn is_valid>(input: I) -> Result<(), &'static str> { + let s = input.as_ref(); + if s.is_empty() { + return Err("was empty"); + } + + if s.len() > 32 { + return Err("exceeded over 32 characters"); + } + + if !NAME_REGEX.is_match(s) { + return Err("did not match to a valid Name"); + } + + Ok(()) + } +} + pub mod helm { use super::DateTime; use semver::{Version, VersionReq}; @@ -472,6 +476,7 @@ pub mod entities { use once_cell::sync::Lazy; use semver::Version; use serde::{Deserialize, Serialize}; + use sqlx::FromRow; use utoipa::{ openapi::{RefOr, Schema}, ToSchema, @@ -605,7 +610,7 @@ pub mod entities { } /// Represents an account that can own [repositories][Repository] and [organizations][Organizations] - #[derive(Debug, Clone, Default, Serialize, Deserialize, ToSchema, PartialEq, Eq, PartialOrd, Ord)] + #[derive(Debug, Clone, Default, Serialize, Deserialize, ToSchema, FromRow)] pub struct User { /// Whether if this User is a Verified Publisher or not. #[serde(default = "crate::models::helm::falsy")] @@ -643,12 +648,12 @@ pub mod entities { /// Unique identifier to locate this user with the API #[schema(schema_with = snowflake_schema)] - pub id: u64, + pub id: i64, } /// Represents a collection of a user's connections that can be used /// to login from different sources (like GitHub OAuth2) - #[derive(Debug, Clone, Default, ToSchema, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord)] + #[derive(Debug, Clone, Default, ToSchema, Serialize, Deserialize, FromRow)] pub struct UserConnections { /// Snowflake ID that was sourced from [Noelware's Accounts System](https://accounts.noelware.org) #[serde(default)] @@ -671,10 +676,10 @@ pub mod entities { /// Snowflake of the user that owns this connections object. #[schema(schema_with = snowflake_schema)] - pub id: u64, + pub id: i64, } - #[derive(Debug, Clone, Default, ToSchema, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord)] + #[derive(Debug, Clone, Default, ToSchema, Serialize, Deserialize, FromRow)] pub struct Repository { /// Short description about this user, can be `null` if none was provided. #[serde(default)] @@ -709,7 +714,7 @@ pub mod entities { /// Unique identifier to locate this repository from the API #[schema(schema_with = snowflake_schema)] - pub id: u64, + pub id: i64, } /// Represents a resource that contains a release from a [Repository] release. Releases @@ -719,7 +724,7 @@ pub mod entities { /// Any repository can have an unlimited amount of releases, but tags cannot clash /// into each other, so the API server will not accept it. Each tag should be /// a SemVer 2 comformant string, parsing is related to how Cargo evaluates SemVer 2 tags. - #[derive(Debug, Clone, Serialize, Deserialize, ToSchema, PartialEq, Eq, PartialOrd, Ord)] + #[derive(Debug, Clone, Serialize, Deserialize, ToSchema, FromRow)] pub struct RepositoryRelease { /// Whether if this release is a pre-release or not. #[serde(default = "crate::models::helm::falsy")] @@ -740,12 +745,12 @@ pub mod entities { /// Unique identifier to locate this repository release resource from the API. #[schema(schema_with = snowflake_schema)] - pub id: u64, + pub id: i64, } /// Represents a resource that is correlated to a repository or organization member /// that can control the repository's metadata. - #[derive(Debug, Clone, Default, Serialize, Deserialize, ToSchema, PartialEq, Eq, PartialOrd, Ord)] + #[derive(Debug, Clone, Default, Serialize, Deserialize, ToSchema, FromRow)] pub struct Member { /// Display name for this member. This should be formatted as '{display_name} (@{username})' if this /// is set, otherwise '@{username}' is used. @@ -765,7 +770,7 @@ pub mod entities { /// Unique identifier to locate this member with the API #[schema(schema_with = snowflake_schema)] - pub id: u64, + pub id: i64, } impl Member { @@ -787,7 +792,7 @@ pub mod entities { /// Represents a unified entity that can manage and own repositories outside /// a User. Organizations to the server is used for business-related Helm charts /// that aren't tied to a specific User. - #[derive(Debug, Clone, ToSchema, Serialize, Deserialize, Default, PartialEq, Eq, PartialOrd, Ord)] + #[derive(Debug, Clone, ToSchema, Serialize, Deserialize, Default, FromRow)] pub struct Organization { /// Whether if this Organization is a Verified Publisher or not. #[serde(default = "crate::models::helm::falsy")] @@ -828,13 +833,13 @@ pub mod entities { /// Unique identifier to locate this organization with the API #[schema(schema_with = snowflake_schema)] - pub id: u64, + pub id: i64, } /// A resource for personal-managed API tokens that is created by a User. This is useful /// for command line tools or scripts that need to interact with charted-server, but /// the main use-case is for the [Helm plugin](https://charts.noelware.org/docs/helm-plugin/current). - #[derive(Debug, Clone, Default, ToSchema, Serialize, Deserialize)] + #[derive(Debug, Clone, Default, ToSchema, Serialize, Deserialize, FromRow)] pub struct ApiKey { /// Short description about this API key. #[serde(default)] @@ -850,6 +855,7 @@ pub mod entities { /// The token itself. This is never revealed when querying, but only revealed /// when you create the token. + #[serde(default)] pub token: Option, /// User resource that owns this API key. @@ -860,7 +866,7 @@ pub mod entities { /// Unique identifer to locate this resource in the API server. #[schema(schema_with = snowflake_schema)] - pub id: u64, + pub id: i64, } impl ApiKey { diff --git a/crates/config/src/config.rs b/crates/config/src/config.rs index 3bba8bb2b..eb2955ebe 100644 --- a/crates/config/src/config.rs +++ b/crates/config/src/config.rs @@ -163,7 +163,7 @@ impl Config { }; } - CONFIG.set(merge(&serialized.clone(), &env)?).unwrap(); + CONFIG.set(merge(&env, &serialized.clone())?).unwrap(); Ok(()) } } diff --git a/crates/config/src/database.rs b/crates/config/src/database.rs index 859e8bfd2..d7c2ef0be 100644 --- a/crates/config/src/database.rs +++ b/crates/config/src/database.rs @@ -14,6 +14,7 @@ // limitations under the License. use crate::{make_config, var}; +use std::fmt::Write as _; make_config! { /// Represents the configuration details for configuring charted-server's @@ -72,6 +73,76 @@ make_config! { } } +impl ToString for DatabaseConfig { + fn to_string(&self) -> String { + let mut buf = String::from("postgres://"); + + match (self.username.clone(), self.password.clone()) { + (Some(username), Some(password)) => { + write!(buf, "{username}:{password}@").unwrap(); + } + (Some(_), None) => panic!("provided username, but no password?"), + (None, Some(_)) => panic!("provided password, but no username?"), + _ => {} + } + + write!(buf, "{}:{}/{}", self.host, self.port, self.database).unwrap(); + buf + } +} + +/* + /// Set the maxmium number of connections that the database connection + /// pool should maintain. + #[serde(default = "max_connections")] + pub max_connections: u32 { + default: 10; + env_value: var!("CHARTED_DATABASE_MAX_CONNECTIONS", to: u32, or_else: 10); + }; + + /// The password to use for authentication. + #[serde(default, skip_serializing_if = "Option::is_none")] + password: Option { + default: None; + env_value: var!("CHARTED_DATABASE_PASSWORD", is_optional: true); + }; + + /// The username to use for authentication + #[serde(default, skip_serializing_if = "Option::is_none")] + username: Option { + default: None; + env_value: var!("CHARTED_DATABASE_USERNAME", is_optional: true); + }; + + /// Database name to use when connecting. + #[serde(default = "database")] + pub database: String { + default: "charted".into(); + env_value: var!("CHARTED_DATABASE_NAME", or_else: "charted".into()); + }; + + /// Database schema to select when querying objects. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub schema: Option { + default: None; + env_value: var!("CHARTED_DATABASE_SCHEMA", is_optional: true); + }; + + /// Database host to connect to. + #[serde(default = "host")] + pub host: String { + default: host(); + env_value: var!("CHARTED_DATABASE_HOST", or_else: host()); + }; + + /// Database port to connect to. + #[serde(default = "port")] + pub port: u16 { + default: port(); + env_value: var!("CHARTED_DATABASE_PORT", to: u16, or_else: port()); + }; +*/ + fn host() -> String { String::from("127.0.0.1") } diff --git a/crates/config/src/secure_setting.rs b/crates/config/src/secure_setting.rs index 71b8c837c..69c37033b 100644 --- a/crates/config/src/secure_setting.rs +++ b/crates/config/src/secure_setting.rs @@ -48,28 +48,6 @@ impl SecureSetting { /// ## Example /// ```no_run /// # use charted_types::SecureSettting; - - /* - impl<'de> Visitor<'de> for LongString { - type Value = String; - - fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - write!(formatter, "a string containing at least {} bytes", self.min) - } - - fn visit_str(self, s: &str) -> Result - where - E: de::Error, - { - if s.len() >= self.min { - Ok(s.to_owned()) - } else { - Err(de::Error::invalid_value(Unexpected::Str(s), &self)) - } - } - } - */ - /// # /// let sentry_dsn = SecureSetting::new("sentry_dsn"); /// let dsn = sentry_dsn.load("${CHARTED_SENTRY_DSN:-deeznuts}"); diff --git a/crates/database/BUILD.bazel b/crates/database/BUILD.bazel index 382e07575..cbba0533a 100644 --- a/crates/database/BUILD.bazel +++ b/crates/database/BUILD.bazel @@ -18,4 +18,17 @@ load("//:build/rust_project.bzl", "rust_project") rust_project( name = "database", include_tests = True, + proc_macro_deps = ["@crate_index//:async-trait"], + deps = [ + "//crates/common:charted_common", + "@crate_index//:argon2", + "@crate_index//:eyre", + "@crate_index//:once_cell", + "@crate_index//:regex", + "@crate_index//:serde", + "@crate_index//:sqlx", + "@crate_index//:tracing", + "@crate_index//:utoipa", + "@crate_index//:validator", + ], ) diff --git a/crates/database/Cargo.toml b/crates/database/Cargo.toml index d8bb20b3f..7b07c8a7e 100644 --- a/crates/database/Cargo.toml +++ b/crates/database/Cargo.toml @@ -20,3 +20,17 @@ version = "0.0.0-devel.0" edition = "2021" homepage = "https://charts.noelware.org" authors = ["Noel Towa ", "Noelware Team "] + +[dependencies] +argon2 = "0.5.1" +async-trait = "0.1.71" +charted-common = { version = "0.0.0-devel.0", path = "../common" } +eyre = "0.6.8" +false = "0.0.0" +once_cell = "1.18.0" +regex = "1.9.1" +serde = { version = "1.0.171", features = ["derive"] } +sqlx = { version = "0.7.0", features = ["chrono", "postgres", "runtime-tokio", "tls-native-tls", "migrate"] } +tracing = "0.1.37" +utoipa = "3.4.0" +validator = "0.16.1" diff --git a/crates/database/src/controllers.rs b/crates/database/src/controllers.rs new file mode 100644 index 000000000..56c15dd38 --- /dev/null +++ b/crates/database/src/controllers.rs @@ -0,0 +1,61 @@ +// 🐻‍❄️📦 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. + +pub mod users; + +use async_trait::async_trait; +use eyre::Result; +use serde::{de::DeserializeOwned, ser::Serialize}; +use sqlx::{ + postgres::{PgQueryResult, PgRow}, + FromRow, +}; + +/// Represents a controller that is used to fetch, create, modify, or delete +/// data from the PostgreSQL database. +#[async_trait] +pub trait DatabaseController: Send + Sync { + type Patched: Serialize + DeserializeOwned; + type Created: Serialize + DeserializeOwned; + type Entity: Serialize + DeserializeOwned + FromRow<'static, PgRow>; + + /// Retrieves the [entity][Entity] from the database with the selected + /// snowflake, and returns it. + /// + /// ## Example + /// ```no_run + /// # use charted_database::controllers::users::UserDatabaseController; + /// # + /// # let pool = ...; + /// let users = UserDatabaseController::new(pool.clone()); + /// users.get(1234).await; + /// // => Result(Some(User { id: 1234, ..Default::default() })) + /// ``` + async fn get(&self, id: u64) -> Result>; + + /// Inserts a new [entity][Entity] into the database with the payload to + /// specify on how to create this user. + /// + /// ## Example + /// ```no_run + /// # use charted_database::controllers::users::UserDatabaseController; + /// # + /// # let pool = ...; + /// let users = UserDatabaseController::new(pool.clone()); + /// ``` + async fn create(&self, payload: Self::Created) -> Result; + // async fn patch(&self, payload: Self::Patched) -> Result<()>; + // async fn delete(&self, id: u64) -> Result<()>; +} diff --git a/crates/database/src/controllers/users.rs b/crates/database/src/controllers/users.rs new file mode 100644 index 000000000..aa44eb804 --- /dev/null +++ b/crates/database/src/controllers/users.rs @@ -0,0 +1,190 @@ +// 🐻‍❄️📦 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. + +use super::DatabaseController; +use argon2::{ + password_hash::{rand_core::OsRng, SaltString}, + Argon2, PasswordHasher, +}; +use async_trait::async_trait; +use charted_common::{ + models::{entities::User, Name}, + Snowflake, +}; +use eyre::{eyre, Result}; +use once_cell::sync::Lazy; +use regex::Regex; +use serde::{Deserialize, Serialize}; +use sqlx::{postgres::PgQueryResult, query, query_as, types::chrono::Local, PgPool, Postgres, QueryBuilder}; +use utoipa::ToSchema; +use validator::validate_email; + +static ARGON2: Lazy = Lazy::new(Argon2::default); +static PASSWORD_REGEX: Lazy = + Lazy::new(|| Regex::new(r#"^.*(?=.{8,})(?=.*[a-zA-Z])(?=.*\d)?(?=.*[!#\$%&? \"])?.*$"#).unwrap()); + +/// Represents the payload for creating a new user. +#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)] +pub struct CreateUserPayload { + /// User handle to use to identify yourself. + #[schema(value_type = Name)] + pub username: String, + + /// The password to use when authenticating, this is optional on non-local sessions. + #[schema(pattern = "^.*(?=.{8,})(?=.*[a-zA-Z])(?=.*\\d)?(?=.*[!#$%&? \"])?.*$")] + pub password: Option, + + /// Email address to identify this user + pub email: String, +} + +#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)] +pub struct PatchUserPayload { + /// Optional field to update this user's gravatar email. If this user doesn't + /// have an avatar that is used or prefers not to use their previously uploaded + /// avatars and they set their Gravatar email, their Gravatar will be used. + pub gravatar_email: Option, + + /// Short description about this user. If this field was provided, then the + /// description will be overwritten. If this field is `null`, then nothing + /// will happen. If this field is a empty string, then the description + /// will be wiped. + pub description: Option, + + /// Updates this user's username. + #[schema(value_type = Name, nullable)] + pub username: Option, + + /// Updates this user's password, if the session manager configured allows it. + pub password: Option, + + /// Updates this user's email. + pub email: Option, + + /// Updates this user's display name. + pub name: Option, +} + +/// Represents a [`DatabaseController`] for interacting with users. +#[derive(Debug, Clone)] +pub struct UserDatabaseController { + snowflake: Snowflake, + pool: PgPool, +} + +impl UserDatabaseController { + pub fn new(pool: PgPool, snowflake: Snowflake) -> UserDatabaseController { + Self { pool, snowflake } + } +} + +#[async_trait] +impl DatabaseController for UserDatabaseController { + type Patched = (); + type Created = CreateUserPayload; + type Entity = User; + + async fn get(&self, id: u64) -> Result> { + Ok( + QueryBuilder::<'static, Postgres>::new("SELECT * FROM users WHERE id = ") + .push_bind(id as i64) + .build_query_as::() + .fetch_optional(&self.pool) + .await?, + ) + } + + async fn create(&self, payload: Self::Created) -> Result { + if payload.username.is_empty() { + return Err(eyre!("no username was provided")); + } + + if payload.username.len() > 32 { + return Err(eyre!( + "username exceeded {} characters, max chars is 32", + payload.username.len() - 32 + )); + } + + if let Err(why) = Name::is_valid(payload.username.as_str()) { + return Err(eyre!("unable to validate username: {why}")); + } + + if payload.email.is_empty() { + return Err(eyre!("no email was provided")); + } + + if !validate_email(payload.email.as_str()) { + return Err(eyre!("email '{}' was not valid", payload.email)); + } + + if (query_as::("SELECT * FROM users WHERE username = $1;") + .bind(payload.username.clone()) + .fetch_optional(&self.pool) + .await?) + .is_some() + { + return Err(eyre!("username '{}' is already taken", payload.username)); + } + + if (query_as::("SELECT * FROM organizations WHERE name = $1;") + .bind(payload.username.clone()) + .fetch_optional(&self.pool) + .await?) + .is_some() + { + return Err(eyre!("username '{}' is already taken", payload.username)); + } + + if (query_as::("SELECT * FROM users WHERE email = $1;") + .bind(payload.email.clone()) + .fetch_optional(&self.pool) + .await?) + .is_some() + { + return Err(eyre!("email '{}' is already taken", payload.email)); + } + + let mut snowflake = self.snowflake.clone(); + let id = snowflake.generate(); + + Ok( + query("INSERT INTO users(id, username, email, created_at, password) VALUES($1, $2, $3, $4, $5);") + .bind(id.value() as i64) + .bind(payload.username) + .bind(payload.email) + .bind(Local::now()) + .bind(match payload.password { + Some(res) => { + if !PASSWORD_REGEX.is_match(res.as_str()) { + return Err(eyre!( + "passwords can only contain letters, digits, and special characters" + )); + } + + let salt = SaltString::generate(&mut OsRng); + let hashed = ARGON2 + .hash_password(res.as_ref(), &salt) + .map_err(|e| eyre!("unable to hash password: {e}"))?; + + Some(hashed.to_string()) + } + None => None, + }) + .execute(&self.pool) + .await?, + ) + } +} diff --git a/crates/database/src/lib.rs b/crates/database/src/lib.rs index e69de29bb..0c7707d2a 100644 --- a/crates/database/src/lib.rs +++ b/crates/database/src/lib.rs @@ -0,0 +1,16 @@ +// 🐻‍❄️📦 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. + +pub mod controllers; diff --git a/crates/openapi/BUILD.bazel b/crates/openapi/BUILD.bazel index 19e7e6d5c..338c99864 100644 --- a/crates/openapi/BUILD.bazel +++ b/crates/openapi/BUILD.bazel @@ -18,4 +18,9 @@ load("//:build/rust_project.bzl", "rust_project") rust_project( name = "openapi", include_tests = True, + deps = [ + "//crates/common:charted_common", + "//crates/config:charted_config", + "@crate_index//:utoipa", + ], ) diff --git a/crates/openapi/Cargo.toml b/crates/openapi/Cargo.toml index 731b05e9b..d4d4771bd 100644 --- a/crates/openapi/Cargo.toml +++ b/crates/openapi/Cargo.toml @@ -20,3 +20,8 @@ version = "0.0.0-devel.0" edition = "2021" homepage = "https://charts.noelware.org" authors = ["Noel Towa ", "Noelware Team "] + +[dependencies] +charted-common = { version = "0.0.0-devel.0", path = "../common" } +charted-config = { version = "0.0.0-devel.0", path = "../config" } +utoipa = "3.3.0" diff --git a/crates/openapi/src/lib.rs b/crates/openapi/src/lib.rs index e69de29bb..efb49f1b9 100644 --- a/crates/openapi/src/lib.rs +++ b/crates/openapi/src/lib.rs @@ -0,0 +1,59 @@ +// 🐻‍❄️📦 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. + +use charted_common::VERSION; +use charted_config::Config; +use utoipa::openapi::{ + external_docs::ExternalDocsBuilder, ContactBuilder, InfoBuilder, LicenseBuilder, OpenApi, OpenApiBuilder, + ServerBuilder, +}; + +/// Creates a new [`OpenAPI`] object. +pub fn openapi() -> OpenApi { + let config = Config::get(); + let info = InfoBuilder::new() + .title("charted-server") + .version(VERSION) + .terms_of_service(Some("https://charts.noelware.org/legal/tos")) + .license(Some( + LicenseBuilder::new() + .name("Apache 2.0") + .url(Some("https://www.apache.org/licenses/LICENSE-2.0")) + .build(), + )) + .contact(Some( + ContactBuilder::new() + .name(Some("Noelware, LLC.")) + .url(Some("https://noelware.org")) + .email(Some("team@noelware.org")) + .build(), + )) + .description(Some( + "🐻‍❄️📦 Free, open source, and reliable Helm Chart registry made in Rust", + )) + .build(); + + OpenApiBuilder::new() + .info(info) + .external_docs(Some( + ExternalDocsBuilder::new() + .url(format!("https://charts.noelware.org/docs/server/{VERSION}")) + .build(), + )) + .servers(Some([ServerBuilder::new() + .url(format!("http://{}", config.server.addr())) + .build()])) + .build() +} diff --git a/distribution/docker/alpine.Dockerfile b/distribution/docker/alpine.Dockerfile index 8d1463f25..53491a38a 100644 --- a/distribution/docker/alpine.Dockerfile +++ b/distribution/docker/alpine.Dockerfile @@ -19,8 +19,8 @@ RUN apk update && apk add --no-cache git ca-certificates WORKDIR /build COPY . . -RUN bazel build //cli:bin -RUN mkdir -p /build/output && cp $(bazel cquery //cli:bin --output=files &>/dev/null | grep --color=never bazel-out) /build/output/charted +RUN bazel build //cli:release_bin --compilation_mode=fastbuild +RUN mkdir -p /build/output && cp $(bazel cquery //cli:release_bin --output=files &>/dev/null | grep --color=never bazel-out) /build/output/charted RUN bazel shutdown FROM alpine:3.18 @@ -28,9 +28,10 @@ FROM alpine:3.18 RUN apk update && apk add --no-cache bash tini curl WORKDIR /app/noelware/charted/server -COPY --from=build /build/output/charted /app/noelware/charted/server/bin/charted -COPY distribution/docker/scripts /app/noelware/charted/server/scripts -COPY distribution/config /app/noelware/charted/server/config +COPY --from=build /build/crates/database/migrations /app/noelware/charted/server/migrations +COPY --from=build /build/output/charted /app/noelware/charted/server/bin/charted +COPY distribution/docker/scripts /app/noelware/charted/server/scripts +COPY distribution/config /app/noelware/charted/server/config ENV CHARTED_DISTRIBUTION_TYPE=docker EXPOSE 3651 diff --git a/distribution/docker/debian.Dockerfile b/distribution/docker/debian.Dockerfile index 657b81de0..ea6f32dfb 100644 --- a/distribution/docker/debian.Dockerfile +++ b/distribution/docker/debian.Dockerfile @@ -19,8 +19,8 @@ RUN apt update && apt install -y git ca-certificates WORKDIR /build COPY . . -RUN bazel build //cli:bin -RUN mkdir -p /build/output && cp $(bazel cquery //cli:bin --output=files &>/dev/null | grep --color=never bazel-out) /build/output/charted +RUN bazel build //cli:release_bin --compilation_mode=fastbuild +RUN mkdir -p /build/output && cp $(bazel cquery //cli:release_bin --output=files &>/dev/null | grep --color=never bazel-out) /build/output/charted RUN bazel shutdown FROM debian:bullseye-slim diff --git a/distribution/peckish.amd64.yaml b/distribution/peckish.amd64.yaml index 349a43757..e9279878e 100644 --- a/distribution/peckish.amd64.yaml +++ b/distribution/peckish.amd64.yaml @@ -25,7 +25,7 @@ input: name: charted release binary type: "file" paths: - - ./bazel-out/k8-fastbuild/bin/cli/bin + - ./bazel-out/k8-fastbuild/bin/cli/release_bin output: - name: "tarball: charted distribution" type: tarball diff --git a/docs/.noeldoc.hcl b/docs/.noeldoc.hcl new file mode 100644 index 000000000..5f97f1a08 --- /dev/null +++ b/docs/.noeldoc.hcl @@ -0,0 +1,52 @@ +# 🐻‍❄️📦 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. + +registry "default" { + version = 1 + url = "https://noeldoc.dev/registry" +} + +noeldoc { + version = ">=0.1-beta" + experimental { + # Enables sandboxing where modules and renderers can be permitted + # from doing anything else, unless explicitly told to. + sandboxing = true + + # Enables modules and renderers to read files from the filesystem. + permissions = ["+filesystem:read"] + } +} + +project "charted-server" { + description = "🐻‍❄️📦 Free, open source, and reliable Helm Chart registry made in Rust" + version = "${noeldoc.filesystem.read("../.charted-version")}" + + module { + registry = "default" + id = "dev.noeldoc.modules/markdown" + opts = { + "validate" = true, + "tree" = noeldoc.glob(["src/**/*.md"]), + "mdx" = false + } + } + + renderer { + registry = "default" + modules = ["dev.noeldoc.modules/markdown"] + id = "dev.noeldoc.renderers/markdown" + } +} diff --git a/server/BUILD.bazel b/server/BUILD.bazel index 9b419b002..82aa5a50f 100644 --- a/server/BUILD.bazel +++ b/server/BUILD.bazel @@ -33,6 +33,8 @@ local_crates = ["//{path}:charted_{name}".format( rust_project( name = "server", + include_tests = True, + proc_macro_deps = ["@crate_index//:async-trait"], deps = [ "@crate_index//:ansi_term", "@crate_index//:axum", @@ -48,6 +50,7 @@ rust_project( "@crate_index//:serde", "@crate_index//:serde_json", "@crate_index//:serde_yaml", + "@crate_index//:sqlx", "@crate_index//:tokio", "@crate_index//:tower", "@crate_index//:tower-layer", diff --git a/server/Cargo.toml b/server/Cargo.toml index 8ec609ac0..84c44d935 100644 --- a/server/Cargo.toml +++ b/server/Cargo.toml @@ -23,6 +23,7 @@ authors = ["Noel Towa ", "Noelware Team "] [dependencies] ansi_term = "0.12.1" +async-trait = "0.1.71" axum = { version = "0.6.18", features = ["headers", "macros", "http2", "tracing", "multipart"] } charted-common = { version = "0.0.0-devel.0", path = "../crates/common" } charted-config = { version = "0.0.0-devel.0", path = "../crates/config" } @@ -44,9 +45,10 @@ remi-s3 = "0.2.1" sentry = { version = "0.31.1", features = ["tracing", "tower", "tower-http"] } sentry-tower = "0.31.1" sentry-tracing = "0.31.1" -serde = "1.0.163" +serde = { version = "1.0.163", features = ["derive"] } serde_json = "1.0.96" serde_yaml = "0.9.21" +sqlx = { version = "0.7.0", features = ["postgres", "runtime-tokio", "tls-native-tls"] } tokio = { version = "1.28.1", features = ["full"] } tower = { version = "0.4.13", features = ["tracing"] } tower-layer = "0.3.2" diff --git a/server/src/bootstrap/start_server.rs b/server/src/bootstrap/start_server.rs index 96718b124..687b31f79 100644 --- a/server/src/bootstrap/start_server.rs +++ b/server/src/bootstrap/start_server.rs @@ -25,14 +25,14 @@ pub struct StartServerPhase; impl BootstrapPhase for StartServerPhase { fn bootstrap<'l0, 'async_method>( &'l0 self, - _config: &'async_method Config, + config: &'async_method Config, ) -> Pin> + Send + 'async_method>> where 'l0: 'async_method, Self: 'async_method, { Box::pin(async move { - let server = Server::new().await?; + let server = Server::new(config.clone()).await?; server.run().await?; Ok(()) diff --git a/server/src/lib.rs b/server/src/lib.rs index a0a950258..8434b1b35 100644 --- a/server/src/lib.rs +++ b/server/src/lib.rs @@ -16,17 +16,18 @@ #[macro_use] extern crate tracing; -mod app; mod bootstrap; +mod server; mod version; pub(crate) mod middleware; pub(crate) mod models; +pub mod openapi; pub mod routing; -pub use app::*; use charted_config::Config; use eyre::Result; +pub use server::*; pub use version::*; pub async fn bootstrap(config: &Config) -> Result<()> { diff --git a/server/src/middleware/mod.rs b/server/src/middleware/mod.rs index dbeda9a2f..76e7d8dad 100644 --- a/server/src/middleware/mod.rs +++ b/server/src/middleware/mod.rs @@ -14,5 +14,7 @@ // limitations under the License. mod log; +mod request_id; pub use log::*; +pub use request_id::*; diff --git a/server/src/middleware/request_id.rs b/server/src/middleware/request_id.rs new file mode 100644 index 000000000..ee36dd1dc --- /dev/null +++ b/server/src/middleware/request_id.rs @@ -0,0 +1,40 @@ +// 🐻‍❄️📦 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. + +use axum::{ + http::{HeaderMap, HeaderName, HeaderValue, Request}, + middleware::Next, + response::IntoResponse, +}; +use charted_common::{rand_string, COMMIT_HASH, VERSION}; + +pub async fn request_id(req: Request, next: Next) -> impl IntoResponse { + let mut headers = HeaderMap::new(); + headers.insert( + HeaderName::from_static("x-request-id"), + HeaderValue::from_str(rand_string(24).as_str()).unwrap(), + ); + + headers.insert( + HeaderName::from_static("server"), + HeaderValue::from_str( + format!("Noelware/charted-server (+https://github.com/charted-dev/charted; v{VERSION}+{COMMIT_HASH})") + .as_str(), + ) + .unwrap(), + ); + + (headers, next.run(req).await) +} diff --git a/server/src/models/mod.rs b/server/src/models/mod.rs index ce76c62c1..a022575e0 100644 --- a/server/src/models/mod.rs +++ b/server/src/models/mod.rs @@ -14,3 +14,29 @@ // limitations under the License. pub mod res; +pub mod yaml { + use axum::{ + http::{header, HeaderValue, StatusCode}, + response::{IntoResponse, Response}, + }; + use serde::{de::DeserializeOwned, ser::Serialize}; + + #[derive(Debug, Clone)] + pub struct Yaml(StatusCode, T); + + impl IntoResponse for Yaml + where + T: Serialize + DeserializeOwned, + { + fn into_response(self) -> Response { + let mut res = Response::new(serde_yaml::to_string(&self.1).unwrap()); + *res.status_mut() = self.0; + res.headers_mut().insert( + header::CONTENT_TYPE, + HeaderValue::from_static("text/yaml; charset=utf-8"), + ); + + res.into_response() + } + } +} diff --git a/server/src/models/res.rs b/server/src/models/res.rs index 3515a17e6..2fbdb5d2e 100644 --- a/server/src/models/res.rs +++ b/server/src/models/res.rs @@ -16,12 +16,14 @@ use std::fmt::Debug; use axum::{ - http::StatusCode, + headers::HeaderValue, + http::{header, StatusCode}, response::{IntoResponse, Response}, }; use serde::{Deserialize, Serialize}; +use utoipa::ToSchema; -#[derive(Serialize, Deserialize, Debug)] +#[derive(Serialize, Deserialize, Debug, ToSchema)] pub struct ApiResponse where T: Serialize + Debug, @@ -29,11 +31,15 @@ where #[serde(skip)] status: StatusCode, + /// Indicates whether if this response was a success or not. pub success: bool, + /// Optional data that was attached to this payload. #[serde(skip_serializing_if = "Option::is_none")] pub data: Option, + /// List of errors that might've occurred when this request + /// was being processed. #[serde(skip_serializing_if = "Option::is_none")] pub errors: Option>, } @@ -42,6 +48,10 @@ impl IntoResponse for ApiResponse { fn into_response(self) -> Response { let mut res = Response::new(serde_json::to_string(&self).unwrap()); *res.status_mut() = self.status; + res.headers_mut().insert( + header::CONTENT_TYPE, + HeaderValue::from_static("application/json; charset=utf-8"), + ); res.into_response() } @@ -55,7 +65,7 @@ impl Into for ApiResponse { } } -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize, ToSchema)] pub struct Error { message: String, code: String, diff --git a/server/src/openapi.rs b/server/src/openapi.rs new file mode 100644 index 000000000..ebe2f5973 --- /dev/null +++ b/server/src/openapi.rs @@ -0,0 +1,163 @@ +// 🐻‍❄️📦 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. + +use charted_common::{ + models::{entities::*, helm::*, Distribution, Name, NameOrSnowflake}, + ID, +}; +use utoipa::{ + openapi::{ContentBuilder, ObjectBuilder, OpenApiBuilder, RefOr, Response, ResponseBuilder, Schema, SchemaType}, + OpenApi, ToResponse, +}; + +#[derive(OpenApi)] +#[openapi(components(schemas( + // Entities + NameOrSnowflake, + Name, + ID, + Distribution, + ChartSpecVersion, + ChartType, + ImportValue, + StringOrImportValue, + ChartDependency, + ChartMaintainer, + Chart, + ChartIndexSpec, + User, + Repository, + Organization, + ApiKey, + Member, + RepositoryRelease, + + // Responses + crate::routing::v1::features::FeaturesResponse, + crate::routing::v1::main::MainResponse, + crate::routing::v1::info::InfoResponse, + + // Payloads + charted_database::controllers::users::CreateUserPayload +), responses( + crate::routing::v1::features::FeaturesResponse, + crate::routing::v1::main::MainResponse, + crate::routing::v1::info::InfoResponse, + EmptyApiResponse +)))] +pub(crate) struct ChartedOpenAPI; + +macro_rules! add_paths { + ($($path:literal: $fn:expr;)*) => {{ + ::utoipa::openapi::PathsBuilder::new()$(.path($path, $fn))*.build() + }}; +} + +macro_rules! gen_response_schema_priv { + ($ty:ty) => { + $crate::openapi::gen_response_schema!($ty, content: "application/json"); + }; + + ($ty:ty, content: $content:literal) => { + impl<'r> ::utoipa::ToResponse<'r> for $ty { + fn response() -> (&'r str, ::utoipa::openapi::RefOr<::utoipa::openapi::Response>) { + ( + concat!("Api", stringify!($ty)), + ::utoipa::openapi::RefOr::T( + ::utoipa::openapi::ResponseBuilder::new() + .description(concat!("Response object for ", stringify!($ty), ".").to_string()) + .content($content, ::utoipa::openapi::ContentBuilder::new() + .schema(::utoipa::openapi::RefOr::T(::utoipa::openapi::Schema::Object({ + ::utoipa::openapi::ObjectBuilder::new() + .property( + "success", + ::utoipa::openapi::ObjectBuilder::new() + .schema_type(::utoipa::openapi::SchemaType::Boolean) + .description(Some("Indicates whether if this response was a success or not")) + .build() + ) + .required("success") + .property( + "data", + ::utoipa::openapi::Ref::from_schema_name(stringify!($ty)) + ) + .required("data") + .build() + }))) + .build() + ) + .build(), + ), + ) + } + } + }; +} + +pub(crate) use gen_response_schema_priv as gen_response_schema; + +#[derive(serde::Serialize, serde::Deserialize)] +pub(crate) struct EmptyApiResponse; + +impl<'r> ToResponse<'r> for EmptyApiResponse { + fn response() -> (&'r str, RefOr) { + ( + "EmptyApiResponse", + RefOr::T( + ResponseBuilder::new() + .description("Empty response object") + .content( + "application/json", + ContentBuilder::new() + .schema(RefOr::T(Schema::Object( + ObjectBuilder::new() + .property( + "success", + ObjectBuilder::new() + .schema_type(SchemaType::Boolean) + .description(Some( + "Indicates whether if this response was a success or not", + )) + .build(), + ) + .required("success") + .build(), + ))) + .build(), + ) + .build(), + ), + ) + } +} + +pub fn document() -> utoipa::openapi::OpenApi { + let mut openapi = charted_openapi::openapi(); + let charted = ChartedOpenAPI::openapi(); + openapi.merge(charted); + + // now, let's merge our paths + openapi.merge( + OpenApiBuilder::new() + .paths(add_paths! { + "/features": crate::routing::v1::features::paths(); + "/info": crate::routing::v1::info::paths(); + "/": crate::routing::v1::main::paths(); + }) + .build(), + ); + + openapi +} diff --git a/server/src/routing/mod.rs b/server/src/routing/mod.rs index c85e19b80..51d5dc84b 100644 --- a/server/src/routing/mod.rs +++ b/server/src/routing/mod.rs @@ -13,6 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +use crate::Server; use axum::Router; use once_cell::sync::Lazy; use tower::ServiceBuilder; @@ -20,17 +21,16 @@ use tower::ServiceBuilder; pub mod v1; #[allow(non_upper_case_globals)] -static default_router: Lazy Router + Send + Sync>> = Lazy::new(|| Box::new(v1::create_router)); +static default_router: Lazy Router + Send + Sync>> = Lazy::new(|| Box::new(v1::create_router)); macro_rules! create_router_internal { ($($cr:ident),*) => { - fn create_router_internal() -> ::axum::Router { - let mut router = ::axum::Router::new(); + fn create_router_internal() -> ::axum::Router<$crate::Server> { + let mut router = ::axum::Router::new().merge(default_router()); $( router = router.clone().nest(concat!("/", stringify!($cr)), $crate::routing::$cr::create_router()); )* - router = router.clone().merge(default_router()); router } }; @@ -38,12 +38,14 @@ macro_rules! create_router_internal { create_router_internal!(v1); -pub fn create_router() -> Router { +pub fn create_router() -> Router { let stack = ServiceBuilder::new() .layer(sentry_tower::NewSentryLayer::new_from_top()) .layer(sentry_tower::SentryHttpLayer::new()); - create_router_internal() + Router::new() + .merge(create_router_internal()) .layer(stack) .layer(axum::middleware::from_fn(crate::middleware::log)) + .layer(axum::middleware::from_fn(crate::middleware::request_id)) } diff --git a/server/src/routing/v1/cdn.rs b/server/src/routing/v1/cdn.rs new file mode 100644 index 000000000..e1b117273 --- /dev/null +++ b/server/src/routing/v1/cdn.rs @@ -0,0 +1,32 @@ +// 🐻‍❄️📦 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. + +use crate::{ + models::res::{ok, ApiResponse, Empty}, + Server, +}; +use axum::{ + extract::{Path, State}, + http::StatusCode, + response::IntoResponse, +}; +use serde_json::json; + +pub async fn cdn( + Path(_path): Path, + State(_server): State, +) -> Result> { + Ok(ok(StatusCode::OK, json!({}))) +} diff --git a/server/src/routing/v1/features.rs b/server/src/routing/v1/features.rs new file mode 100644 index 000000000..621de354e --- /dev/null +++ b/server/src/routing/v1/features.rs @@ -0,0 +1,76 @@ +// 🐻‍❄️📦 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. + +use crate::{models::res::ok, openapi::gen_response_schema, Server}; +use axum::{extract::State, http::StatusCode, response::IntoResponse}; +use serde::{Deserialize, Serialize}; +use std::collections::HashMap; +use utoipa::{ + openapi::{ + path::{OperationBuilder, PathItemBuilder}, + ContentBuilder, PathItem, PathItemType, Ref, RefOr, ResponseBuilder, + }, + ToSchema, +}; + +/// Represents the response from the `GET /features` REST handler +#[derive(Debug, Clone, Default, Serialize, Deserialize, ToSchema)] +pub struct FeaturesResponse { + /// Whether if the external OCI registry experimental feature or the home-made implementation registry feature is enabled or not. + pub docker_registry: bool, + + /// Whether if registrations are enabled on the server + pub registrations: bool, + + /// Whether if the Audit Logging feature is enabled or not. + pub audit_logs: bool, + + /// Whether if the Webhooks feature is enabled or not. + pub webhooks: bool, + + /// Whether if this server instance is invite-only. + pub is_invite_only: bool, + + /// Object of all the session integrations available. + pub integrations: HashMap, + + /// Whether if the server has search capabilities with the Elasticsearch or Meilisearch backend + pub search: bool, +} + +gen_response_schema!(FeaturesResponse); + +pub async fn features(State(server): State) -> impl IntoResponse { + let _config = server.config.clone(); + + ok(StatusCode::OK, FeaturesResponse::default()) +} + +pub fn paths() -> PathItem { + PathItemBuilder::new() + .operation( + PathItemType::Get, + OperationBuilder::new() + .description(Some("REST handler to retrieve this server's features that were enabled or disabled by the server administrators")) + .response("200", ResponseBuilder::new() + .description("Successful response.") + .content("application/json", ContentBuilder::new() + .schema(RefOr::Ref(Ref::from_response_name("ApiFeaturesResponse"))) + .build() + ).build()) + .build(), + ) + .build() +} diff --git a/server/src/routing/v1/info.rs b/server/src/routing/v1/info.rs new file mode 100644 index 000000000..e5c13473e --- /dev/null +++ b/server/src/routing/v1/info.rs @@ -0,0 +1,91 @@ +// 🐻‍❄️📦 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. + +use crate::{models::res::ok, openapi::gen_response_schema}; +use axum::{http::StatusCode, response::IntoResponse}; +use charted_common::{models::Distribution, BUILD_DATE, COMMIT_HASH, VERSION}; +use serde::{Deserialize, Serialize}; +use utoipa::{ + openapi::{ + path::{OperationBuilder, PathItemBuilder}, + ContentBuilder, PathItem, PathItemType, Ref, RefOr, ResponseBuilder, + }, + ToSchema, +}; + +/// Represents the response for the `GET /info` REST handler. +#[derive(Debug, Clone, Default, Serialize, Deserialize, ToSchema)] +pub struct InfoResponse { + /// The distribution the server is running off from + pub distribution: Distribution, + + /// The commit hash from the Git repository. + pub commit_sha: String, + + /// Build date in RFC3339 format + pub build_date: String, + + /// Product name. Will always be "charted-server" + pub product: String, + + /// Valid SemVer 2 of the current version of this instance + pub version: String, + + /// Vendor of charted-server, will always be "Noelware" + pub vendor: String, +} + +gen_response_schema!(InfoResponse); + +pub async fn info() -> impl IntoResponse { + ok( + StatusCode::OK, + InfoResponse { + distribution: Distribution::default(), + commit_sha: COMMIT_HASH.to_string(), + build_date: BUILD_DATE.to_string(), + product: "charted-server".into(), + version: VERSION.to_string(), + vendor: "Noelware, LLC.".into(), + }, + ) +} + +pub fn paths() -> PathItem { + PathItemBuilder::new() + .operation( + PathItemType::Get, + OperationBuilder::new() + .description(Some( + "REST handler for getting more information about this instance that can be publically be visible.", + )) + .response( + "200", + RefOr::T( + ResponseBuilder::new() + .description("Successful response") + .content( + "application/json", + ContentBuilder::new() + .schema(RefOr::Ref(Ref::from_schema_name("InfoResponse"))) + .build(), + ) + .build(), + ), + ) + .build(), + ) + .build() +} diff --git a/server/src/routing/v1/main.rs b/server/src/routing/v1/main.rs index 5c227d00f..f5df411e0 100644 --- a/server/src/routing/v1/main.rs +++ b/server/src/routing/v1/main.rs @@ -13,14 +13,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -use crate::models::res::ok; +use crate::{models::res::ok, openapi::gen_response_schema}; use axum::{http::StatusCode, response::IntoResponse}; use charted_common::VERSION; use serde::{Deserialize, Serialize}; use utoipa::{ openapi::{ path::{OperationBuilder, PathItemBuilder}, - ContentBuilder, PathItemType, Paths, PathsBuilder, RefOr, ResponseBuilder, + ContentBuilder, PathItem, PathItemType, Ref, RefOr, ResponseBuilder, }, ToSchema, }; @@ -39,6 +39,8 @@ pub struct MainResponse { docs: String, } +gen_response_schema!(MainResponse); + impl Default for MainResponse { fn default() -> MainResponse { MainResponse { @@ -53,27 +55,25 @@ pub async fn main() -> impl IntoResponse { ok(StatusCode::OK, MainResponse::default()) } -pub fn paths() -> Paths { - PathsBuilder::new() - .path( - "/", - PathItemBuilder::new() - .operation( - PathItemType::Get, - OperationBuilder::new() - .description(Some("Generic main entrypoint to charted-server's API server")) - .response( - "200", - RefOr::T( - ResponseBuilder::new() - .content( - "application/json", - ContentBuilder::new().schema(MainResponse::schema().1).build(), - ) +pub fn paths() -> PathItem { + PathItemBuilder::new() + .operation( + PathItemType::Get, + OperationBuilder::new() + .description(Some("Generic main entrypoint to charted-server's API server")) + .response( + "200", + RefOr::T( + ResponseBuilder::new() + .description("Successful response.") + .content( + "application/json", + ContentBuilder::new() + .schema(RefOr::Ref(Ref::from_schema_name("MainResponse"))) .build(), - ), - ) - .build(), + ) + .build(), + ), ) .build(), ) diff --git a/server/src/routing/v1/metrics.rs b/server/src/routing/v1/metrics.rs new file mode 100644 index 000000000..663851016 --- /dev/null +++ b/server/src/routing/v1/metrics.rs @@ -0,0 +1,14 @@ +// 🐻‍❄️📦 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. diff --git a/server/src/routing/v1/mod.rs b/server/src/routing/v1/mod.rs index e2e70dc15..855020444 100644 --- a/server/src/routing/v1/mod.rs +++ b/server/src/routing/v1/mod.rs @@ -13,12 +13,27 @@ // See the License for the specific language governing permissions and // limitations under the License. -use axum::{Router, routing::*}; +use axum::{routing::*, Router}; +use cdn::*; +use features::*; +use info::*; use main::*; +// use metrics::*; +use crate::Server; +use openapi::*; +pub mod cdn; +pub mod features; +pub mod info; pub mod main; +pub mod metrics; +pub mod openapi; -pub fn create_router() -> Router { +pub fn create_router() -> Router { Router::new() .route("/", get(main)) + .route("/info", get(info)) + .route("/features", get(features)) + .route("/_openapi", get(openapi)) + .route("/cdn/*file", get(cdn)) } diff --git a/server/src/routing/v1/openapi.rs b/server/src/routing/v1/openapi.rs new file mode 100644 index 000000000..292d82ded --- /dev/null +++ b/server/src/routing/v1/openapi.rs @@ -0,0 +1,22 @@ +// 🐻‍❄️📦 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. + +use crate::openapi::document; +use axum::{extract::Json, http::StatusCode, response::IntoResponse}; + +pub async fn openapi() -> impl IntoResponse { + let doc = document(); + (StatusCode::OK, Json(doc)) +} diff --git a/server/src/app.rs b/server/src/server.rs similarity index 55% rename from server/src/app.rs rename to server/src/server.rs index 2d1dab9cb..628b9d65f 100644 --- a/server/src/app.rs +++ b/server/src/server.rs @@ -13,35 +13,41 @@ // See the License for the specific language governing permissions and // limitations under the License. -use crate::routing::*; -use charted_common::{COMMIT_HASH, VERSION}; +use crate::routing::create_router; +use charted_common::{Snowflake, COMMIT_HASH, VERSION}; use charted_config::{Config, ConfigExt, StorageConfig}; +use charted_database::controllers::users::UserDatabaseController; +use charted_database::controllers::DatabaseController; use charted_storage::MultiStorageService; use eyre::Result; use remi_core::StorageService; use remi_fs::FilesystemStorageService; use remi_s3::S3StorageService; -use sentry::{types::Dsn, ClientInitGuard, ClientOptions}; -use std::{borrow::Cow, str::FromStr, sync::Arc}; +use sentry::types::Dsn; +use sentry::{ClientInitGuard, ClientOptions}; +use sqlx::postgres::PgPoolOptions; +use sqlx::PgPool; +use std::{any::Any, borrow::Cow, str::FromStr, sync::Arc}; +/// A default implemention of a [`Server`]. #[derive(Clone)] pub struct Server { - /// Represents the configured storage service to use. - pub storage: MultiStorageService, + _sentry_guard: Option>, - /// Represents a reference to the parsed [`Config`] from - /// the 'server' subcommand in the CLI. - pub config: Config, + // a hacky solution to beat associated types + // + // is it wrong? probably. + // does it work? most likely. + controllers: Vec>, + snowflake: Snowflake, - // Sentry guard that will be dropped once this struct - // is done. - _sentry_guard: Option>, + pub storage: MultiStorageService, + pub config: Config, + pub pool: PgPool, } impl Server { - /// Creates a new [`Server`] object. - pub async fn new() -> Result { - let config = Config::get(); + pub async fn new(config: Config) -> Result { let sentry_guard = match config.sentry_dsn() { Ok(Some(dsn)) => Some(Arc::new(sentry::init(ClientOptions { dsn: Some(Dsn::from_str(dsn.as_str())?), @@ -54,27 +60,51 @@ impl Server { _ => None, }; - info!("server init: init storage service"); let storage = match config.storage.clone() { StorageConfig::Filesystem(fs) => MultiStorageService::Filesystem(FilesystemStorageService::with_config(fs)), StorageConfig::S3(s3) => MultiStorageService::S3(S3StorageService::new(s3)), }; storage.init().await?; - info!("server init: init storage server (success)"); + + let pool = PgPoolOptions::new() + .max_connections(config.database.max_connections) + .connect(config.database.to_string().as_str()) + .await?; + + // TODO(@auguwu): create cluster of snowflakes with 1023 nodes per + // server instance? + let snowflake = Snowflake::new(0); + let users = UserDatabaseController::new(pool.clone(), snowflake.clone()); Ok(Server { + _sentry_guard: sentry_guard, + controllers: vec![Arc::new(users)], + snowflake, storage, config, - _sentry_guard: sentry_guard, + pool, }) } + pub fn controller(&self) -> &D { + self.controllers + .iter() + .find(move |f| f.is::()) + .expect("unable to find any db controller references with specified type") + .downcast_ref() + .expect("unable to downcast to &D") + } + + pub fn snowflake(&mut self) -> &mut Snowflake { + &mut self.snowflake + } + pub async fn run(&self) -> Result<()> { - let router = create_router(); let addr = self.config.server.addr(); + info!(%addr, "now listening on"); - info!(%addr, "charted-server is now listening on"); + let router: axum::Router = create_router().with_state(self.clone()); axum::Server::bind(&addr).serve(router.into_make_service()).await?; Ok(()) diff --git a/test/containers/BUILD.bazel b/test/containers/BUILD.bazel new file mode 100644 index 000000000..ceb007045 --- /dev/null +++ b/test/containers/BUILD.bazel @@ -0,0 +1,22 @@ +# 🐻‍❄️📦 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. + +load("//:build/rust_project.bzl", "rust_project") + +rust_project( + name = "testcontainers", + proc_macro_deps = ["//test/proc-macro-libs/containers:charted_testcontainers_macros"], + deps = ["@crate_index//:testcontainers"], +) diff --git a/test/containers/Cargo.toml b/test/containers/Cargo.toml new file mode 100644 index 000000000..b3ddf4028 --- /dev/null +++ b/test/containers/Cargo.toml @@ -0,0 +1,26 @@ +# 🐻‍❄️📦 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. + +[package] +name = "charted-testcontainers" +description = "🐻‍❄️📦 Proc Macro to creating Testcontainers via `#[testcontainers]` attribute macro" +version = "0.0.0-devel.0" +edition = "2021" +homepage = "https://charts.noelware.org" +authors = ["Noel Towa ", "Noelware Team "] + +[dependencies] +charted-testcontainers-macros = { version = "0.0.0-devel.0", path = "../proc-macro-libs/containers" } +testcontainers = "0.14.0" diff --git a/test/containers/src/context.rs b/test/containers/src/context.rs new file mode 100644 index 000000000..789722371 --- /dev/null +++ b/test/containers/src/context.rs @@ -0,0 +1,60 @@ +// 🐻‍❄️📦 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. + +use std::sync::Arc; +use testcontainers::clients::Cli; + +/// Represents a context that should be re-used through out +/// tests, and can be used with the `#[testcontainers]` macro +/// via the `configure` proc-macro attribute. +/// +/// ## Example +/// ```no_run +/// # use charted_testcontainers::{testcontainers, Context}; +/// # +/// # #[cfg(test)] +/// # mod tests { +/// # use charted_testcontainers::{testcontainers, Context}; +/// # +/// async fn configure(ctx: Context) { +/// let ctx = Context::default(); +/// if !ctx.is_enabled { +/// return; +/// } +/// } +/// # } +/// ``` +#[derive(Debug, Clone)] +pub struct Context { + pub enabled: bool, + docker_client: Arc>, +} + +impl Context { + pub fn new(client: Option) -> Context { + Context { + enabled: client.is_some(), + docker_client: Arc::new(client), + } + } + + pub fn cli(&self) -> Arc> { + Arc::clone(&self.docker_client) + } + + pub fn is_enabled(&self) -> bool { + self.enabled + } +} diff --git a/test/containers/src/lib.rs b/test/containers/src/lib.rs new file mode 100644 index 000000000..9a7e1f1fe --- /dev/null +++ b/test/containers/src/lib.rs @@ -0,0 +1,19 @@ +// 🐻‍❄️📦 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. + +mod context; + +pub use charted_testcontainers_macros::*; +pub use context::*; diff --git a/test/proc-macro-libs/containers/BUILD.bazel b/test/proc-macro-libs/containers/BUILD.bazel new file mode 100644 index 000000000..1f0342ee9 --- /dev/null +++ b/test/proc-macro-libs/containers/BUILD.bazel @@ -0,0 +1,24 @@ +# 🐻‍❄️📦 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. + +load("//:build/rust_project.bzl", "rust_project") + +rust_project( + name = "testcontainers_macros", + deps = [ + "@crate_index//:quote", + "@crate_index//:syn", + ], +) diff --git a/test/proc-macro-libs/containers/Cargo.toml b/test/proc-macro-libs/containers/Cargo.toml new file mode 100644 index 000000000..5c0c0afee --- /dev/null +++ b/test/proc-macro-libs/containers/Cargo.toml @@ -0,0 +1,29 @@ +# 🐻‍❄️📦 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. + +[package] +name = "charted-testcontainers-macros" +description = "🐻‍❄️📦 Proc Macro to creating Testcontainers via `#[testcontainers]` attribute macro" +version = "0.0.0-devel.0" +edition = "2021" +homepage = "https://charts.noelware.org" +authors = ["Noel Towa ", "Noelware Team "] + +[lib] +proc-macro = true + +[dependencies] +quote = "1.0.29" +syn = "2.0.25" diff --git a/test/proc-macro-libs/containers/README.md b/test/proc-macro-libs/containers/README.md new file mode 100644 index 000000000..dbc0b3e3d --- /dev/null +++ b/test/proc-macro-libs/containers/README.md @@ -0,0 +1,36 @@ +# [Testcontainers](https://github.com/testcontainers/testcontainers-rs) Proc Macros +This directory is the source code for implementing the `#[charted_testcontainers::test]` macro. This is supposed to be similar in how the [@Testcontainers annotation](https://java.testcontainers.org/test_framework_integration/junit_5) from the JUnit5 integration of [Testcontainers (Java)](https://github.com/testcontainers/testcontainers-java) work. + +## Usage +```py +load("//:build/rust_project.bzl", "rust_project") + +rust_project( + name = "some_rust_project", + include_tests = True, + test_proc_macro_deps = ["//test/containers:charted_testcontainers"] +) +``` + +```toml +[dependencies] +charted-testcontainers = { version = "0.0.0-devel.0", path = "../test/containers" } +``` + +```rs +#[cfg(test)] +mod tests { + use charted_testcontainers::{testcontainers, Context}; + use testcontainers::Container; + + /// Method to configure the testcontainers macro. This is where + /// you initialize your containers. + fn configure() {} + + #[testcontainers(configure)] + async fn test(ctx: &Context) { + let postgres_container = ctx.container::(); + assert!(postgres_container.is_some()); + } +} +``` diff --git a/test/proc-macro-libs/containers/src/args.rs b/test/proc-macro-libs/containers/src/args.rs new file mode 100644 index 000000000..32a0ec16d --- /dev/null +++ b/test/proc-macro-libs/containers/src/args.rs @@ -0,0 +1,70 @@ +// 🐻‍❄️📦 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. + +use syn::{ + parse::{Parse, ParseStream}, + punctuated::Punctuated, + spanned::Spanned, + Error, Expr, Meta, Path, Result, Token, +}; + +/// Arguments to a `#[testcontainers]` proc-macro. +pub struct Args { + /// [`ItemFn`] to use to configure the test beforehand. + pub configure: Option, +} + +impl Parse for Args { + fn parse(input: ParseStream) -> Result { + let mut args = Args { configure: None }; + let meta = Punctuated::::parse_terminated(input)?; + while let Some(arg) = meta.iter().next() { + match arg { + Meta::NameValue(nv) => { + let ident = nv + .path + .get_ident() + .ok_or_else(|| Error::new(nv.span(), "expected ident as key"))? + .to_string() + .to_lowercase(); + + match ident.as_str() { + "configure" => { + if args.configure.is_some() { + return Err(Error::new_spanned(ident, "`configure` cannot be overwritten twice")); + } + + let path = match nv.value.clone() { + Expr::Path(path) => path, + other => return Err(Error::new_spanned(other, "unknown expr for `configure`")), + }; + + args.configure = Some(path.path); + } + other => return Err(Error::new_spanned(other, "unknown attribute config key")), + } + } + other => { + return Err(Error::new_spanned( + other, + "unknown attribute in #[testcontainers] macro!", + )) + } + } + } + + Ok(args) + } +} diff --git a/test/proc-macro-libs/containers/src/lib.rs b/test/proc-macro-libs/containers/src/lib.rs new file mode 100644 index 000000000..19b0e192b --- /dev/null +++ b/test/proc-macro-libs/containers/src/lib.rs @@ -0,0 +1,50 @@ +// 🐻‍❄️📦 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. + +mod args; + +use args::Args; +use proc_macro::TokenStream; +use quote::quote; +use syn::{parse_macro_input, spanned::Spanned, Error, ItemFn}; + +#[proc_macro_attribute] +pub fn testcontainers(args: TokenStream, rust: TokenStream) -> TokenStream { + let args = parse_macro_input!(args as Args); + let func = parse_macro_input!(rust as ItemFn); + + if func.sig.asyncness.is_none() { + return Error::new(func.sig.span(), "missing `async` keyword in fn declaration") + .to_compile_error() + .into(); + } + + let header = quote! { #[::tokio::test] }; + let name = func.sig.ident; + let actual_body = func.block; + let configure_body = match args.configure { + Some(path) => quote! { #path().await.unwrap(); }, + None => quote!(), + }; + + quote! { + #header + async fn #name() { + #configure_body + #actual_body + } + } + .into() +} diff --git a/tools/helm-plugin/Cargo.toml b/tools/helm-plugin/Cargo.toml index 1b035f476..43e55bfa5 100644 --- a/tools/helm-plugin/Cargo.toml +++ b/tools/helm-plugin/Cargo.toml @@ -27,7 +27,7 @@ async-trait = "0.1.70" chrono = "0.4.26" clap = { version = "4.3.10", features = ["derive", "env"] } clap_complete = "4.3.1" -#charted-common = { path = "../crates/common", version = "0.0.0-devel.0" } +charted-common = { path = "../../crates/common", version = "0.0.0-devel.0" } color-eyre = { version = "0.6.2", features = ["issue-url", "track-caller"] } dotenv = "0.15.0" eyre = "0.6.8"