{-# LANGUAGE NoImplicitPrelude #-}
module Headroom.Command.Types
( Command(..)
, CommandGenOptions(..)
, CommandInitOptions(..)
, CommandRunOptions(..)
)
where
import Headroom.Configuration.Types ( GenMode
, LicenseType
, RunMode
, TemplateSource
)
import Headroom.Data.Regex ( Regex )
import Headroom.FileType.Types ( FileType )
import RIO
data Command
= Run [FilePath] [Regex] (Maybe TemplateSource) [Text] (Maybe RunMode) Bool Bool
| Gen Bool (Maybe (LicenseType, FileType))
| Init LicenseType [FilePath]
deriving (Show)
newtype CommandGenOptions = CommandGenOptions
{ cgoGenMode :: GenMode
}
deriving (Show)
data CommandInitOptions = CommandInitOptions
{ cioSourcePaths :: ![FilePath]
, cioLicenseType :: !LicenseType
}
deriving Show
data CommandRunOptions = CommandRunOptions
{ croRunMode :: !(Maybe RunMode)
, croSourcePaths :: ![FilePath]
, croExcludedPaths :: ![Regex]
, croTemplateSource :: !(Maybe TemplateSource)
, croVariables :: ![Text]
, croDebug :: !Bool
, croDryRun :: !Bool
}
deriving (Eq, Show)