use std::{collections::BTreeSet, path::Path, sync::Arc};
use crate::eval::EnvVarMode;
#[derive(Clone, Debug)]
#[non_exhaustive]
pub struct TgContext {
pub workspace_root: Arc<Path>,
pub environment: Option<Arc<str>>,
pub env_var_mode: EnvVarMode,
pub allowed_env: Arc<BTreeSet<Arc<str>>>,
pub max_include_depth: u32,
}
impl TgContext {
#[must_use]
pub fn new(workspace_root: Arc<Path>) -> Self {
Self {
workspace_root,
environment: None,
env_var_mode: EnvVarMode::default(),
allowed_env: Arc::new(BTreeSet::new()),
max_include_depth: 32,
}
}
}