Skip to content

Commit

Permalink
fix: Fix help generation
Browse files Browse the repository at this point in the history
  • Loading branch information
fmoura committed Sep 14, 2023
1 parent 5e077a9 commit 32e306f
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 10 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Standardized log libraries and configuration

### Fixed

- Fixed help generation for all services

### Removed

- Removed configurable inspect-server path prefix
Expand Down
4 changes: 3 additions & 1 deletion offchain/advance-runner/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ pub enum ConfigError {
SnapshotConfigError { source: SnapshotConfigError },
}

#[derive(Parser, Debug)]
#[derive(Clone, Parser)]
#[command(name = "advance_runner_config")]
#[command(about = "Configuration for rollups advance-runner")]
struct CLIConfig {
#[command(flatten)]
sm_cli_config: ServerManagerCLIConfig,
Expand Down
4 changes: 2 additions & 2 deletions offchain/advance-runner/src/server_manager/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ impl ServerManagerConfig {
}
}

#[derive(Parser, Debug)]
#[command(name = "server-manager")]
#[derive(Clone, Parser, Debug)]
#[command(name = "server_manager_config")]
pub struct ServerManagerCLIConfig {
/// Server-manager gRPC endpoint
#[arg(long, env, default_value = "http://127.0.0.1:5001")]
Expand Down
2 changes: 1 addition & 1 deletion offchain/advance-runner/src/snapshot/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ pub enum SnapshotConfigError {
NoProviderEndpointError {},
}

#[derive(Parser, Debug)]
#[derive(Clone, Parser, Debug)]
#[command(name = "snapshot")]
pub struct SnapshotCLIConfig {
/// If set to false, disables snapshots. Enabled by default
Expand Down
2 changes: 1 addition & 1 deletion offchain/authority-claimer/src/config/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ use crate::config::{
// ------------------------------------------------------------------------------------------------

#[derive(Clone, Parser)]
#[command(name = "rd_config")]
#[command(name = "authority_claimer_config")]
#[command(about = "Configuration for rollups authority claimer")]
pub(crate) struct AuthorityClaimerCLI {
#[command(flatten)]
Expand Down
2 changes: 1 addition & 1 deletion offchain/data/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ impl RepositoryConfig {
}
}

#[derive(Parser)]
#[derive(Clone, Parser)]
pub struct RepositoryCLIConfig {
#[arg(long, env, default_value = "postgres")]
postgres_user: String,
Expand Down
4 changes: 3 additions & 1 deletion offchain/graphql-server/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ pub struct GraphQLConfig {
pub healthcheck_port: u16,
}

#[derive(Parser)]
#[derive(Clone, Parser)]
#[command(name = "graphql_server_config")]
#[command(about = "Configuration for rollups graphql-server")]
pub struct CLIConfig {
#[command(flatten)]
repository_config: RepositoryCLIConfig,
Expand Down
2 changes: 2 additions & 0 deletions offchain/host-runner/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ pub struct Config {
}

#[derive(Parser, Clone, Debug)]
#[command(name = "host_runner_config")]
#[command(about = "Configuration for rollups host-runner")]
pub struct CLIConfig {
/// Logs Config
#[command(flatten)]
Expand Down
4 changes: 3 additions & 1 deletion offchain/indexer/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ pub struct IndexerConfig {
pub healthcheck_port: u16,
}

#[derive(Parser)]
#[derive(Clone, Parser)]
#[command(name = "indexer_config")]
#[command(about = "Configuration for rollups indexer")]
pub struct CLIConfig {
#[command(flatten)]
repository_config: RepositoryCLIConfig,
Expand Down
4 changes: 3 additions & 1 deletion offchain/inspect-server/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ pub struct InspectServerConfig {
pub healthcheck_port: u16,
}

#[derive(Parser)]
#[derive(Clone, Parser)]
#[command(name = "inspect_server_config")]
#[command(about = "Configuration for rollups inspect-server")]
pub struct CLIConfig {
#[command(flatten)]
pub log_config: LogEnvCliConfig,
Expand Down
2 changes: 1 addition & 1 deletion offchain/rollups-events/src/rollups_stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pub struct DAppMetadata {
}

/// CLI configuration used to generate the DApp metadata
#[derive(Debug, Parser)]
#[derive(Clone, Debug, Parser)]
pub struct DAppMetadataCLIConfig {
/// Chain identifier
#[arg(long, env, default_value = "0")]
Expand Down

0 comments on commit 32e306f

Please sign in to comment.