ProcessModule

PackageAxial.Process

Summary

NameSignatureSynopsis
commandProcess.command fileName argumentsCreates a runnable, safely tokenized one-command process specification.
fileNameProcess.fileName specificationReturns the executable name of a one-command specification.
argumentsProcess.arguments specificationReturns the real argument values of a one-command specification.
tryWorkingDirectoryProcess.tryWorkingDirectory specificationReturns the configured working directory of a one-command specification.
environmentVariablesProcess.environmentVariables specificationReturns environment overrides of a one-command specification.
acceptedExitCodesProcess.acceptedExitCodes specificationReturns accepted exit codes of a one-command specification.
argProcess.arg value specificationAppends one ordinary argument.
secretArgProcess.secretArg value specificationAdds an argument whose value is replaced with <c>***</c> in rendered commands and transcripts.
workingDirectoryProcess.workingDirectory path specificationSets the working directory.
environmentProcess.environment name value specificationSets an environment override.
removeEnvironmentProcess.removeEnvironment name specificationRemoves an inherited environment variable.
encodingProcess.encoding value specificationSelects text decoding for this stage.
successCodesProcess.successCodes values specificationReplaces the set of exit codes considered successful for this command.
renderProcess.render specificationRenders a redacted shell-like description of the complete process specification.
pipeProcess.pipe next sourceConnects the current stdout to the next one-command specification's stdin.
pipeBothProcess.pipeBoth next sourceConnects both stdout and stderr from the current final stage to the next command's stdin.
mergeProcess.merge commandsCreates a fan-in topology whose producers may be connected to one downstream command.
stdinProcess.stdin source specificationSupplies stdin to the first stage.
stdoutProcess.stdout destination specificationConfigures final stdout handling.
stderrProcess.stderr destination specificationConfigures combined stderr handling.
mergeStderrProcess.mergeStderr specificationRoutes final stderr through the final stdout targets, like the intent of <c>2&gt;&amp;1</c>.
framingProcess.framing value specificationSelects chunk or line event framing.
timeoutProcess.timeout after specificationSets the maximum execution time for the complete process topology.
planProcess.plan specificationReturns a redacted execution plan without starting a process.
serviceProcess.service Reads the process service from the environment.
runProcess.run specificationRuns a process specification in the current Flow runtime.
captureProcess.capture specificationRuns a process specification with complete stdout and stderr capture.
streamProcess.stream specificationStreams process events in the current Flow runtime.
liveProcess.live clock fileSystem consoleCreates a live process service using an explicit clock for transcript timestamps and durations.

command

Process.command fileName arguments
Member
Creates a runnable, safely tokenized one-command process specification. <example><code>Process.command "git" [ "status"; "--short" ] |&gt; Process.run</code></example>

Parameters

NameTypeDescription
fileNamestring
argumentsstring list

Returns

ProcessSpec

fileName

Process.fileName specification
Member
Returns the executable name of a one-command specification.

Parameters

NameTypeDescription
specificationProcessSpec

Returns

string

arguments

Process.arguments specification
Member
Returns the real argument values of a one-command specification.

Parameters

NameTypeDescription
specificationProcessSpec

Returns

string list

tryWorkingDirectory

Process.tryWorkingDirectory specification
Member
Returns the configured working directory of a one-command specification.

Parameters

NameTypeDescription
specificationProcessSpec

Returns

string option

environmentVariables

Process.environmentVariables specification
Member
Returns environment overrides of a one-command specification.

Parameters

NameTypeDescription
specificationProcessSpec

Returns

Map<string, string option>

acceptedExitCodes

Process.acceptedExitCodes specification
Member
Returns accepted exit codes of a one-command specification.

Parameters

NameTypeDescription
specificationProcessSpec

Returns

Set<int>

arg

Process.arg value specification
Member
Appends one ordinary argument. <example><code>command |&gt; Process.arg "--verbose"</code></example>

Parameters

NameTypeDescription
valuestring
specificationProcessSpec

Returns

ProcessSpec

secretArg

Process.secretArg value specification
Member
Adds an argument whose value is replaced with <c>***</c> in rendered commands and transcripts.

Parameters

NameTypeDescription
valuestring
specificationProcessSpec

Returns

ProcessSpec

workingDirectory

Process.workingDirectory path specification
Member
Sets the working directory. <example><code>command |&gt; Process.workingDirectory repo</code></example>

Parameters

NameTypeDescription
pathstring
specificationProcessSpec

Returns

ProcessSpec

environment

Process.environment name value specification
Member
Sets an environment override. <example><code>command |&gt; Process.environment "CI" "true"</code></example>

