From 5a4ad5f1ca9ae89f6380a2f12e17e28fc86a31f2 Mon Sep 17 00:00:00 2001 From: Stephen Barlow Date: Fri, 20 Nov 2020 14:01:31 -0800 Subject: [PATCH 1/3] Quick pass on Rover help texts --- src/cli.rs | 6 +++--- src/command/config/mod.rs | 6 +++--- src/command/config/profile.rs | 6 +++--- src/command/partial/delete.rs | 8 ++++---- src/command/partial/mod.rs | 4 ++-- src/command/partial/push.rs | 10 +++++----- src/command/schema/fetch.rs | 6 +++--- src/command/schema/mod.rs | 4 ++-- src/command/schema/push.rs | 8 ++++---- 9 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index 8ed7c35eb..c56e188cb 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -19,13 +19,13 @@ pub struct Rover { #[derive(Debug, Serialize, StructOpt)] pub enum Command { - /// ⚙️ Manage configuration + /// Rover configuration Config(command::Config), - /// 🧱 Work with a non-federated graph + /// Non-federated schema/graph commands Schema(command::Schema), - /// 🗺️ Work with a federated graph and implementing services + /// Federated schema/graph commands Partial(command::Partial), #[structopt(setting(structopt::clap::AppSettings::Hidden))] diff --git a/src/command/config/mod.rs b/src/command/config/mod.rs index 16f1cde7d..1ae322871 100644 --- a/src/command/config/mod.rs +++ b/src/command/config/mod.rs @@ -16,11 +16,11 @@ pub struct Config { #[derive(Debug, Serialize, StructOpt)] pub enum Command { - /// 🔑 Configure an account or graph API key + /// Set an Apollo Studio API key ApiKey(api_key::ApiKey), - /// 💁 Operations for listing, viewing, and deleting configuration profiles + /// Manage configuration profiles Profile(profile::Profile), - /// 🚮 Remove all configuration + /// Clear ALL configuration Clear, } diff --git a/src/command/config/profile.rs b/src/command/config/profile.rs index 6e9d24212..5bc528cc3 100644 --- a/src/command/config/profile.rs +++ b/src/command/config/profile.rs @@ -14,13 +14,13 @@ pub struct Profile { #[derive(Debug, Serialize, StructOpt)] pub enum Command { - /// 🎅 List all of your configuration profiles + /// List all configuration profiles List, - /// 👀 See a specific profile's values + /// View a configuration profile's details Show(Show), - /// 🪓 Delete a specific profile + /// Delete a configuration profile Delete(Delete), } diff --git a/src/command/partial/delete.rs b/src/command/partial/delete.rs index 0339a31bb..328c39191 100644 --- a/src/command/partial/delete.rs +++ b/src/command/partial/delete.rs @@ -7,22 +7,22 @@ use structopt::StructOpt; #[derive(Debug, Serialize, StructOpt)] pub struct Delete { - /// Variant of the graph in Apollo Studio + /// Name of graph variant in Apollo Studio to delete a service from #[structopt(long, default_value = "current")] #[serde(skip_serializing)] variant: String, - /// ID of the graph in Apollo Studio to delete a service from + /// ID of federated graph in Apollo Studio to delete a service from #[structopt(long)] #[serde(skip_serializing)] graph_name: String, - /// Name of the configuration profile (default: "default") + /// Name of configuration profile to use #[structopt(long = "profile", default_value = "default")] #[serde(skip_serializing)] profile_name: String, - /// Name of the implementing service in the graph to delete + /// Name of service in federated graph to delete #[structopt(long)] #[serde(skip_serializing)] service_name: String, diff --git a/src/command/partial/mod.rs b/src/command/partial/mod.rs index c3fa30c50..411d4c5df 100644 --- a/src/command/partial/mod.rs +++ b/src/command/partial/mod.rs @@ -15,9 +15,9 @@ pub struct Partial { #[derive(Debug, Serialize, StructOpt)] pub enum Command { - /// 📤 Push a schema from a file + /// Push an implementing service schema from a local file Push(push::Push), - /// 🗑️ Delete an implementing service and trigger composition + /// Delete an implementing service and trigger composition Delete(delete::Delete), } diff --git a/src/command/partial/push.rs b/src/command/partial/push.rs index 3a44bc160..224d6f94e 100644 --- a/src/command/partial/push.rs +++ b/src/command/partial/push.rs @@ -9,27 +9,27 @@ use crate::command::RoverStdout; #[derive(Debug, Serialize, StructOpt)] pub struct Push { - /// Path to a .graphql SDL file + /// Path of .graphql/.gql schema file to push #[structopt(name = "SCHEMA_PATH", parse(from_os_str))] #[serde(skip_serializing)] schema_path: PathBuf, - /// Variant of the graph in Apollo Studio + /// Name of graph variant in Apollo Studio to push to #[structopt(long, default_value = "current")] #[serde(skip_serializing)] variant: String, - /// ID of the graph in Apollo Studio to push to + /// ID of federated graph in Apollo Studio to push to #[structopt(long)] #[serde(skip_serializing)] graph_name: String, - /// Name of the configuration profile (default: "default") + /// Name of configuration profile to use #[structopt(long = "profile", default_value = "default")] #[serde(skip_serializing)] profile_name: String, - /// Name of the implementing service in the graph to update with a new schema + /// Name of implementing service in federated graph to update #[structopt(long)] #[serde(skip_serializing)] service_name: String, diff --git a/src/command/schema/fetch.rs b/src/command/schema/fetch.rs index fa148db91..993636a0d 100644 --- a/src/command/schema/fetch.rs +++ b/src/command/schema/fetch.rs @@ -9,17 +9,17 @@ use crate::command::RoverStdout; #[derive(Debug, Serialize, StructOpt)] pub struct Fetch { - /// ID of the graph to fetch from Apollo Studio + /// ID of graph in Apollo Studio to fetch from #[structopt(name = "GRAPH_NAME")] #[serde(skip_serializing)] graph_name: String, - /// The variant of the graph in Apollo Studio + /// Name of graph variant in Apollo Studio to fetch from #[structopt(long, default_value = "current")] #[serde(skip_serializing)] variant: String, - /// Name of the configuration profile (default: "default") + /// Name of configuration profile to use #[structopt(long = "profile", default_value = "default")] #[serde(skip_serializing)] profile_name: String, diff --git a/src/command/schema/mod.rs b/src/command/schema/mod.rs index 983a3378f..e2be8d0ae 100644 --- a/src/command/schema/mod.rs +++ b/src/command/schema/mod.rs @@ -15,10 +15,10 @@ pub struct Schema { #[derive(Debug, Serialize, StructOpt)] pub enum Command { - /// 🐶 Get a schema given an identifier + /// Fetch a schema from Apollo Studio Fetch(fetch::Fetch), - /// 📤 Push a schema from a file + /// Push a schema to Apollo Studio from a local file Push(push::Push), } diff --git a/src/command/schema/push.rs b/src/command/schema/push.rs index 7f0afa8fb..6117a7fac 100644 --- a/src/command/schema/push.rs +++ b/src/command/schema/push.rs @@ -11,22 +11,22 @@ use crate::command::RoverStdout; #[derive(Debug, Serialize, StructOpt)] pub struct Push { - /// Path to a .graphql SDL file + /// Path of .graphql/.gql schema file to push #[structopt(name = "SCHEMA_PATH", parse(from_os_str))] #[serde(skip_serializing)] schema_path: PathBuf, - /// Variant of the graph in Apollo Studio + /// Name of graph variant in Apollo Studio to push to #[structopt(long, default_value = "current")] #[serde(skip_serializing)] variant: String, - /// ID of the graph in Apollo Studio to push to + /// ID of graph in Apollo Studio to push to #[structopt(long)] #[serde(skip_serializing)] graph_name: String, - /// Name of the configuration profile (default: "default") + /// Name of configuration profile to use #[structopt(long = "profile", default_value = "default")] #[serde(skip_serializing)] profile_name: String, From 5278173cbdadcf481227b546be64f8abd996d2c1 Mon Sep 17 00:00:00 2001 From: Stephen Barlow Date: Fri, 20 Nov 2020 15:33:38 -0800 Subject: [PATCH 2/3] Restore emoji --- src/cli.rs | 8 ++++---- src/command/config/mod.rs | 6 +++--- src/command/config/profile.rs | 6 +++--- src/command/partial/mod.rs | 4 ++-- src/command/schema/mod.rs | 4 ++-- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index c56e188cb..603a43c53 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -7,7 +7,7 @@ use crate::command::{self, RoverStdout}; use crate::stringify::from_display; #[derive(Debug, Serialize, StructOpt)] -#[structopt(name = "Rover", about = "✨🤖🐶 the new CLI for apollo")] +#[structopt(name = "Rover", about = "✨🤖🐶 the new CLI for Apollo")] pub struct Rover { #[structopt(subcommand)] pub command: Command, @@ -19,13 +19,13 @@ pub struct Rover { #[derive(Debug, Serialize, StructOpt)] pub enum Command { - /// Rover configuration + /// ⚙️ Rover configuration Config(command::Config), - /// Non-federated schema/graph commands + /// ⏺ Non-federated schema/graph commands Schema(command::Schema), - /// Federated schema/graph commands + /// *️⃣ Federated schema/graph commands Partial(command::Partial), #[structopt(setting(structopt::clap::AppSettings::Hidden))] diff --git a/src/command/config/mod.rs b/src/command/config/mod.rs index 1ae322871..4ed48363d 100644 --- a/src/command/config/mod.rs +++ b/src/command/config/mod.rs @@ -16,11 +16,11 @@ pub struct Config { #[derive(Debug, Serialize, StructOpt)] pub enum Command { - /// Set an Apollo Studio API key + /// 🔑 Set an Apollo Studio API key ApiKey(api_key::ApiKey), - /// Manage configuration profiles + /// 👤 Manage configuration profiles Profile(profile::Profile), - /// Clear ALL configuration + /// 🗑 Clear ALL configuration Clear, } diff --git a/src/command/config/profile.rs b/src/command/config/profile.rs index 5bc528cc3..8b5e54b16 100644 --- a/src/command/config/profile.rs +++ b/src/command/config/profile.rs @@ -14,13 +14,13 @@ pub struct Profile { #[derive(Debug, Serialize, StructOpt)] pub enum Command { - /// List all configuration profiles + /// 👥 List all configuration profiles List, - /// View a configuration profile's details + /// 👤 View a configuration profile's details Show(Show), - /// Delete a configuration profile + /// 🗑 Delete a configuration profile Delete(Delete), } diff --git a/src/command/partial/mod.rs b/src/command/partial/mod.rs index 411d4c5df..fb71374e9 100644 --- a/src/command/partial/mod.rs +++ b/src/command/partial/mod.rs @@ -15,9 +15,9 @@ pub struct Partial { #[derive(Debug, Serialize, StructOpt)] pub enum Command { - /// Push an implementing service schema from a local file + /// ⬆️ Push an implementing service schema from a local file Push(push::Push), - /// Delete an implementing service and trigger composition + /// 🗑 Delete an implementing service and trigger composition Delete(delete::Delete), } diff --git a/src/command/schema/mod.rs b/src/command/schema/mod.rs index e2be8d0ae..cbdc34d7f 100644 --- a/src/command/schema/mod.rs +++ b/src/command/schema/mod.rs @@ -15,10 +15,10 @@ pub struct Schema { #[derive(Debug, Serialize, StructOpt)] pub enum Command { - /// Fetch a schema from Apollo Studio + /// ⬇️ Fetch a schema from Apollo Studio Fetch(fetch::Fetch), - /// Push a schema to Apollo Studio from a local file + /// ⬆️ Push a schema to Apollo Studio from a local file Push(push::Push), } From f662f1511b6403b8b50820eb9e8b00ec5cc32aa2 Mon Sep 17 00:00:00 2001 From: Stephen Barlow Date: Fri, 20 Nov 2020 16:15:51 -0800 Subject: [PATCH 3/3] Add colors to help output --- src/cli.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cli.rs b/src/cli.rs index 603a43c53..5e6743597 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -7,7 +7,7 @@ use crate::command::{self, RoverStdout}; use crate::stringify::from_display; #[derive(Debug, Serialize, StructOpt)] -#[structopt(name = "Rover", about = "✨🤖🐶 the new CLI for Apollo")] +#[structopt(name = "Rover", about = "✨🤖🐶 the new CLI for Apollo", global_settings = &[structopt::clap::AppSettings::ColoredHelp])] pub struct Rover { #[structopt(subcommand)] pub command: Command,