ProcessModule
PackageAxial.Process
Summary
| Name | Signature | Synopsis |
|---|---|---|
| Operations | ||
| commandArgs | Process.commandArgs fileName arguments | Creates a one-command process specification from an executable and already-separated arguments. |
| command | Process.command commandLine | Creates a safely tokenized one-command process specification from an interpolated command template. |
| commandText | Process.commandText commandLine | Creates a safely tokenized one-command process specification from fixed command text. |
| fileName | Process.fileName specification | Returns the executable name of a one-command specification. |
| arguments | Process.arguments specification | Returns the real argument values of a one-command specification. |
| tryWorkingDirectory | Process.tryWorkingDirectory specification | Returns the configured working directory of a one-command specification. |
| environmentVariables | Process.environmentVariables specification | Returns environment overrides of a one-command specification. |
| acceptedExitCodes | Process.acceptedExitCodes specification | Returns accepted exit codes of a one-command specification. |
| arg | Process.arg value specification | Appends one ordinary argument. |
| secretArg | Process.secretArg value specification | Adds an argument whose value is replaced with <c>***</c> in rendered commands and transcripts. |
| workingDirectory | Process.workingDirectory path specification | Sets the working directory. |
| environment | Process.environment name value specification | Sets an environment override. |
| removeEnvironment | Process.removeEnvironment name specification | Removes an inherited environment variable. |
| encoding | Process.encoding value specification | Selects text decoding for this stage. |
| successCodes | Process.successCodes values specification | Replaces the set of exit codes considered successful for this command. |
| render | Process.render specification | Renders a redacted shell-like description of the complete process specification. |
| pipe | Process.pipe next source | Connects the current stdout to the next one-command specification's stdin. |
| pipeBoth | Process.pipeBoth next source | Connects both stdout and stderr from the current final stage to the next command's stdin. |
| merge | Process.merge commands | Creates a fan-in topology whose producers may be connected to one downstream command. |
| stdin | Process.stdin source specification | Supplies stdin to the first stage. |
| stdout | Process.stdout destination specification | Configures final stdout handling. |
| stderr | Process.stderr destination specification | Configures combined stderr handling. |
| mergeStderr | Process.mergeStderr specification | Routes final stderr through the final stdout targets, like the intent of <c>2>&1</c>. |
| framing | Process.framing value specification | Selects chunk or line event framing. |
| timeout | Process.timeout after specification | Sets the maximum execution time for the complete process topology. |
| plan | Process.plan specification | Returns a redacted execution plan without starting a process. |
| service | Process.service | Reads the process service from the environment. |
| toFlow | Process.toFlow specification | Converts a process specification into a lazy Flow in the current environment. |
| capture | Process.capture specification | Runs a process specification with complete stdout and stderr capture. |
| console | Process.console specification | Converts a process specification into a lazy Flow that forwards stdout and stderr to the host console. |
| stream | Process.stream specification | Streams process events in the current Flow runtime. |
| live | Process.live clock fileSystem console | Creates a live process service using an explicit clock for transcript timestamps and durations. |
| runWith | Process.runWith environment workflow | Runs a process workflow with its supplied application environment and returns a host exit code. |
| run | Process.run workflow | Runs a process workflow with live clock, filesystem, console, and process services. |
Operations
kind:member
Creates a one-command process specification from an executable and already-separated arguments.
Example: Process.commandArgs "git" [ "status"; "--short" ] |> Process.toFlow
Parameters
| Name | Type | Description |
|---|---|---|
| fileName | string | |
| arguments | string list |
Returns
ProcessSpec
kind:member
Creates a safely tokenized one-command process specification from an interpolated command template.
Each interpolation hole is one native argument.
Example: Process.command $"git show {revision}" |> Process.toFlow
Parameters
| Name | Type | Description |
|---|---|---|
| commandLine | FormattableString |
Returns
ProcessSpec
kind:member
kind:member
kind:member
kind:member
kind:member
kind:member
kind:member
kind:member
kind:member
kind:member
kind:member
kind:member
kind:member
kind:member
kind:member
kind:member
kind:member
kind:member
kind:member
kind:member
kind:member
kind:member
kind:member
kind:member
kind:member
kind:member
kind:member
kind:member
Converts a process specification into a lazy Flow that forwards stdout and stderr to the host console.
Example: Process.command $"dotnet --version" |> Process.console
Parameters
| Name | Type | Description |
|---|---|---|
| specification | ProcessSpec |
Returns
Flow<'env, ProcessError, ProcessResult>
kind:member
kind:member
kind:member
Runs a process workflow with its supplied application environment and returns a host exit code.
The environment supplies the console used to report a typed process failure.
Parameters
| Name | Type | Description |
|---|---|---|
| environment | 'env | |
| workflow | Flow<'env, ProcessError, 'value> |
Returns
int