Parameters

NameTypeDescription
namestring
valuestring
specificationProcessSpec

Returns

ProcessSpec

removeEnvironment

Process.removeEnvironment name specification
Member
Removes an inherited environment variable. <example><code>command |&gt; Process.removeEnvironment "TOKEN"</code></example>

Parameters

NameTypeDescription
namestring
specificationProcessSpec

Returns

ProcessSpec

encoding

Process.encoding value specification
Member
Selects text decoding for this stage. <example><code>command |&gt; Process.encoding Encoding.Latin1</code></example>

Parameters

NameTypeDescription
valueEncoding
specificationProcessSpec

Returns

ProcessSpec

successCodes

Process.successCodes values specification
Member
Replaces the set of exit codes considered successful for this command.

Parameters

NameTypeDescription
valuesint seq
specificationProcessSpec

Returns

ProcessSpec

render

Process.render specification
Member
Renders a redacted shell-like description of the complete process specification.

Parameters

NameTypeDescription
specificationProcessSpec

Returns

string

pipe

Process.pipe next source
Member
Connects the current stdout to the next one-command specification's stdin.

Parameters

NameTypeDescription
nextProcessSpec
sourceProcessSpec

Returns

ProcessSpec

pipeBoth

Process.pipeBoth next source
Member
Connects both stdout and stderr from the current final stage to the next command's stdin.

Parameters

NameTypeDescription
nextProcessSpec
sourceProcessSpec

Returns

ProcessSpec

merge

Process.merge commands
Member
Creates a fan-in topology whose producers may be connected to one downstream command.

Parameters

NameTypeDescription
commandsProcessSpec seq

Returns

ProcessSpec

stdin

Process.stdin source specification
Member
Supplies stdin to the first stage.

Parameters

NameTypeDescription
sourceInputSource
specificationProcessSpec

Returns

ProcessSpec

stdout

Process.stdout destination specification
Member
Configures final stdout handling. <example><code>specification |&gt; Process.stdout OutputTarget.Console</code></example>

Parameters

NameTypeDescription
destinationOutputTarget
specificationProcessSpec

Returns

ProcessSpec

stderr

Process.stderr destination specification
Member
Configures combined stderr handling. <example><code>specification |&gt; Process.stderr (OutputTarget.CaptureTail 65536)</code></example>

Parameters

NameTypeDescription
destinationOutputTarget
specificationProcessSpec

Returns

ProcessSpec

mergeStderr

Process.mergeStderr specification
Member
Routes final stderr through the final stdout targets, like the intent of <c>2&gt;&amp;1</c>.

Parameters

NameTypeDescription
specificationProcessSpec

Returns

ProcessSpec

framing

Process.framing value specification
Member
Selects chunk or line event framing. <example><code>specification |&gt; Process.framing OutputFraming.Lines</code></example>

Parameters

NameTypeDescription
valueOutputFraming
specificationProcessSpec

Returns

ProcessSpec

timeout

Process.timeout after specification
Member
Sets the maximum execution time for the complete process topology. <example><code>specification |&gt; Process.timeout (TimeSpan.FromSeconds 30.0)</code></example>

Parameters

NameTypeDescription
afterTimeSpan
specificationProcessSpec

Returns

ProcessSpec

plan

Process.plan specification
Member
Returns a redacted execution plan without starting a process.

Parameters

NameTypeDescription
specificationProcessSpec

Returns

ProcessPlan

service

Process.service
Member
Reads the process service from the environment.

Returns

Flow<'env, 'error, IProcess>

run

Process.run specification
Member
Runs a process specification in the current Flow runtime. <example><code>specification |&gt; Process.run</code></example>

Parameters

NameTypeDescription
specificationProcessSpec

Returns

Flow<'env, ProcessError, ProcessResult>

capture

Process.capture specification
Member
Runs a process specification with complete stdout and stderr capture. <example><code>Process.command "dotnet" [ "--info" ] |&gt; Process.capture</code></example>

Parameters

NameTypeDescription
specificationProcessSpec

Returns

Flow<'env, ProcessError, ProcessResult>

stream

Process.stream specification
Member
Streams process events in the current Flow runtime. The last event is <c>Completed</c>.

Parameters

NameTypeDescription
specificationProcessSpec

Returns

FlowStream<'env, ProcessError, ProcessEvent>

live

Process.live clock fileSystem console
Member
Creates a live process service using an explicit clock for transcript timestamps and durations.

Parameters

NameTypeDescription
clockIClock
fileSystemIFileSystem
consoleIConsole

Returns

IProcess