Something went wrong. Try again.
A collection of +180 reusable WebAssembly modules for building composable CI/CD pipelines with FluentCI fluentci.io/modules
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677-- Generated by Gleam CI helpers.module CI.Component (run, version, check, format, format_check) where
import Preludeimport CI.Contract as Contractimport Data.Maybe (Maybe)import Effect (Effect)import CI.ModuleDependencies as Dependenciesimport CI.CLI as Native
-- | Execute arbitrary literal CLI arguments.-- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".".-- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist.-- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool.-- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000.-- | @param artifacts Output artifacts to collect as NAME=PATH entries; names must be unique.-- | @param arguments Literal native CLI argument tokens, passed without shell expansion.run :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe (Array String), arguments :: Array String } -> Effect Contract.ExecutionResultrun args = do json <- Contract.cliInput (Contract.encodeInput args) Native.executeWithSetup Dependencies.ensureFor "ruff" "run" json
-- | Print the CLI version.-- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".".-- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist.-- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool.-- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000.-- | @param artifacts Output artifacts to collect as NAME=PATH entries; names must be unique.version :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe (Array String) } -> Effect Contract.ExecutionResultversion args = do json <- Contract.cliInput (Contract.encodeInput args) Native.executeWithSetup Dependencies.ensureFor "ruff" "version" json
-- | Lint Python sources; fixes require fix=true.-- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".".-- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist.-- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool.-- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000.-- | @param artifacts Output artifacts to collect as NAME=PATH entries; names must be unique.-- | @param config Named configuration selected by the native tool.-- | @param select Select supplied to the ruff check operation.-- | @param ignore Ignore supplied to the ruff check operation.-- | @param outputFormat Output Format supplied to the ruff check operation.-- | @param fix Fix supplied to the ruff check operation.-- | @param files Files selected for the native operation; paths are passed literally without shell expansion. Default: ["."].check :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe (Array String), config :: Maybe String, select :: Maybe String, ignore :: Maybe String, outputFormat :: Maybe String, fix :: Maybe Boolean, files :: Maybe (Array String) } -> Effect Contract.ExecutionResultcheck args = do json <- Contract.cliInput (Contract.encodeInput args) Native.executeWithSetup Dependencies.ensureFor "ruff" "check" json
-- | Format Python sources.-- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".".-- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist.-- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool.-- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000.-- | @param artifacts Output artifacts to collect as NAME=PATH entries; names must be unique.-- | @param config Named configuration selected by the native tool.-- | @param lineLength Line Length supplied to the ruff format operation.-- | @param files Files selected for the native operation; paths are passed literally without shell expansion. Default: ["."].format :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe (Array String), config :: Maybe String, lineLength :: Maybe Int, files :: Maybe (Array String) } -> Effect Contract.ExecutionResultformat args = do json <- Contract.cliInput (Contract.encodeInput args) Native.executeWithSetup Dependencies.ensureFor "ruff" "format" json
-- | Check Python formatting without writing files.-- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".".-- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist.-- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool.-- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000.-- | @param artifacts Output artifacts to collect as NAME=PATH entries; names must be unique.-- | @param config Named configuration selected by the native tool.-- | @param files Files selected for the native operation; paths are passed literally without shell expansion. Default: ["."].format_check :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe (Array String), config :: Maybe String, files :: Maybe (Array String) } -> Effect Contract.ExecutionResultformat_check args = do json <- Contract.cliInput (Contract.encodeInput args) Native.executeWithSetup Dependencies.ensureFor "ruff" "format_check" json