use std::path::Path;
use crate::repos::{Boilerplate, Repository};
use crate::Result;
#[cfg(feature = "embedded")]
#[path = "source/embedded.rs"]
mod imp;
#[cfg(not(feature = "embedded"))]
#[path = "source/local.rs"]
mod imp;
pub(crate) fn list<'a, P: AsRef<Path>>(repo: &'a Repository, base_path: P) -> Vec<Boilerplate<'a>> {
imp::list(repo, base_path.as_ref())
}
pub(crate) fn read<P: AsRef<Path>>(boilerplate: &Boilerplate, base_path: P) -> Result<String> {
imp::read(boilerplate, base_path.as_ref())
}
pub(crate) fn hash<P: AsRef<Path>>(boilerplate: &Boilerplate, base_path: P) -> Result<Vec<u8>> {
imp::hash(boilerplate, base_path.as_ref())
}
pub(crate) fn prepare<P: AsRef<Path>>(repo: &Repository, base_path: P) -> Result<()> {
imp::prepare(repo, base_path.as_ref())
}
#[cfg(feature = "embedded")]
pub(crate) fn repositories() -> Vec<Repository> {
imp::repositories()
}