Skip to content

Commit

Permalink
docs: update commands docs and messages (#226)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcasalboni authored Feb 17, 2025
1 parent c21983a commit 59ef4b8
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 13 deletions.
4 changes: 2 additions & 2 deletions crates/cli/src/commands/auth/login.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pub async fn run(_opts: Options) -> Result<()> {
let mut creds = Credentials::load()?;

let confirm_overwrite =
Confirm::new("An API token is already present, do you want to overwrite it?")
Confirm::new("An API token is already configured, do you want to overwrite it?")
.with_default(false);
if creds.api_token.is_some() && !confirm_overwrite.prompt()? {
return Ok(());
Expand All @@ -33,7 +33,7 @@ pub async fn run(_opts: Options) -> Result<()> {
.get_me()
.send()
.await
.api_context("Could not get user infos")?
.api_context("Could not get user info")?
.into_inner();
println!("Logged as {} ({})", user.name, user.email);

Expand Down
1 change: 1 addition & 0 deletions crates/cli/src/commands/components/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
pub struct Options {}

pub async fn run(_opts: Options) -> anyhow::Result<()> {
tracing::info!("This command is coming soon!");
Ok(())
}
23 changes: 14 additions & 9 deletions crates/cli/src/commands/components/mod.rs
Original file line number Diff line number Diff line change
@@ -1,20 +1,25 @@
setup_commands! {
/// Init a new component manifest in the current directory
/// Compile the component in the current directory into Wasm
Build(build),

/// Check if the local Wasm file file is valid
Check(check),

/// Initialize a new manifest file in the current directory
Init(init),

/// List components you've previously pulled (coming soon)
List(list),

/// Create component in a new directory with sample code
New(new),

/// Compile the component in the current directory into WASM
Build(build),

/// Pull a component from the Edgee Component Registry
/// Pull a component from the Edgee Component Registry (coming soon)
Pull(pull),

/// Push a component to the Edgee Component Registry
Push(push),
/// List components you've previously pulled
List(list),
/// Check if the local WASM component file is valid
Check(check),

/// Run the component in the current folder with sample events
Test(test)
}
Expand Down
1 change: 1 addition & 0 deletions crates/cli/src/commands/components/pull.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
pub struct Options {}

pub async fn run(_opts: Options) -> anyhow::Result<()> {
tracing::info!("This command is coming soon!");
Ok(())
}
4 changes: 2 additions & 2 deletions crates/cli/src/commands/components/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ pub struct Options {
#[arg(long="settings", value_parser = parse_settings)]
pub settings: Option<HashMap<String, String>>,

/// The event type you want to test (valid values: page, track, or user)
/// The event type you want to test
#[arg(long = "event-type", value_parser = ["page", "track", "user"])]
pub event_type: Option<String>,

/// Whether to log the full input event in stdout or not (false by default)
/// Whether to log the full input event or not (false by default)
#[arg(long = "display-input", default_value = "false")]
pub display_input: bool,
}
Expand Down

0 comments on commit 59ef4b8

Please sign in to comment.