Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- data CliOptions
- data DumpOptions = DumpOptions {}
- data RunOptions = RunOptions {
- disableAll :: Bool
- enableAll :: Bool
- depsOnly :: Bool
- forceTables :: [SpecTableName]
- skipTables :: [SpecTableName]
- naturalUpdates :: [SpecTableName]
- app :: Text
- logLevel :: Maybe Severity
- dryRun :: Bool
- namespace :: Maybe Text
- metadataConnectionString :: Maybe Text
- showProgress :: Bool
- meta :: [ByteString]
- enableTags :: [TableSpecTag]
- disableTags :: [TableSpecTag]
- condensedLogging :: CondensedLogging
- maxConcurrency :: Maybe Natural
- newtype CustomSpecPreprocessor bk = CustomSpecPreprocessor (SpecMetaArgs -> SpecRuntime bk -> Specs bk -> Specs bk)
- parseRunOptions :: Parser CliOptions
- parseDumpOptions :: Parser CliOptions
- parseCliOption :: Parser CliOptions
- parseSpecMetaArgs :: [ByteString] -> Either String SpecMetaArgs
- dumpDeps :: forall bk a. (MustacheBackend bk, RunBackendEffect bk, DumpBackendRequirements bk) => RuntimeEnv -> ExternMacros -> bk -> Spec bk a -> IO ()
- specMain :: SpecBackend bk => bk -> SpecRuntime bk -> Spec bk a -> IO ExitCode
- specMainWith :: forall bk a. SpecBackend bk => (AppConfig -> ResourceT IO (ComboEnv bk)) -> CliOptions -> bk -> CustomSpecPreprocessor bk -> CustomValidator -> ExternMacros -> SpecRuntime bk -> Spec bk a -> IO ExitCode
- specMainWithInterpreter :: forall bk a. SpecBackend bk => RuntimeEnv -> (AppConfig -> ResourceT IO (ComboEnv bk)) -> CliOptions -> bk -> CustomSpecPreprocessor bk -> CustomValidator -> ExternMacros -> SpecRuntime bk -> Spec bk a -> IO ExitCode
- exitRunFailed :: ExitCode
- exitValidationFailed :: ExitCode
- specTagRefMap :: [TableSpec b] -> Map (Maybe TableSpecTag) [SpecTableName]
- specListTags :: forall bk m. (SpecBackend bk, MonadIO m) => Specs bk -> m ()
Documentation
data CliOptions #
Data structure for all CLI command and sub-commands.
Instances
Show CliOptions # | |
Defined in Napkin.Spec.Cli showsPrec :: Int -> CliOptions -> ShowS # show :: CliOptions -> String # showList :: [CliOptions] -> ShowS # | |
Eq CliOptions # | |
Defined in Napkin.Spec.Cli (==) :: CliOptions -> CliOptions -> Bool # (/=) :: CliOptions -> CliOptions -> Bool # |
data DumpOptions #
Data structure dump sub-command.
Instances
data RunOptions #
Data structure run sub-command.
RunOptions | |
|
Instances
newtype CustomSpecPreprocessor bk #
User-specified function to preprocess all specs. Useful for renaming all tables, for example, in development vs. production mode.
CustomSpecPreprocessor (SpecMetaArgs -> SpecRuntime bk -> Specs bk -> Specs bk) |
Instances
Default (CustomSpecPreprocessor bk) # | |
Defined in Napkin.Spec.Cli def :: CustomSpecPreprocessor bk # |
parseRunOptions :: Parser CliOptions #
Parser for the run
CLI sub-command
Parses available commands for the run
sub-command and provides detail CLI help text
parseDumpOptions :: Parser CliOptions #
Parser for the dump
CLI sub-command
Parses available commands for the run
sub-command and provides detail CLI help text
parseSpecMetaArgs :: [ByteString] -> Either String SpecMetaArgs #
dumpDeps :: forall bk a. (MustacheBackend bk, RunBackendEffect bk, DumpBackendRequirements bk) => RuntimeEnv -> ExternMacros -> bk -> Spec bk a -> IO () #
specMain :: SpecBackend bk => bk -> SpecRuntime bk -> Spec bk a -> IO ExitCode #
Use this to make your main
entry point for your spec running
application.
specMain :: bk -> [(NS.SpecRuntime bk, NST.Spec bk ())] -> IO ()
:: forall bk a. SpecBackend bk | |
=> (AppConfig -> ResourceT IO (ComboEnv bk)) | How to build the combo. register any cleanup |
-> CliOptions | |
-> bk | |
-> CustomSpecPreprocessor bk | |
-> CustomValidator | |
-> ExternMacros | |
-> SpecRuntime bk | |
-> Spec bk a | |
-> IO ExitCode |
A more customizable specMain for embedding in larger programs. This API is unstable
:: forall bk a. SpecBackend bk | |
=> RuntimeEnv | |
-> (AppConfig -> ResourceT IO (ComboEnv bk)) | How to build the combo. register any cleanup |
-> CliOptions | |
-> bk | |
-> CustomSpecPreprocessor bk | |
-> CustomValidator | |
-> ExternMacros | |
-> SpecRuntime bk | |
-> Spec bk a | |
-> IO ExitCode |
specTagRefMap :: [TableSpec b] -> Map (Maybe TableSpecTag) [SpecTableName] #
create a mapping of TableSpecTag
s to `Ref Table`s for dumping.
specListTags :: forall bk m. (SpecBackend bk, MonadIO m) => Specs bk -> m () #
Print the result of specTagRefMap'ing a particular spec to terminal.