diff options
Diffstat (limited to 'cli/internal/util/run_opts.go')
| -rw-r--r-- | cli/internal/util/run_opts.go | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/cli/internal/util/run_opts.go b/cli/internal/util/run_opts.go new file mode 100644 index 0000000..08676a0 --- /dev/null +++ b/cli/internal/util/run_opts.go @@ -0,0 +1,53 @@ +package util + +import "strings" + +// EnvMode specifies if we will be using strict env vars +type EnvMode string + +const ( + // Infer - infer environment variable constraints from turbo.json + Infer EnvMode = "Infer" + // Loose - environment variables are unconstrained + Loose EnvMode = "Loose" + // Strict - environment variables are limited + Strict EnvMode = "Strict" +) + +// MarshalText implements TextMarshaler for the struct. +func (s EnvMode) MarshalText() (text []byte, err error) { + return []byte(strings.ToLower(string(s))), nil +} + +// RunOpts holds the options that control the execution of a turbo run +type RunOpts struct { + // Force execution to be serially one-at-a-time + Concurrency int + // Whether to execute in parallel (defaults to false) + Parallel bool + + EnvMode EnvMode + // The filename to write a perf profile. + Profile string + // If true, continue task executions even if a task fails. + ContinueOnError bool + PassThroughArgs []string + // Restrict execution to only the listed task names. Default false + Only bool + // Dry run flags + DryRun bool + DryRunJSON bool + // Graph flags + GraphDot bool + GraphFile string + NoDaemon bool + SinglePackage bool + + // logPrefix controls whether we should print a prefix in task logs + LogPrefix string + + // Whether turbo should create a run summary + Summarize bool + + ExperimentalSpaceID string +} |
