Skip to main content

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?​

optional cacheVerdict?: 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?​

optional dependsOn?: 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?​

optional description?: string

Defined in: packages/nadle/src/core/interfaces/task-configuration.ts:18

The description of the task.


env?​

optional env?: TaskEnv

Defined in: packages/nadle/src/core/interfaces/task-configuration.ts:35

Environment variables to set when running the task.


group?​

optional group?: string

Defined in: packages/nadle/src/core/interfaces/task-configuration.ts:13

The group name to which this task belongs.


inputs?​

optional inputs?: 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?​

optional maxCacheEntries?: 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?​

optional outputs?: 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?​

optional retries?: 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?​

optional timeout?: 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?​

optional workingDir?: string

Defined in: packages/nadle/src/core/interfaces/task-configuration.ts:40

Changes the working directory for the task.

Methods​

onlyIf()?​

optional onlyIf(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​

RunnerContext

options​

Options

Returns​

unknown