Skip to main content

Crate qk_executor

Crate qk_executor 

Source
Expand description

Prepare finite tasks, then execute shell commands in managed process groups.

Modules§

dotenv
Dotenv files as Nx reads them, with npm’s dotenv and dotenv-expand: every file of a set is parsed first, then $VAR and ${VAR} references are expanded once across all of them.
readiness
A continuous target’s readyWhen, as Nx 24 checks it: a url to request, a port to connect to, a command that must succeed, or text to find in the output. Tasks that depend on the target with waitFor: "ready" start once the check passes.
ready_signal
The other end of a signal readiness check, as Nx 24 has it: a socket qk names to the task in NX_READY_SIGNAL_SOCKET, with the task’s id in NX_READY_SIGNAL_TASK, on which @nx/devkit’s signalTaskReady reports that the task is ready and the address it listens on. That is a Unix socket, or a named pipe on Windows.
report
Where a run’s progress, warnings and task output go. The runner and the cache report events; the CLI installs a sink that renders them for the output style. Without one, events print as qk: status lines on stderr.
tokens
The placeholder syntax Nx 24 shares between run-commands arguments, readyWhen and cache outputs: {name} or {name.path}, with ?? fallbacks.

Macros§

status
Reports a qk: warning to the installed sink; by default it is written to stderr in one write, so task processes sharing stderr cannot split it.

Structs§

Capture
Framed stdout/stderr chunks, optionally stored on disk without buffering the task’s log, and shown as the task’s display asks.
Decoration
Nx’s per-command prefix, prefixColor, color and bgColor.
NodePath
The runner’s Node selection, resolved only when a command starts.
PreparedTask
RecordedLog
Ordered, stream-tagged frames retained for run history.
Recording
An external syscall recorder wrapping each command, with separate trace files.

Enums§

Confinement
How a sandboxed task’s commands are held to what it declares.
Display
How a task’s output reaches the terminal, after Nx’s output styles. Where a task is named, it is as Nx prints it after nx run: see printable.
Outcome
OutputStyle
The output styles qk renders.
Shown
How a task ended, for the header of held output.

Constants§

INVOCATIONS
The variable naming the tasks a task runs inside, one invocation a line.
MAX_LOG_BYTES
Maximum framed bytes retained for an execution, independent of result caching.
ROOT_DOTENV_FILES
The root dotenv files Nx loads into its own process at startup, in the order they take precedence.

Functions§

collapsed
enclosing_invocations
The tasks this process runs inside, from INVOCATIONS.
environment
The process environment with the root dotenv files loaded into it, as Nx loads them into its own process at startup, unless NX_LOAD_DOT_ENV_FILES=false. Variables already set win.
execute
execute_captured
force_colour
What FORCE_COLOR asks of qk’s own output: colour when it is set, none when it is 0 or false, and nothing when it is unset. Tasks receive the variable as it is.
invocation
A task as an invocation: its id and arguments, which a task running inside it repeats only by recursing, as Nx’s task invocation tracker tells it.
is_ci
Whether this runs in CI, as Nx’s isCI decides it: CI set to anything but false (0 included), or a variable a known CI provider sets.
is_ci_with
is_ci, reading variables through variable.
prepare
printable
A task as Nx names it after nx run: project:target, the target quoted when it has a colon, then :configuration and the task’s arguments.
read_capture
replay
Shows a recorded log as a cache hit.
shell
A command running text in the shell tasks run in: /bin/sh on Unix, cmd.exe on Windows.