From 94ac3da62e46e62579417d800465bd719a0bef01 Mon Sep 17 00:00:00 2001 From: SachaMorard <2254275+SachaMorard@users.noreply.github.com> Date: Fri, 9 Jan 2026 16:55:01 +0100 Subject: [PATCH 1/2] fix: tests --- CONTRIBUTING.md | 91 ------------------------------------------------- Cargo.lock | 44 ++++++++++++------------ Cargo.toml | 2 +- Dockerfile | 11 ------ install.sh | 6 ++-- release.toml | 11 ------ 6 files changed, 26 insertions(+), 139 deletions(-) delete mode 100644 CONTRIBUTING.md delete mode 100644 Dockerfile delete mode 100644 release.toml diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index 0dbe104..0000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,91 +0,0 @@ -# Edgee Contributor Guidelines - -Welcome! This project is created by the team at [Edgee](https://www.edgee.cloud). -We're glad you're interested in contributing! We welcome contributions from people of all backgrounds -who are interested in making great software with us. - -At Edgee, we aspire to empower everyone to create interactive experiences. To do this, -we're exploring and pushing the boundaries of new technologies, and sharing our learnings with the open source community. - -If you have ideas for collaboration, email us at opensource@edgee.cloud or join our [Discord](https://www.edgee.cloud/discord)! - -We're also hiring full-time engineers to work with us everywhere! Check out our current job postings [here](https://github.com/edgee-cloud/careers/issues). - -## Issues - -### Feature Requests - -If you have ideas or how to improve our projects, you can suggest features by opening a GitHub issue. -Make sure to include details about the feature or change, and describe any uses cases it would enable. - -Feature requests will be tagged as `enhancement` and their status will be updated in the comments of the issue. - -### Bugs - -When reporting a bug or unexpected behavior in a project, make sure your issue describes steps -to reproduce the behavior, including the platform you were using, what steps you took, and any error messages. - -Reproducible bugs will be tagged as `bug` and their status will be updated in the comments of the issue. - -### Wontfix - -Issues will be closed and tagged as `wontfix` if we decide that we do not wish to implement it, -usually due to being misaligned with the project vision or out of scope. We will comment on the issue with more detailed reasoning. - -## Contribution Workflow - -### Open Issues - -If you're ready to contribute, start by looking at our open issues tagged as [`help wanted`](../../issues?q=is%3Aopen+is%3Aissue+label%3A"help+wanted") or [`good first issue`](../../issues?q=is%3Aopen+is%3Aissue+label%3A"good+first+issue"). - -You can comment on the issue to let others know you're interested in working on it or to ask questions. - -### Making Changes - -1. Fork the repository. - -2. Review the [Development Workflow](#development-workflow) section to understand how to run the project locally. - -3. Create a new feature [branch](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-and-deleting-branches-within-your-repository). - -4. Make your changes on your branch. Ensure that there are no build errors by running the project with your changes locally. - -5. [Submit the branch as a Pull Request](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork) pointing to the `main` branch of the Edgee repository. A maintainer should comment and/or review your Pull Request within a few days. Although depending on the circumstances, it may take longer. - -### Development Workflow - -#### Setup and run Edgee - -```bash -cargo run -``` - -#### Test - -```bash -cargo test -``` - -This command will be triggered to each PR as a requirement for merging it. - - -## Licensing - -Unless otherwise specified, all Edgee open source projects shall comply with the Apache 2.0 licence. Please see the [LICENSE](LICENSE) file for more information. - -## Contributor Terms - -Thank you for your interest in Edgee’ open source project. By providing a contribution (new or modified code, -other input, feedback or suggestions etc.) you agree to these Contributor Terms. - -You confirm that each of your contributions has been created by you and that you are the copyright owner. -You also confirm that you have the right to provide the contribution to us and that you do it under the -Apache 2.0 licence. - -If you want to contribute something that is not your original creation, you may submit it to Edgee separately -from any contribution, including details of its source and of any license or other restriction -(such as related patents, trademarks, agreements etc.) - -Please also note that our projects are released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md) to -ensure that they are welcoming places for everyone to contribute. By participating in any Edgee open source project, -you agree to keep to the Contributor Code of Conduct. diff --git a/Cargo.lock b/Cargo.lock index 240bccb..11ebda1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1610,7 +1610,28 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cc5d6d6a8504f8caedd7de14576464383900cd3840b7033a7a3dce5ac00121ca" [[package]] -name = "edgee" +name = "edgee-api-client" +version = "1.3.0" +dependencies = [ + "anyhow", + "bon", + "chrono", + "cookie", + "dirs", + "easy-ext", + "progenitor", + "progenitor-client", + "regress", + "reqwest 0.12.28", + "schemars 1.2.0", + "serde", + "serde_json", + "toml 0.9.10+spec-1.1.0", + "uuid", +] + +[[package]] +name = "edgee-cli" version = "1.3.0" dependencies = [ "anyhow", @@ -1656,27 +1677,6 @@ dependencies = [ "zip", ] -[[package]] -name = "edgee-api-client" -version = "1.3.0" -dependencies = [ - "anyhow", - "bon", - "chrono", - "cookie", - "dirs", - "easy-ext", - "progenitor", - "progenitor-client", - "regress", - "reqwest 0.12.28", - "schemars 1.2.0", - "serde", - "serde_json", - "toml 0.9.10+spec-1.1.0", - "uuid", -] - [[package]] name = "edgee-components-runtime" version = "1.3.0" diff --git a/Cargo.toml b/Cargo.toml index c1deece..79d0b1e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ members = ["crates/*"] resolver = "2" [workspace.package] -version = "1.3.0" +version = "1.0.0" authors = ["Edgee "] license = "Apache-2.0" keywords = ["edgee"] diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 7554c24..0000000 --- a/Dockerfile +++ /dev/null @@ -1,11 +0,0 @@ -# syntax=docker/dockerfile:1.3.1 -FROM rust:1.90.0-bookworm as builder -WORKDIR /app -COPY . . -RUN cargo build --release - -FROM debian:bookworm -RUN apt-get update && apt-get install -y libssl-dev -WORKDIR /app -COPY --from=builder /app/target/release/edgee /app/edgee -ENTRYPOINT ["/app/edgee"] diff --git a/install.sh b/install.sh index 518bed3..53188f3 100755 --- a/install.sh +++ b/install.sh @@ -10,7 +10,7 @@ set -u # Package metadata GITHUB_OWNER='edgee-cloud' -GITHUB_REPO='edgee' +GITHUB_REPO='cli' # Helper utilities @@ -131,11 +131,11 @@ download_latest() { cat < Date: Fri, 9 Jan 2026 17:11:26 +0100 Subject: [PATCH 2/2] fix: crates publishing --- Cargo.lock | 140 +++++++++--------- Cargo.toml | 15 +- crates/api-client/Cargo.toml | 3 +- crates/cli/Cargo.toml | 9 +- crates/cli/src/commands/auth/login.rs | 6 +- crates/cli/src/commands/auth/whoami.rs | 6 +- crates/cli/src/commands/components/check.rs | 4 +- crates/cli/src/commands/components/init.rs | 6 +- crates/cli/src/commands/components/push.rs | 14 +- .../cli/src/commands/components/serialize.rs | 4 +- .../cli/src/commands/components/test/mod.rs | 4 +- crates/cli/src/commands/proxy.rs | 6 +- crates/cli/src/commands/serve.rs | 6 +- crates/cli/src/components/boilerplate.rs | 2 +- crates/cli/src/components/manifest.rs | 2 +- crates/cli/src/config.rs | 6 +- crates/cli/src/logger.rs | 2 +- crates/cli/src/telemetry.rs | 6 +- crates/proxy/Cargo.toml | 8 +- release.toml | 11 ++ 20 files changed, 135 insertions(+), 125 deletions(-) create mode 100644 release.toml diff --git a/Cargo.lock b/Cargo.lock index 11ebda1..38becbe 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -287,6 +287,27 @@ version = "1.0.100" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61" +[[package]] +name = "api-client" +version = "1.0.0" +dependencies = [ + "anyhow", + "bon", + "chrono", + "cookie", + "dirs", + "easy-ext", + "progenitor", + "progenitor-client", + "regress", + "reqwest 0.12.28", + "schemars 1.2.0", + "serde", + "serde_json", + "toml 0.9.10+spec-1.1.0", + "uuid", +] + [[package]] name = "arbitrary" version = "1.4.2" @@ -1609,32 +1630,12 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cc5d6d6a8504f8caedd7de14576464383900cd3840b7033a7a3dce5ac00121ca" -[[package]] -name = "edgee-api-client" -version = "1.3.0" -dependencies = [ - "anyhow", - "bon", - "chrono", - "cookie", - "dirs", - "easy-ext", - "progenitor", - "progenitor-client", - "regress", - "reqwest 0.12.28", - "schemars 1.2.0", - "serde", - "serde_json", - "toml 0.9.10+spec-1.1.0", - "uuid", -] - [[package]] name = "edgee-cli" -version = "1.3.0" +version = "1.0.0" dependencies = [ "anyhow", + "api-client", "bon", "chrono", "clap", @@ -1642,9 +1643,7 @@ dependencies = [ "colored", "colored_json", "dirs", - "edgee-api-client", "edgee-components-runtime", - "edgee-proxy", "http 1.4.0", "http-body-util", "hyper 1.8.1", @@ -1655,6 +1654,7 @@ dependencies = [ "open", "openssl", "os_info", + "proxy", "reqwest 0.12.28", "self_update", "sentry", @@ -1712,52 +1712,6 @@ dependencies = [ "serde", ] -[[package]] -name = "edgee-proxy" -version = "1.3.0" -dependencies = [ - "addr", - "aes", - "anyhow", - "base64 0.22.1", - "bytes", - "cargo-llvm-cov", - "cbc", - "chrono", - "cookie", - "edgee-components-runtime", - "edgee-dc-sdk", - "futures", - "hex", - "html-escape", - "http 1.4.0", - "http-body-util", - "hyper 1.8.1", - "hyper-rustls 0.27.7", - "hyper-util", - "ipnetwork", - "json_comments", - "lazy_static", - "lol_html", - "pin-project", - "pretty_assertions", - "regex", - "reqwest 0.12.28", - "rustls 0.23.35", - "rustls-pemfile 2.2.0", - "rustls-pki-types", - "serde", - "serde_json", - "serde_with", - "tokio", - "tokio-rustls 0.26.4", - "tower", - "tower-http", - "tracing", - "url", - "uuid", -] - [[package]] name = "either" version = "1.15.0" @@ -3824,6 +3778,52 @@ dependencies = [ "syn", ] +[[package]] +name = "proxy" +version = "1.0.0" +dependencies = [ + "addr", + "aes", + "anyhow", + "base64 0.22.1", + "bytes", + "cargo-llvm-cov", + "cbc", + "chrono", + "cookie", + "edgee-components-runtime", + "edgee-dc-sdk", + "futures", + "hex", + "html-escape", + "http 1.4.0", + "http-body-util", + "hyper 1.8.1", + "hyper-rustls 0.27.7", + "hyper-util", + "ipnetwork", + "json_comments", + "lazy_static", + "lol_html", + "pin-project", + "pretty_assertions", + "regex", + "reqwest 0.12.28", + "rustls 0.23.35", + "rustls-pemfile 2.2.0", + "rustls-pki-types", + "serde", + "serde_json", + "serde_with", + "tokio", + "tokio-rustls 0.26.4", + "tower", + "tower-http", + "tracing", + "url", + "uuid", +] + [[package]] name = "psl" version = "2.1.175" diff --git a/Cargo.toml b/Cargo.toml index 79d0b1e..8ef0ff6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,6 +20,7 @@ base64 = "0.22.1" bon = "3.6.5" brotli = "8.0.1" bytes = "1.10.1" +cargo-llvm-cov = "0.6.18" cbc = "0.1.2" chrono = "0.4.41" clap = "4.5.41" @@ -29,6 +30,8 @@ colored_json = "5.0.0" cookie = "0.18.1" dirs = "6.0.0" easy-ext = "1.0.2" +edgee-dc-sdk = "1.9.0" +edgee-components-runtime = "1.3.0" futures = "0.3.31" hex = "0.4.3" html-escape = "0.2.13" @@ -52,6 +55,7 @@ open = "5.3.2" openssl = "0.10.73" os_info = "3.12.0" pin-project = "1.1.10" +pretty_assertions = "1.4.1" progenitor = "0.11.0" progenitor-client = "0.11.0" rand = "0.9.2" @@ -89,12 +93,5 @@ wasmtime-wasi-http = "37.0" wit-deps = "0.5.0" zip = "5.1.1" -cargo-llvm-cov = "0.6.18" -pretty_assertions = "1.4.1" - -edgee-dc-sdk = "1.9.0" -edgee-components-runtime = "1.3.0" - -edgee-api-client = { version = "1.3.0", path = "crates/api-client" } -edgee-proxy = { version = "1.3.0", path = "crates/proxy" } - +proxy = { path = "crates/proxy" } +api-client = { path = "crates/api-client" } \ No newline at end of file diff --git a/crates/api-client/Cargo.toml b/crates/api-client/Cargo.toml index 3216935..2e431c7 100644 --- a/crates/api-client/Cargo.toml +++ b/crates/api-client/Cargo.toml @@ -1,5 +1,6 @@ [package] -name = "edgee-api-client" +name = "api-client" +publish = false description = "Edgee API client" version.workspace = true authors.workspace = true diff --git a/crates/cli/Cargo.toml b/crates/cli/Cargo.toml index 73439d9..4c888f8 100644 --- a/crates/cli/Cargo.toml +++ b/crates/cli/Cargo.toml @@ -13,11 +13,13 @@ edition.workspace = true [dependencies] anyhow.workspace = true bon.workspace = true +chrono.workspace = true clap = { workspace = true, features = ["derive", "env"] } clap_complete.workspace = true colored.workspace = true colored_json.workspace = true dirs.workspace = true +edgee-components-runtime.workspace = true http.workspace = true http-body-util.workspace = true hyper = { workspace = true, features = ["server"] } @@ -49,10 +51,9 @@ uuid = { workspace = true, features = ["v4"] } wit-deps.workspace = true zip.workspace = true -edgee-api-client.workspace = true -edgee-proxy.workspace = true -edgee-components-runtime.workspace = true -chrono.workspace = true +api-client.workspace = true +proxy.workspace = true + [features] bundled = ["openssl/vendored"] diff --git a/crates/cli/src/commands/auth/login.rs b/crates/cli/src/commands/auth/login.rs index a152d68..12bf715 100644 --- a/crates/cli/src/commands/auth/login.rs +++ b/crates/cli/src/commands/auth/login.rs @@ -1,6 +1,6 @@ use anyhow::Result; -use edgee_api_client::ResultExt; +use api_client::ResultExt; setup_command! { #[arg(short, long, id = "PROFILE", env = "EDGEE_API_PROFILE")] @@ -13,7 +13,7 @@ setup_command! { pub async fn run(opts: Options) -> Result<()> { use inquire::{Confirm, Password, PasswordDisplayMode}; - use edgee_api_client::auth::{Config, Credentials}; + use api_client::auth::{Config, Credentials}; let url = match opts.url { Some(url) => url, @@ -57,7 +57,7 @@ pub async fn run(opts: Options) -> Result<()> { url: Some(url), }; - let client = edgee_api_client::new().credentials(&creds).connect(); + let client = api_client::new().credentials(&creds).connect(); let user = client .get_me() .send() diff --git a/crates/cli/src/commands/auth/whoami.rs b/crates/cli/src/commands/auth/whoami.rs index ad0b6f3..3c5df49 100644 --- a/crates/cli/src/commands/auth/whoami.rs +++ b/crates/cli/src/commands/auth/whoami.rs @@ -1,4 +1,4 @@ -use edgee_api_client::ResultExt; +use api_client::ResultExt; setup_command! { #[arg(short, long, id = "PROFILE", env = "EDGEE_API_PROFILE")] @@ -6,7 +6,7 @@ setup_command! { } pub async fn run(opts: Options) -> anyhow::Result<()> { - use edgee_api_client::auth::Config; + use api_client::auth::Config; let config = Config::load()?; @@ -26,7 +26,7 @@ pub async fn run(opts: Options) -> anyhow::Result<()> { creds.check_api_token()?; - let client = edgee_api_client::new().credentials(&creds).connect(); + let client = api_client::new().credentials(&creds).connect(); let user = client .get_me() .send() diff --git a/crates/cli/src/commands/components/check.rs b/crates/cli/src/commands/components/check.rs index 7a55cd3..4ffc397 100644 --- a/crates/cli/src/commands/components/check.rs +++ b/crates/cli/src/commands/components/check.rs @@ -132,10 +132,10 @@ pub async fn run(_opts: Options) -> anyhow::Result<()> { ( component_path.to_string(), match manifest.component.category { - edgee_api_client::types::ComponentCreateInputCategory::DataCollection => { + api_client::types::ComponentCreateInputCategory::DataCollection => { ComponentType::DataCollection } - edgee_api_client::types::ComponentCreateInputCategory::EdgeFunction => { + api_client::types::ComponentCreateInputCategory::EdgeFunction => { ComponentType::EdgeFunction } _ => anyhow::bail!( diff --git a/crates/cli/src/commands/components/init.rs b/crates/cli/src/commands/components/init.rs index eed9343..7696af6 100644 --- a/crates/cli/src/commands/components/init.rs +++ b/crates/cli/src/commands/components/init.rs @@ -38,10 +38,10 @@ pub async fn run(_opts: Options) -> anyhow::Result<()> { }; let subcategories = match component_category.value { - edgee_api_client::types::ComponentCreateInputCategory::DataCollection => { + api_client::types::ComponentCreateInputCategory::DataCollection => { DATA_COLLECTION_SUBCATEGORY_OPTIONS.to_vec() } - edgee_api_client::types::ComponentCreateInputCategory::EdgeFunction => { + api_client::types::ComponentCreateInputCategory::EdgeFunction => { EDGE_FUNCTION_SUBCATEGORY_OPTIONS.to_vec() } _ => { @@ -106,7 +106,7 @@ pub async fn run(_opts: Options) -> anyhow::Result<()> { options: None, required: true, title: "ExampleConfigField".to_string(), - type_: edgee_api_client::types::ConfigurationFieldType::String, + type_: api_client::types::ConfigurationFieldType::String, secret: Some(false), }, }, diff --git a/crates/cli/src/commands/components/push.rs b/crates/cli/src/commands/components/push.rs index 02a45c0..b5c0cf4 100644 --- a/crates/cli/src/commands/components/push.rs +++ b/crates/cli/src/commands/components/push.rs @@ -2,10 +2,10 @@ use std::io::Read; use anyhow::Result; use colored::Colorize; -use edgee_api_client::{auth::Config, ErrorExt, ResultExt}; +use api_client::{auth::Config, ErrorExt, ResultExt}; use inquire::{Confirm, Editor, Select}; -use edgee_api_client::{types as api_types, Client}; +use api_client::{types as api_types, Client}; use crate::components::manifest::Manifest; @@ -114,7 +114,7 @@ pub async fn run(opts: Options) -> Result<()> { anyhow::bail!("Component name must be at least 3 characters"); } - let client = edgee_api_client::new().credentials(&creds).connect(); + let client = api_client::new().credentials(&creds).connect(); let organization = match opts.organization { Some(ref organization) => client @@ -144,9 +144,9 @@ pub async fn run(opts: Options) -> Result<()> { .send() .await { - Err(edgee_api_client::Error::ErrorResponse(err)) + Err(api_client::Error::ErrorResponse(err)) if err.error.type_ - == edgee_api_client::types::ErrorResponseErrorType::NotFoundError => + == api_client::types::ErrorResponseErrorType::NotFoundError => { tracing::info!( "Component {} does not exist yet!", @@ -350,7 +350,7 @@ async fn update_component( ) -> Result<()> { use inquire::Confirm; - use edgee_api_client::ResultExt; + use api_client::ResultExt; let final_icon_url = if let Some(manifest_icon_path) = &manifest.component.icon_path { let manifest_avatar_hash = { @@ -457,7 +457,7 @@ async fn push_version( component_slug: &str, changelog: Option, ) -> Result<()> { - use edgee_api_client::ResultExt; + use api_client::ResultExt; tracing::info!("Uploading WASM file..."); let asset_url = client diff --git a/crates/cli/src/commands/components/serialize.rs b/crates/cli/src/commands/components/serialize.rs index 9253bef..70049af 100644 --- a/crates/cli/src/commands/components/serialize.rs +++ b/crates/cli/src/commands/components/serialize.rs @@ -46,8 +46,8 @@ fn extract_from_manifest() -> anyhow::Result<(String, String, String)> { .context("Output path should be a valid UTF-8 string")?; let component_type = match manifest.component.category { - edgee_api_client::types::ComponentCreateInputCategory::DataCollection => "data-collection", - edgee_api_client::types::ComponentCreateInputCategory::EdgeFunction => "edge-function", + api_client::types::ComponentCreateInputCategory::DataCollection => "data-collection", + api_client::types::ComponentCreateInputCategory::EdgeFunction => "edge-function", _ => anyhow::bail!( "Invalid component type: {}, expected 'data-collection' or 'edge-function'", manifest.component.category diff --git a/crates/cli/src/commands/components/test/mod.rs b/crates/cli/src/commands/components/test/mod.rs index ccd5fde..bae6e9b 100644 --- a/crates/cli/src/commands/components/test/mod.rs +++ b/crates/cli/src/commands/components/test/mod.rs @@ -72,7 +72,7 @@ pub async fn run(opts: Options) -> anyhow::Result<()> { crate::commands::components::build::do_build(&manifest, root_dir).await?; match manifest.component.category { - edgee_api_client::types::ComponentCreateInputCategory::DataCollection => { + api_client::types::ComponentCreateInputCategory::DataCollection => { match manifest.component.wit_version.as_str() { "1.0.0" => { test_data_collection_v1_0_0::test_data_collection_component_1_0_0( @@ -94,7 +94,7 @@ pub async fn run(opts: Options) -> anyhow::Result<()> { } } } - edgee_api_client::types::ComponentCreateInputCategory::EdgeFunction => { + api_client::types::ComponentCreateInputCategory::EdgeFunction => { match manifest.component.wit_version.as_str() { "1.0.0" => { test_edge_function_v1_0_0::test_edge_function_component(opts, &manifest) diff --git a/crates/cli/src/commands/proxy.rs b/crates/cli/src/commands/proxy.rs index f93e9a1..bf1a755 100644 --- a/crates/cli/src/commands/proxy.rs +++ b/crates/cli/src/commands/proxy.rs @@ -27,10 +27,10 @@ pub async fn run(opts: Options) -> anyhow::Result<()> { logger::init(opts.log_format, log_filter); - edgee_proxy::init()?; + proxy::init()?; tokio::select! { - Err(err) = edgee_proxy::monitor::start() => Err(err), - Err(err) = edgee_proxy::start() => Err(err), + Err(err) = proxy::monitor::start() => Err(err), + Err(err) = proxy::start() => Err(err), } } diff --git a/crates/cli/src/commands/serve.rs b/crates/cli/src/commands/serve.rs index f93e9a1..bf1a755 100644 --- a/crates/cli/src/commands/serve.rs +++ b/crates/cli/src/commands/serve.rs @@ -27,10 +27,10 @@ pub async fn run(opts: Options) -> anyhow::Result<()> { logger::init(opts.log_format, log_filter); - edgee_proxy::init()?; + proxy::init()?; tokio::select! { - Err(err) = edgee_proxy::monitor::start() => Err(err), - Err(err) = edgee_proxy::start() => Err(err), + Err(err) = proxy::monitor::start() => Err(err), + Err(err) = proxy::start() => Err(err), } } diff --git a/crates/cli/src/components/boilerplate.rs b/crates/cli/src/components/boilerplate.rs index 9f5f998..987d09c 100644 --- a/crates/cli/src/components/boilerplate.rs +++ b/crates/cli/src/components/boilerplate.rs @@ -1,6 +1,6 @@ use std::fmt; -use edgee_api_client::types as api_types; +use api_client::types as api_types; #[derive(Clone)] pub struct LanguageConfig { diff --git a/crates/cli/src/components/manifest.rs b/crates/cli/src/components/manifest.rs index 4816606..fb1ad17 100644 --- a/crates/cli/src/components/manifest.rs +++ b/crates/cli/src/components/manifest.rs @@ -4,7 +4,7 @@ use anyhow::{Context, Result}; use indexmap::IndexMap; use serde::{Deserialize, Serialize}; -use edgee_api_client::types as api_types; +use api_client::types as api_types; #[derive(Debug, Deserialize, Serialize)] #[serde(rename_all = "kebab-case")] diff --git a/crates/cli/src/config.rs b/crates/cli/src/config.rs index 5c15fe5..b413635 100644 --- a/crates/cli/src/config.rs +++ b/crates/cli/src/config.rs @@ -1,6 +1,6 @@ use std::path::Path; -use edgee_proxy::config::StaticConfiguration; +use proxy::config::StaticConfiguration; fn read_config(path: Option<&Path>) -> Result { let toml_path = Path::new("edgee.toml"); @@ -55,7 +55,7 @@ pub fn init(config_path: Option<&Path>, trace_component: Option<&str>) { config.log.trace_component = Some(component.to_string()); } - edgee_proxy::config::set(config); + proxy::config::set(config); } #[cfg(test)] mod tests { @@ -243,7 +243,7 @@ mod tests { let toml_path = create_temp_file(&dir, "edgee.toml", toml_content); init(Some(&toml_path), Some("component")); - let config = edgee_proxy::config::get(); + let config = proxy::config::get(); assert_eq!(config.log.level.to_string(), "info"); assert_eq!(config.log.trace_component, Some("component".to_string())); } diff --git a/crates/cli/src/logger.rs b/crates/cli/src/logger.rs index 68e7cc3..4d5b1fb 100644 --- a/crates/cli/src/logger.rs +++ b/crates/cli/src/logger.rs @@ -26,7 +26,7 @@ pub fn init(log_format: LogFormat, log_filter: Option) { use tracing_subscriber::prelude::*; use tracing_subscriber::{fmt, EnvFilter}; - let config = &edgee_proxy::config::get().log; + let config = &proxy::config::get().log; let with_target = log_filter.is_none(); let fmt_layer = fmt::layer().with_target(with_target); diff --git a/crates/cli/src/telemetry.rs b/crates/cli/src/telemetry.rs index bb2ed6f..4d25463 100644 --- a/crates/cli/src/telemetry.rs +++ b/crates/cli/src/telemetry.rs @@ -7,7 +7,7 @@ use anyhow::Result; use serde::{Deserialize, Serialize}; use tokio::sync::Mutex; -use edgee_api_client::{data_collection as dc, types::UserWithRoles}; +use api_client::{data_collection as dc, types::UserWithRoles}; use event_builder::{IsComplete, IsUnset, SetProperties, State}; static STATE_DIR: LazyLock> = LazyLock::new(|| { @@ -57,11 +57,11 @@ impl Data { } async fn check_user(&mut self) -> Result<()> { - use edgee_api_client::auth::Config; + use api_client::auth::Config; if !self.is_logged_in { if let Some(creds) = Config::load().ok().and_then(|config| config.get(&None)) { - let client = edgee_api_client::new().credentials(&creds).connect(); + let client = api_client::new().credentials(&creds).connect(); let user = client.get_me().send().await?; self.is_logged_in = true; diff --git a/crates/proxy/Cargo.toml b/crates/proxy/Cargo.toml index e4298b5..d02933f 100644 --- a/crates/proxy/Cargo.toml +++ b/crates/proxy/Cargo.toml @@ -1,5 +1,6 @@ [package] -name = "edgee-proxy" +name = "proxy" +publish = false description = "Edgee proxy" version.workspace = true authors.workspace = true @@ -19,6 +20,8 @@ bytes.workspace = true cbc = { workspace = true, features = ["std"] } chrono = { workspace = true, features = ["serde"] } cookie.workspace = true +edgee-dc-sdk.workspace = true +edgee-components-runtime.workspace = true futures.workspace = true hex.workspace = true html-escape.workspace = true @@ -48,9 +51,6 @@ tracing.workspace = true url.workspace = true uuid = { workspace = true, features = ["v4", "serde"] } -edgee-dc-sdk.workspace = true -edgee-components-runtime.workspace = true - [dev-dependencies] cargo-llvm-cov.workspace = true pretty_assertions.workspace = true diff --git a/release.toml b/release.toml new file mode 100644 index 0000000..9a6ab66 --- /dev/null +++ b/release.toml @@ -0,0 +1,11 @@ +pre-release-commit-message = "Release {{version}}" +dev-version = false +tag-message = "Release {{version}}" +tag-name = "{{version}}" +pre-release-replacements = [ + { file = "CHANGELOG.md", search = "Unreleased", replace = "{{version}}" }, + { file = "CHANGELOG.md", search = "\\.\\.\\.HEAD", replace = "...{{tag_name}}" }, + { file = "CHANGELOG.md", search = "ReleaseDate", replace = "{{date}}" }, + { file = "CHANGELOG.md", search = "", replace = "\n## [Unreleased] - ReleaseDate" }, + { file = "CHANGELOG.md", search = "", replace = "\n[Unreleased]: https://github.com/edgee-cloud/$REPO_NAME/compare/{{tag_name}}...HEAD" }, +]