TaskConfiguration
Nadle / TaskConfiguration
Interface: TaskConfiguration<Options>
Defined in: packages/nadle/src/core/interfaces/task-configuration.ts:9
Configuration for a Nadle task.
Type Parameters
Options
Options = unknown
Properties
cacheVerdict?
optionalcacheVerdict?:boolean
Defined in: packages/nadle/src/core/interfaces/task-configuration.ts:63
Caches the success verdict of a task that declares inputs but produces no
output files, such as a linter or type-checker. While the inputs are unchanged
the task is reported up-to-date instead of running. Only success is cached: a
failing task always re-runs. Setting this asserts the task produces no artifact
any other task consumes. Ignored when outputs are declared.
dependsOn?
optionaldependsOn?:MaybeArray<string>
Defined in: packages/nadle/src/core/interfaces/task-configuration.ts:30
A task or a list of tasks that this task depends on.
description?
optionaldescription?:string
Defined in: packages/nadle/src/core/interfaces/task-configuration.ts:18
The description of the task.
env?
optionalenv?:TaskEnv
Defined in: packages/nadle/src/core/interfaces/task-configuration.ts:35
Environment variables to set when running the task.
group?
optionalgroup?:string
Defined in: packages/nadle/src/core/interfaces/task-configuration.ts:13
The group name to which this task belongs.
inputs?
optionalinputs?:MaybeArray<Declaration>
Defined in: packages/nadle/src/core/interfaces/task-configuration.ts:47
Input declaration for the task. Declare any files, directories or globs that the task reads from. These are used for cache key generation.
maxCacheEntries?
optionalmaxCacheEntries?:number
Defined in: packages/nadle/src/core/interfaces/task-configuration.ts:70
Maximum number of cache entries to keep for this task.
When exceeded, the oldest entries are evicted.
Overrides the global maxCacheEntries setting.
outputs?
optionaloutputs?:MaybeArray<Declaration>
Defined in: packages/nadle/src/core/interfaces/task-configuration.ts:54
Output declaration for the task. Declare any files or directories that the task produces. These are used for caching, restoring, and cleanup.
retries?
optionalretries?:number
Defined in: packages/nadle/src/core/interfaces/task-configuration.ts:84
Number of additional attempts after the first failure (default 0).
The task runs up to 1 + retries attempts and fails only if all fail.
Must be a non-negative integer.
timeout?
optionaltimeout?:number
Defined in: packages/nadle/src/core/interfaces/task-configuration.ts:77
Maximum time in milliseconds a single execution attempt may take. An attempt that does not settle in time fails with a timeout error (eligible for retry). Must be a positive integer.
workingDir?
optionalworkingDir?:string
Defined in: packages/nadle/src/core/interfaces/task-configuration.ts:40
Changes the working directory for the task.
Methods
onlyIf()?
optionalonlyIf(params):unknown
Defined in: packages/nadle/src/core/interfaces/task-configuration.ts:25
Predicate deciding whether this task's body runs. Evaluated at execution time, before cache validation, so it may observe what dependencies produced. A falsey result skips the task; dependents still run.
Parameters
params
context
options
Options
Returns
unknown