Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(cli/components): multiple QoL improvements #273

Merged
merged 8 commits into from
Mar 12, 2025
23 changes: 0 additions & 23 deletions .editorconfig

This file was deleted.

1 change: 1 addition & 0 deletions .editorconfig
45 changes: 24 additions & 21 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ http-body-util = "0.1"
hyper = "1.5.1"
hyper-rustls = "0.27.2"
hyper-util = "0.1.5"
indexmap = "2.8.0"
inquire = "0.7.5"
ipnetwork = "0.21.0"
json_comments = "0.2.2"
Expand Down
4 changes: 3 additions & 1 deletion crates/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ edition.workspace = true

[dependencies]
anyhow.workspace = true
bon.workspace = true
clap = { workspace = true, features = ["derive", "env"] }
clap_complete.workspace = true
colored.workspace = true
colored_json.workspace = true
http.workspace = true
indexmap.workspace = true
inquire = { workspace = true, features = ["editor"] }
miette = { workspace = true, features = ["fancy"] }
open.workspace = true
Expand All @@ -30,7 +32,7 @@ sha2.workspace = true
slug.workspace = true
tracing.workspace = true
tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
toml.workspace = true
toml = { workspace = true, features = ["preserve_order"] }
tracing-subscriber = { workspace = true, features = ["env-filter", "json"] }
unicase.workspace = true
url = { workspace = true, features = ["serde"] }
Expand Down
19 changes: 7 additions & 12 deletions crates/cli/src/commands/components/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,13 @@ pub async fn run(_opts: Options) -> anyhow::Result<()> {
description: Some("Description of\nthe component".to_string()),
documentation: Some(Url::parse("https://www.edgee.cloud/docs/introduction")?),
repository: Some(Url::parse("https://www.github.com/edgee-cloud/edgee")?),
settings: {
let mut fields = std::collections::HashMap::new();
fields.insert(
"example".to_string(),
Setting {
description: Some("Here is a string".to_string()),
required: true,
title: "ExampleConfigField".to_string(),
type_: edgee_api_client::types::ConfigurationFieldType::String,
},
);
fields
settings: indexmap::indexmap! {
"example".to_string() => Setting {
description: Some("Here is a string".to_string()),
required: true,
title: "ExampleConfigField".to_string(),
type_: edgee_api_client::types::ConfigurationFieldType::String,
},
},
build: Build {
command: component_language.default_build_command.to_string(),
Expand Down
Loading