From 8ae4d9653ad6dc6af9ce1ea338a88fe50b6bcf75 Mon Sep 17 00:00:00 2001 From: Frank Bell Date: Tue, 2 Jul 2024 10:32:51 +0100 Subject: [PATCH 1/2] refactor: improve ux Reuse cli functionality to standardise ux. --- crates/pop-cli/src/commands/new/parachain.rs | 23 ++++++++------------ 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/crates/pop-cli/src/commands/new/parachain.rs b/crates/pop-cli/src/commands/new/parachain.rs index 9d3d4694..9d223992 100644 --- a/crates/pop-cli/src/commands/new/parachain.rs +++ b/crates/pop-cli/src/commands/new/parachain.rs @@ -1,22 +1,22 @@ // SPDX-License-Identifier: GPL-3.0 -use crate::style::{style, Theme}; +use crate::cli::{traits::Cli as _, Cli}; +use crate::style::style; use anyhow::Result; use clap::{ builder::{PossibleValue, PossibleValuesParser, TypedValueParser}, Args, }; -use std::{fs, path::Path, str::FromStr}; - use cliclack::{ - clear_screen, confirm, input, intro, + clear_screen, confirm, input, log::{self, success, warning}, - outro, outro_cancel, set_theme, + outro, outro_cancel, }; use pop_common::{Git, GitHub, Release}; use pop_parachains::{ instantiate_template_dir, is_initial_endowment_valid, Config, Provider, Template, }; +use std::{fs, path::Path, str::FromStr}; use strum::VariantArray; const DEFAULT_INITIAL_ENDOWMENT: &str = "1u64 << 60"; @@ -60,9 +60,6 @@ pub struct NewParachainCommand { impl NewParachainCommand { /// Executes the command. pub(crate) async fn execute(self) -> Result