ProcessModule
PackageAxial.Process
Summary
| Name | Signature | Synopsis |
|---|---|---|
| command | Process.command fileName arguments | Creates a runnable, safely tokenized one-command process specification. |
| 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. |
| run | Process.run specification | Runs a process specification in the current Flow runtime. |
| capture | Process.capture specification | Runs a process specification with complete stdout and stderr capture. |
| 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. |
Creates a runnable, safely tokenized one-command process specification.
<example><code>Process.command "git" [ "status"; "--short" ] |> Process.run</code></example>
Parameters
| Name | Type | Description |
|---|---|---|
| fileName | string | |
| arguments | string list |
Returns
ProcessSpec
Returns the executable name of a one-command specification.
Parameters
| Name | Type | Description |
|---|---|---|
| specification | ProcessSpec |
Returns
string
Returns the real argument values of a one-command specification.
Parameters
| Name | Type | Description |
|---|---|---|
| specification | ProcessSpec |
Returns
string list
Returns the configured working directory of a one-command specification.
Parameters
| Name | Type | Description |
|---|---|---|
| specification | ProcessSpec |
Returns
string option
Returns environment overrides of a one-command specification.
Parameters
| Name | Type | Description |
|---|---|---|
| specification | ProcessSpec |
Returns
Map<string, string option>
Returns accepted exit codes of a one-command specification.
Parameters
| Name | Type | Description |
|---|---|---|
| specification | ProcessSpec |
Returns
Set<int>
Appends one ordinary argument.
<example><code>command |> Process.arg "--verbose"</code></example>
Parameters
| Name | Type | Description |
|---|---|---|
| value | string | |
| specification | ProcessSpec |
Returns
ProcessSpec
Adds an argument whose value is replaced with <c>***</c> in rendered commands and transcripts.
Parameters
| Name | Type | Description |
|---|---|---|
| value | string | |
| specification | ProcessSpec |
Returns
ProcessSpec
Sets the working directory. <example><code>command |> Process.workingDirectory repo</code></example>
Parameters
| Name | Type | Description |
|---|---|---|
| path | string | |
| specification | ProcessSpec |
Returns
ProcessSpec
Sets an environment override. <example><code>command |> Process.environment "CI" "true"</code></example>
Parameters
| Name | Type | Description |
|---|---|---|
| name | string | |
| value | string | |
| specification | ProcessSpec |
Returns
ProcessSpec
Removes an inherited environment variable. <example><code>command |> Process.removeEnvironment "TOKEN"</code></example>
Parameters
| Name | Type | Description |
|---|---|---|
| name | string | |
| specification | ProcessSpec |
Returns
ProcessSpec
Selects text decoding for this stage. <example><code>command |> Process.encoding Encoding.Latin1</code></example>
Parameters
| Name | Type | Description |
|---|---|---|
| value | Encoding | |
| specification | ProcessSpec |
Returns
ProcessSpec
Replaces the set of exit codes considered successful for this command.
Parameters
| Name | Type | Description |
|---|---|---|
| values | int seq | |
| specification | ProcessSpec |
Returns
ProcessSpec
Renders a redacted shell-like description of the complete process specification.
Parameters
| Name | Type | Description |
|---|---|---|
| specification | ProcessSpec |
Returns
string
Connects the current stdout to the next one-command specification's stdin.
Parameters
| Name | Type | Description |
|---|---|---|
| next | ProcessSpec | |
| source | ProcessSpec |
Returns
ProcessSpec
Connects both stdout and stderr from the current final stage to the next command's stdin.
Parameters
| Name | Type | Description |
|---|---|---|
| next | ProcessSpec | |
| source | ProcessSpec |
Returns
ProcessSpec
Creates a fan-in topology whose producers may be connected to one downstream command.
Parameters
| Name | Type | Description |
|---|---|---|
| commands | ProcessSpec seq |
Returns
ProcessSpec
Supplies stdin to the first stage.
Parameters
| Name | Type | Description |
|---|---|---|
| source | InputSource | |
| specification | ProcessSpec |
Returns
ProcessSpec
Configures final stdout handling. <example><code>specification |> Process.stdout OutputTarget.Console</code></example>
Parameters
| Name | Type | Description |
|---|---|---|
| destination | OutputTarget | |
| specification | ProcessSpec |
Returns
ProcessSpec
Configures combined stderr handling. <example><code>specification |> Process.stderr (OutputTarget.CaptureTail 65536)</code></example>
Parameters
| Name | Type | Description |
|---|---|---|
| destination | OutputTarget | |
| specification | ProcessSpec |
Returns
ProcessSpec
Routes final stderr through the final stdout targets, like the intent of <c>2>&1</c>.
Parameters
| Name | Type | Description |
|---|---|---|
| specification | ProcessSpec |
Returns
ProcessSpec
Selects chunk or line event framing. <example><code>specification |> Process.framing OutputFraming.Lines</code></example>
Parameters
| Name | Type | Description |
|---|---|---|
| value | OutputFraming | |
| specification | ProcessSpec |
Returns
ProcessSpec
Sets the maximum execution time for the complete process topology.
<example><code>specification |> Process.timeout (TimeSpan.FromSeconds 30.0)</code></example>
Parameters
| Name | Type | Description |
|---|---|---|
| after | TimeSpan | |
| specification | ProcessSpec |
Returns
ProcessSpec
Returns a redacted execution plan without starting a process.
Parameters
| Name | Type | Description |
|---|---|---|
| specification | ProcessSpec |
Returns
ProcessPlan
Reads the process service from the environment.
Returns
Flow<'env, 'error, IProcess>
Runs a process specification in the current Flow runtime.
<example><code>specification |> Process.run</code></example>
Parameters
| Name | Type | Description |
|---|---|---|
| specification | ProcessSpec |
Returns
Flow<'env, ProcessError, ProcessResult>
Runs a process specification with complete stdout and stderr capture.
<example><code>Process.command "dotnet" [ "--info" ] |> Process.capture</code></example>
Parameters
| Name | Type | Description |
|---|---|---|
| specification | ProcessSpec |
Returns
Flow<'env, ProcessError, ProcessResult>
Streams process events in the current Flow runtime. The last event is <c>Completed</c>.
Parameters
| Name | Type | Description |
|---|---|---|
| specification | ProcessSpec |
Returns
FlowStream<'env, ProcessError, ProcessEvent>

