Skip to content

Commit 48ae2e0

Browse files
authored
feat(cli/components): multiple QoL improvements (#273)
1 parent a128255 commit 48ae2e0

File tree

9 files changed

+318
-272
lines changed

9 files changed

+318
-272
lines changed

.editorconfig

-23
This file was deleted.

.editorconfig

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/home/kokakiwi/projects/edgee/.editorconfig

Cargo.lock

+24-21
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ http-body-util = "0.1"
3737
hyper = "1.5.1"
3838
hyper-rustls = "0.27.2"
3939
hyper-util = "0.1.5"
40+
indexmap = "2.8.0"
4041
inquire = "0.7.5"
4142
ipnetwork = "0.21.0"
4243
json_comments = "0.2.2"

crates/cli/Cargo.toml

+3-1
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,13 @@ edition.workspace = true
1212

1313
[dependencies]
1414
anyhow.workspace = true
15+
bon.workspace = true
1516
clap = { workspace = true, features = ["derive", "env"] }
1617
clap_complete.workspace = true
1718
colored.workspace = true
1819
colored_json.workspace = true
1920
http.workspace = true
21+
indexmap.workspace = true
2022
inquire = { workspace = true, features = ["editor"] }
2123
miette = { workspace = true, features = ["fancy"] }
2224
open.workspace = true
@@ -30,7 +32,7 @@ sha2.workspace = true
3032
slug.workspace = true
3133
tracing.workspace = true
3234
tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
33-
toml.workspace = true
35+
toml = { workspace = true, features = ["preserve_order"] }
3436
tracing-subscriber = { workspace = true, features = ["env-filter", "json"] }
3537
unicase.workspace = true
3638
url = { workspace = true, features = ["serde"] }

crates/cli/src/commands/components/init.rs

+7-12
Original file line numberDiff line numberDiff line change
@@ -58,18 +58,13 @@ pub async fn run(_opts: Options) -> anyhow::Result<()> {
5858
description: Some("Description of\nthe component".to_string()),
5959
documentation: Some(Url::parse("https://www.edgee.cloud/docs/introduction")?),
6060
repository: Some(Url::parse("https://www.github.com/edgee-cloud/edgee")?),
61-
settings: {
62-
let mut fields = std::collections::HashMap::new();
63-
fields.insert(
64-
"example".to_string(),
65-
Setting {
66-
description: Some("Here is a string".to_string()),
67-
required: true,
68-
title: "ExampleConfigField".to_string(),
69-
type_: edgee_api_client::types::ConfigurationFieldType::String,
70-
},
71-
);
72-
fields
61+
settings: indexmap::indexmap! {
62+
"example".to_string() => Setting {
63+
description: Some("Here is a string".to_string()),
64+
required: true,
65+
title: "ExampleConfigField".to_string(),
66+
type_: edgee_api_client::types::ConfigurationFieldType::String,
67+
},
7368
},
7469
build: Build {
7570
command: component_language.default_build_command.to_string(),

0 commit comments

Comments
 (0)