mod runner;
use crate::{
runner::{Runnable, Runner},
writer::Writer,
};
use runner::InitRunner;
use std::path::PathBuf;
#[derive(clap::Args, Clone)]
pub(crate) struct InitCommand {
#[arg()]
pub(crate) name: String,
#[arg(short, long, action = clap::ArgAction::SetTrue, required = false)]
pub(crate) cron: bool,
#[arg(short, long, action = clap::ArgAction::SetTrue, required = false)]
pub(crate) endpoint: bool,
#[arg(short, long, action = clap::ArgAction::SetTrue, required = false)]
pub(crate) worker: bool,
#[arg(short, long)]
pub(crate) no_git: bool,
}
impl Runnable for InitCommand {
fn runner(&self, writer: &Writer) -> impl Runner {
InitRunner {
command: self.clone(),
dir: PathBuf::default(),
writer,
}
}
}