-- Generated by Gleam CI helpers. module CI.Component (run, version, setup, test, install, verify, cache_list) where import Prelude import CI.Contract as Contract import Data.Maybe (Maybe) import Effect (Effect) import CI.ModuleDependencies as Dependencies import 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.ExecutionResult run args = do json <- Contract.cliInput (Contract.encodeInput args) Native.executeWithSetup Dependencies.ensureFor "cypress" "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.ExecutionResult version args = do json <- Contract.cliInput (Contract.encodeInput args) Native.executeWithSetup Dependencies.ensureFor "cypress" "version" json -- | Install the test framework in project using Bun. Browser binaries are installed separately with install. -- | @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 version Framework version or release tag to install with Bun. Default: "latest". setup :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe (Array String), version :: Maybe String } -> Effect Contract.ExecutionResult setup args = do json <- Contract.cliInput (Contract.encodeInput args) Native.executeWithSetup Dependencies.ensureFor "cypress" "setup" json -- | Run Cypress specs headlessly, returning a failure if any tests fail. -- | @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 browser Browser supplied to the cypress test operation. -- | @param configFile Config File supplied to the cypress test operation. -- | @param config Named configuration selected by the native tool. -- | @param spec RPM spec file inside the package tree. -- | @param reporter Reporter supplied to the cypress test operation. -- | @param reporterOptions Reporter Options supplied to the cypress test operation. -- | @param component Component supplied to the cypress test operation. -- | @param record Record supplied to the cypress test operation. -- | @param parallel Maximum number of concurrent build or test jobs. -- | @param group Group supplied to the cypress test operation. -- | @param ciBuildId Ci Build Id supplied to the cypress test operation. -- | @param tag Tag supplied to the cypress test operation. test :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe (Array String), browser :: Maybe String, configFile :: Maybe String, config :: Maybe String, spec :: Maybe String, reporter :: Maybe String, reporterOptions :: Maybe String, component :: Maybe Boolean, record :: Maybe Boolean, parallel :: Maybe Boolean, group :: Maybe String, ciBuildId :: Maybe String, tag :: Maybe String } -> Effect Contract.ExecutionResult test args = do json <- Contract.cliInput (Contract.encodeInput args) Native.executeWithSetup Dependencies.ensureFor "cypress" "test" json -- | Download the Cypress binary matching the installed npm package. -- | @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 force Force supplied to the cypress install operation. install :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe (Array String), force :: Maybe Boolean } -> Effect Contract.ExecutionResult install args = do json <- Contract.cliInput (Contract.encodeInput args) Native.executeWithSetup Dependencies.ensureFor "cypress" "install" json -- | Verify that the installed Cypress binary can start. -- | @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. verify :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe (Array String) } -> Effect Contract.ExecutionResult verify args = do json <- Contract.cliInput (Contract.encodeInput args) Native.executeWithSetup Dependencies.ensureFor "cypress" "verify" json -- | List installed Cypress binaries. -- | @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. cache_list :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe (Array String) } -> Effect Contract.ExecutionResult cache_list args = do json <- Contract.cliInput (Contract.encodeInput args) Native.executeWithSetup Dependencies.ensureFor "cypress" "cache_list" json