refactor: renamed src/utils/text.rs to cli_styles

This commit is contained in:
alex-xr555
2026-09-24 00:20:43 +03:00
parent 552f6c8e4f
commit 2f4cde9177
16 changed files with 15 additions and 15 deletions

View File

@@ -18,8 +18,8 @@
use crate::prelude::*;
use crate::core::{build_config::Config, deps::register};
use crate::utils::cli_styles::{BOLD_CYAN, BOLD_GREEN, colored, printc};
use crate::utils::fs::find_project_root;
use crate::utils::text::{BOLD_CYAN, BOLD_GREEN, colored, printc};
use toml::{Value, map::Map};
/// Parsed arguments for the `dcr add` command.

View File

@@ -28,8 +28,8 @@ use crate::utils::build::{
get_config_opt, get_config_str, get_language_with_profile_or_default, get_string_with_profile,
normalize_kind, resolve_artifact_target_dir, resolve_compiler,
};
use crate::utils::cli_styles::{BOLD_CYAN, BOLD_GREEN, BOLD_YELLOW, colored, printc};
use crate::utils::fs::{canonicalize_path, find_project_root};
use crate::utils::text::{BOLD_CYAN, BOLD_GREEN, BOLD_YELLOW, colored, printc};
use std::io::IsTerminal;
use std::path::Path;
use std::sync::{Arc, atomic::AtomicBool};

View File

@@ -20,8 +20,8 @@ use crate::prelude::*;
use crate::core::build_config::Config;
use crate::core::workspace::parse_workspace;
use crate::utils::build::{default_profile_flags, default_target_triple, parse_version_info};
use crate::utils::cli_styles::{BOLD_CYAN, BOLD_GREEN, colored, printc};
use crate::utils::fs::{check_dir, find_project_root, with_dir};
use crate::utils::text::{BOLD_CYAN, BOLD_GREEN, colored, printc};
use glob::glob;
use std::{fs, path::Path};

View File

@@ -17,7 +17,7 @@
use crate::prelude::*;
use crate::utils::text::{BOLD_CYAN, BOLD_GREEN, printc};
use crate::utils::cli_styles::{BOLD_CYAN, BOLD_GREEN, printc};
use serde::Deserialize;
use std::fs;
use std::io::Read;

View File

@@ -17,7 +17,7 @@
use crate::prelude::*;
use crate::utils::text::{BOLD_CYAN, BOLD_GREEN, colored, printc};
use crate::utils::cli_styles::{BOLD_CYAN, BOLD_GREEN, colored, printc};
use glob::glob;
use std::process::Command;

View File

@@ -31,7 +31,7 @@ use crate::utils::build::{
use crate::utils::fs::{
absolute_join, atomic_write, canonicalize_path, ensure_dcr_dir, find_project_root,
};
use crate::utils::text::{BOLD_CYAN, BOLD_GREEN, printc};
use crate::utils::cli_styles::{BOLD_CYAN, BOLD_GREEN, printc};
use std::path::{Path, PathBuf};
use std::time::{SystemTime, UNIX_EPOCH};

View File

@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
use crate::utils::text::{BOLD_CYAN, BOLD_GREEN, printc};
use crate::utils::cli_styles::{BOLD_CYAN, BOLD_GREEN, printc};
/// Displays the help information for the DCR CLI tool.
///

View File

@@ -21,7 +21,7 @@ use crate::config::FILE_MAIN_C;
use crate::core::build_config::{Config, validate_package_name};
use crate::core::vcs::VcsKind;
use crate::utils::fs::check_dir;
use crate::utils::text::{BOLD_CYAN, BOLD_GREEN, colored, printc};
use crate::utils::cli_styles::{BOLD_CYAN, BOLD_GREEN, colored, printc};
use std::{fs, io::Write};
/// Initializes the current working directory as a new DCR project.

View File

@@ -21,7 +21,7 @@ use crate::core::build::common;
use crate::core::build_config::Config;
use crate::utils::build::{get_bool_with_profile, get_list_with_profile};
use crate::utils::fs::find_project_root;
use crate::utils::text::{BOLD_CYAN, BOLD_GREEN, BOLD_YELLOW, colored, printc};
use crate::utils::cli_styles::{BOLD_CYAN, BOLD_GREEN, BOLD_YELLOW, colored, printc};
use std::path::{Path, PathBuf};
use std::process::Command;

View File

@@ -21,7 +21,7 @@ use crate::config::FILE_MAIN_C;
use crate::core::build_config::{Config, validate_package_name};
use crate::core::vcs::VcsKind;
use crate::utils::fs::check_dir;
use crate::utils::text::{BOLD_CYAN, BOLD_GREEN, colored, printc};
use crate::utils::cli_styles::{BOLD_CYAN, BOLD_GREEN, colored, printc};
use std::{fs, io::Write};
/// Executes the `dcr new` command to scaffold a new C/C++ project directory structure.

View File

@@ -23,7 +23,7 @@ use crate::core::build_config::Config;
use crate::core::runner::run_binary;
use crate::utils::build::{normalize_target_os, parse_version_info, substitute_vars};
use crate::utils::fs::{find_project_root, with_dir};
use crate::utils::text::{BOLD_CYAN, BOLD_GREEN, colored, printc};
use crate::utils::cli_styles::{BOLD_CYAN, BOLD_GREEN, colored, printc};
use std::{path::Path, process::Command};
/// Retrieves the run command from the config, preferring target-specific,

View File

@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
use crate::utils::text::{BOLD_CYAN, BOLD_GREEN, printc};
use crate::utils::cli_styles::{BOLD_CYAN, BOLD_GREEN, printc};
/// Sets up DCR registries by loading the registry manager and printing the list of registries.
pub fn setup(args: &[String]) -> i32 {

View File

@@ -25,7 +25,7 @@ use crate::utils::build::{
get_string_with_profile, resolve_compiler, resolve_pkg_config_flags,
};
use crate::utils::fs::{find_project_root, with_dir};
use crate::utils::text::{BOLD_CYAN, BOLD_GREEN, BOLD_RED, RESET, colored, printc};
use crate::utils::cli_styles::{BOLD_CYAN, BOLD_GREEN, BOLD_RED, RESET, colored, printc};
use std::fs;
use std::path::{Path, PathBuf};
use std::process::Command;

View File

@@ -18,7 +18,7 @@
use crate::prelude::*;
use crate::core::build_config::Config;
use crate::utils::text::{BOLD_CYAN, BOLD_GREEN, printc};
use crate::utils::cli_styles::{BOLD_CYAN, BOLD_GREEN, printc};
use std::collections::HashSet;
use std::path::{Path, PathBuf};
use toml::Value;