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.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280-- Generated by Gleam CI helpers.module CI.Component (run, version, init, generate, validate, format, db_pull, db_push, db_seed, db_execute, migrate_deploy, migrate_status, migrate_dev, migrate_reset, migrate_resolve, migrate_diff, debug, studio) where
import Preludeimport CI.Contract as Contractimport Data.Maybe (Maybe)import Effect (Effect)import CI.ModuleDependencies as Dependenciesimport CI.CLI as Native
-- | Execute literal Prisma CLI arguments, including version-specific features.-- | @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 Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas.-- | @param arguments Additional literal CLI tokens as a comma-separated string. Quote a token containing a comma using CSV quotes.run :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, arguments :: String } -> Effect Contract.ExecutionResultrun args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "prisma" "run" json
-- | Print the Prisma CLI and engine versions.-- | @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 Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas.version :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String } -> Effect Contract.ExecutionResultversion args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "prisma" "version" json
-- | Initialize a Prisma project; configure the datasource explicitly for unattended jobs.-- | @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 Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas.-- | @param datasourceProvider Database provider for the generated schema. Allowed values: postgresql, sqlite, mysql, sqlserver, mongodb, cockroachdb.-- | @param generatorProvider Generator provider for the initial schema.-- | @param output Output path for generated client code.-- | @param arguments Additional literal CLI tokens as a comma-separated string. Quote a token containing a comma using CSV quotes.init :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, datasourceProvider :: Maybe String, generatorProvider :: Maybe String, output :: Maybe String, arguments :: Maybe String } -> Effect Contract.ExecutionResultinit args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "prisma" "init" json
-- | Generate project clients from the Prisma schema without applying migrations.-- | @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 Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas.-- | @param config Path to an existing project configuration file; otherwise use native discovery.-- | @param schema Prisma schema file or schema directory; otherwise use project configuration.-- | @param generators Comma-separated generator names; omitted runs all configured generators.-- | @param noHints Suppress usage hints in CI logs.-- | @param arguments Additional literal CLI tokens as a comma-separated string. Quote a token containing a comma using CSV quotes.generate :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, config :: Maybe String, schema :: Maybe String, generators :: Maybe String, noHints :: Maybe Boolean, arguments :: Maybe String } -> Effect Contract.ExecutionResultgenerate args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "prisma" "generate" json
-- | Validate the project Prisma schema.-- | @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 Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas.-- | @param config Path to an existing project configuration file; otherwise use native discovery.-- | @param schema Prisma schema file or schema directory; otherwise use project configuration.-- | @param arguments Additional literal CLI tokens as a comma-separated string. Quote a token containing a comma using CSV quotes.validate :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, config :: Maybe String, schema :: Maybe String, arguments :: Maybe String } -> Effect Contract.ExecutionResultvalidate args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "prisma" "validate" json
-- | Format schemas or fail a formatting check without writing changes.-- | @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 Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas.-- | @param config Path to an existing project configuration file; otherwise use native discovery.-- | @param schema Prisma schema file or schema directory; otherwise use project configuration.-- | @param check Fail when schema files need formatting.-- | @param arguments Additional literal CLI tokens as a comma-separated string. Quote a token containing a comma using CSV quotes.format :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, config :: Maybe String, schema :: Maybe String, check :: Maybe Boolean, arguments :: Maybe String } -> Effect Contract.ExecutionResultformat args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "prisma" "format" json
-- | Introspect the database; print avoids rewriting the project schema.-- | @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 Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas.-- | @param config Path to an existing project configuration file; otherwise use native discovery.-- | @param schema Prisma schema file or schema directory; otherwise use project configuration.-- | @param print Print the introspected schema instead of writing it.-- | @param force Explicitly overwrite manual schema changes.-- | @param arguments Additional literal CLI tokens as a comma-separated string. Quote a token containing a comma using CSV quotes.db_pull :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, config :: Maybe String, schema :: Maybe String, print :: Maybe Boolean, force :: Maybe Boolean, arguments :: Maybe String } -> Effect Contract.ExecutionResultdb_pull args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "prisma" "db_pull" json
-- | Synchronize schema without migrations; data loss and reset flags are explicit.-- | @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 Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas.-- | @param config Path to an existing project configuration file; otherwise use native discovery.-- | @param schema Prisma schema file or schema directory; otherwise use project configuration.-- | @param acceptDataLoss Approve potentially destructive changes.-- | @param forceReset Explicitly reset the database before pushing; destroys data.-- | @param arguments Additional literal CLI tokens as a comma-separated string. Quote a token containing a comma using CSV quotes.db_push :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, config :: Maybe String, schema :: Maybe String, acceptDataLoss :: Maybe Boolean, forceReset :: Maybe Boolean, arguments :: Maybe String } -> Effect Contract.ExecutionResultdb_push args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "prisma" "db_push" json
-- | Run the project seed command configured in Prisma config.-- | @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 Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas.-- | @param config Path to an existing project configuration file; otherwise use native discovery.-- | @param arguments Additional literal CLI tokens as a comma-separated string. Quote a token containing a comma using CSV quotes.db_seed :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, config :: Maybe String, arguments :: Maybe String } -> Effect Contract.ExecutionResultdb_seed args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "prisma" "db_seed" json
-- | Execute an existing SQL script using the configured datasource.-- | @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 Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas.-- | @param config Path to an existing project configuration file; otherwise use native discovery.-- | @param file Existing SQL script to execute.-- | @param arguments Additional literal CLI tokens as a comma-separated string. Quote a token containing a comma using CSV quotes.db_execute :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, config :: Maybe String, file :: String, arguments :: Maybe String } -> Effect Contract.ExecutionResultdb_execute args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "prisma" "db_execute" json
-- | Apply pending committed migrations noninteractively in deployment pipelines.-- | @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 Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas.-- | @param config Path to an existing project configuration file; otherwise use native discovery.-- | @param schema Prisma schema file or schema directory; otherwise use project configuration.-- | @param arguments Additional literal CLI tokens as a comma-separated string. Quote a token containing a comma using CSV quotes.migrate_deploy :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, config :: Maybe String, schema :: Maybe String, arguments :: Maybe String } -> Effect Contract.ExecutionResultmigrate_deploy args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "prisma" "migrate_deploy" json
-- | Report migration status; propagate divergence and pending-migration failures.-- | @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 Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas.-- | @param config Path to an existing project configuration file; otherwise use native discovery.-- | @param schema Prisma schema file or schema directory; otherwise use project configuration.-- | @param arguments Additional literal CLI tokens as a comma-separated string. Quote a token containing a comma using CSV quotes.migrate_status :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, config :: Maybe String, schema :: Maybe String, arguments :: Maybe String } -> Effect Contract.ExecutionResultmigrate_status args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "prisma" "migrate_status" json
-- | Create and apply development migrations; use migrate-deploy for production.-- | @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 Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas.-- | @param config Path to an existing project configuration file; otherwise use native discovery.-- | @param schema Prisma schema file or schema directory; otherwise use project configuration.-- | @param name Name for a new migration.-- | @param createOnly Create a migration without applying it.-- | @param arguments Additional literal CLI tokens as a comma-separated string. Quote a token containing a comma using CSV quotes.migrate_dev :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, config :: Maybe String, schema :: Maybe String, name :: Maybe String, createOnly :: Maybe Boolean, arguments :: Maybe String } -> Effect Contract.ExecutionResultmigrate_dev args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "prisma" "migrate_dev" json
-- | Reset a disposable development database; destructive confirmation is explicit.-- | @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 Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas.-- | @param config Path to an existing project configuration file; otherwise use native discovery.-- | @param schema Prisma schema file or schema directory; otherwise use project configuration.-- | @param force Explicitly skip reset confirmation; destroys all database data.-- | @param arguments Additional literal CLI tokens as a comma-separated string. Quote a token containing a comma using CSV quotes.migrate_reset :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, config :: Maybe String, schema :: Maybe String, force :: Maybe Boolean, arguments :: Maybe String } -> Effect Contract.ExecutionResultmigrate_reset args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "prisma" "migrate_reset" json
-- | Record a migration as applied or rolled back; choose exactly one in Prisma.-- | @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 Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas.-- | @param config Path to an existing project configuration file; otherwise use native discovery.-- | @param schema Prisma schema file or schema directory; otherwise use project configuration.-- | @param applied Migration directory name to mark as applied.-- | @param rolledBack Migration directory name to mark as rolled back.-- | @param arguments Additional literal CLI tokens as a comma-separated string. Quote a token containing a comma using CSV quotes.migrate_resolve :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, config :: Maybe String, schema :: Maybe String, applied :: Maybe String, rolledBack :: Maybe String, arguments :: Maybe String } -> Effect Contract.ExecutionResultmigrate_resolve args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "prisma" "migrate_resolve" json
-- | Compare schema sources; native Prisma requires exactly one from and one to source.-- | @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 Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas.-- | @param config Path to an existing project configuration file; otherwise use native discovery.-- | @param fromEmpty Compare from an empty schema.-- | @param fromSchema Existing source Prisma schema file.-- | @param fromMigrations Existing source migrations directory.-- | @param fromConfigDatasource Use the configured database as the source.-- | @param toEmpty Compare to an empty schema.-- | @param toSchema Existing target Prisma schema file.-- | @param toMigrations Existing target migrations directory.-- | @param toConfigDatasource Use the configured database as the target.-- | @param script Print SQL instead of a human-readable summary.-- | @param exitCode Fail on nonempty differences (native exit code 2).-- | @param output Write the diff to this output file.-- | @param arguments Additional literal CLI tokens as a comma-separated string. Quote a token containing a comma using CSV quotes.migrate_diff :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, config :: Maybe String, fromEmpty :: Maybe Boolean, fromSchema :: Maybe String, fromMigrations :: Maybe String, fromConfigDatasource :: Maybe Boolean, toEmpty :: Maybe Boolean, toSchema :: Maybe String, toMigrations :: Maybe String, toConfigDatasource :: Maybe Boolean, script :: Maybe Boolean, exitCode :: Maybe Boolean, output :: Maybe String, arguments :: Maybe String } -> Effect Contract.ExecutionResultmigrate_diff args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "prisma" "migrate_diff" json
-- | Print Prisma diagnostic information for troubleshooting.-- | @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 Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas.-- | @param config Path to an existing project configuration file; otherwise use native discovery.-- | @param schema Prisma schema file or schema directory; otherwise use project configuration.-- | @param arguments Additional literal CLI tokens as a comma-separated string. Quote a token containing a comma using CSV quotes.debug :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, config :: Maybe String, schema :: Maybe String, arguments :: Maybe String } -> Effect Contract.ExecutionResultdebug args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "prisma" "debug" json
-- | Run the long-lived Studio server within a scoped service lifecycle.-- | @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 Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas.-- | @param config Path to an existing project configuration file; otherwise use native discovery.-- | @param port Studio listening port.-- | @param browser Browser to launch; use none on a headless runner.-- | @param arguments Additional literal CLI tokens as a comma-separated string. Quote a token containing a comma using CSV quotes.studio :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, config :: Maybe String, port :: Maybe Int, browser :: Maybe String, arguments :: Maybe String } -> Effect Contract.ExecutionResultstudio args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "prisma" "studio" json