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.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145-- Generated by Gleam CI helpers.module CI.Component (run, version, generate, migrate, push, pull, check, up, export_sql, 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 Drizzle Kit arguments for additional upstream 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 "drizzlekit" "run" json
-- | Print the Drizzle Kit 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 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 "drizzlekit" "version" json
-- | Generate SQL migrations; custom creates an empty migration for handwritten SQL.-- | @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 name Name for the generated migration.-- | @param custom Generate an empty custom SQL migration.-- | @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, name :: Maybe String, custom :: Maybe Boolean, arguments :: Maybe String } -> Effect Contract.ExecutionResultgenerate args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "drizzlekit" "generate" json
-- | Apply committed SQL migrations using the project database configuration.-- | @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.migrate :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, config :: Maybe String, arguments :: Maybe String } -> Effect Contract.ExecutionResultmigrate args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "drizzlekit" "migrate" json
-- | Apply schema changes directly; destructive approval is opt-in through force.-- | @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 force Explicitly approve data loss statements; may truncate tables.-- | @param strict Require confirmation for every schema change; avoid unattended pipelines.-- | @param verbose Print SQL statements before applying changes.-- | @param arguments Additional literal CLI tokens as a comma-separated string. Quote a token containing a comma using CSV quotes.push :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, config :: Maybe String, force :: Maybe Boolean, strict :: Maybe Boolean, verbose :: Maybe Boolean, arguments :: Maybe String } -> Effect Contract.ExecutionResultpush args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "drizzlekit" "push" json
-- | Introspect the configured database into Drizzle schema 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 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.pull :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, config :: Maybe String, arguments :: Maybe String } -> Effect Contract.ExecutionResultpull args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "drizzlekit" "pull" json
-- | Check generated migrations for collisions before merging.-- | @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.check :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, config :: Maybe String, arguments :: Maybe String } -> Effect Contract.ExecutionResultcheck args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "drizzlekit" "check" json
-- | Upgrade existing migration snapshots to the installed Kit format.-- | @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.up :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, config :: Maybe String, arguments :: Maybe String } -> Effect Contract.ExecutionResultup args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "drizzlekit" "up" json
-- | Print SQL DDL from the configured TypeScript 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 arguments Additional literal CLI tokens as a comma-separated string. Quote a token containing a comma using CSV quotes.export_sql :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, config :: Maybe String, arguments :: Maybe String } -> Effect Contract.ExecutionResultexport_sql args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "drizzlekit" "export_sql" json
-- | Start the long-running Studio server; use a bounded timeout and 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 host Listening address; bind locally on shared runners.-- | @param port Studio listening port.-- | @param verbose Print Studio SQL statements.-- | @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, host :: Maybe String, port :: Maybe Int, verbose :: Maybe Boolean, arguments :: Maybe String } -> Effect Contract.ExecutionResultstudio args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "drizzlekit" "studio" json