From d38fddb0da9aa10d1a038a038af45e2ff9a6d2c8 Mon Sep 17 00:00:00 2001 From: Anthony Shew Date: Fri, 14 Jun 2024 20:40:04 -0600 Subject: [PATCH] Spruce up Remote Cache linking message. --- crates/turborepo-lib/src/commands/link.rs | 28 ++++++++++------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/crates/turborepo-lib/src/commands/link.rs b/crates/turborepo-lib/src/commands/link.rs index a725b136f9289..b5a95ec3c6281 100644 --- a/crates/turborepo-lib/src/commands/link.rs +++ b/crates/turborepo-lib/src/commands/link.rs @@ -20,7 +20,7 @@ use thiserror::Error; use turborepo_api_client::{CacheClient, Client}; #[cfg(not(test))] use turborepo_ui::CYAN; -use turborepo_ui::{DialoguerTheme, BOLD, GREY, UNDERLINE}; +use turborepo_ui::{DialoguerTheme, BOLD, GREY}; use turborepo_vercel_api::{CachingStatus, Space, Team}; use crate::{ @@ -89,11 +89,9 @@ pub(crate) enum SelectedSpace<'a> { Space(&'a Space), } -pub(crate) const REMOTE_CACHING_INFO: &str = " Remote Caching shares your cached Turborepo task \ - outputs and logs across - all your team’s Vercel projects. It also can share outputs - with other services that enable Remote Caching, like CI/CD systems. - This results in faster build times and deployments for your team."; +pub(crate) const REMOTE_CACHING_INFO: &str = + "Remote Caching makes your caching multiplayer,\nsharing build outputs and logs between \ + developers and CI/CD systems.\n\nBuild and deploy faster."; pub(crate) const REMOTE_CACHING_URL: &str = "https://turbo.build/repo/docs/core-concepts/remote-caching"; pub(crate) const SPACES_URL: &str = "https://vercel.com/docs/workflow-collaboration/vercel-spaces"; @@ -179,13 +177,10 @@ pub async fn link( match target { LinkTarget::RemoteCache => { println!( - ">>> Remote Caching - - {} - For more info, see {} - ", + "\n{}\n\n{}\n\nFor more information, visit: {}\n", + base.ui.rainbow(">>> Remote Caching"), REMOTE_CACHING_INFO, - base.ui.apply(UNDERLINE.apply_to(REMOTE_CACHING_URL)) + REMOTE_CACHING_URL ); if !should_link_remote_cache(base, &repo_root_with_tilde)? { @@ -281,7 +276,7 @@ pub async fn link( For more info, see {} ", - base.ui.apply(UNDERLINE.apply_to(SPACES_URL)) + SPACES_URL ); if !should_link_spaces(base, &repo_root_with_tilde)? { @@ -490,11 +485,12 @@ fn should_link_remote_cache(_: &CommandBase, _: &str) -> Result { #[cfg(not(test))] fn should_link_remote_cache(base: &CommandBase, location: &str) -> Result { let prompt = format!( - "{}{} {}", + "{}{} {}{}", base.ui.apply(BOLD.apply_to(GREY.apply_to("? "))), base.ui - .apply(BOLD.apply_to("Would you like to enable Remote Caching for")), - base.ui.apply(BOLD.apply_to(CYAN.apply_to(location))) + .apply(BOLD.apply_to("Enable Vercel Remote Cache for")), + base.ui.apply(BOLD.apply_to(CYAN.apply_to(location))), + base.ui.apply(BOLD.apply_to(" ?")) ); Confirm::new()