//! New test project builder that supports defining projects from code. use std::{ fs, io, mem, ops::{Bound, RangeBounds}, process::Command, sync::atomic::{AtomicBool, Ordering}, thread::{self, JoinHandle}, }; use base64::{engine::general_purpose::STANDARD as BASE_64, Engine as _}; use regex::{Match, Regex}; use toml::Value as Toml; use bard::{ app::{App, InterruptFlag}, parser::DiagKind, prelude::*, project::Project, render::template::DefaultTemaplate, util::ExitStatusExt as _, watch::{Watch, WatchControl}, }; pub use indoc::{formatdoc, indoc}; pub use toml::toml; static INTERRUPT: AtomicBool = AtomicBool::new(false); pub fn interrupt() { INTERRUPT.store(true, Ordering::Relaxed); } pub struct TestProject { path: PathBuf, postprocess: bool, outputs: Vec, modify_settings: Option>, songs: Vec<(PathBuf, String)>, templates: Vec