Skip to content

AstromechOptions

Defined in: cli/astromech/src/astromech.type.ts:11

Everything createAstromech needs from the repo and the outside world; only cwd is required.

optional config?: TasksConfig

Defined in: cli/astromech/src/astromech.type.ts:19

The resolved task manifest. Optional for run (which is filesystem-driven); thinCallers / packageScripts / ci need it. Load it with loadTasksConfig from @theholocron/astromech/config.


cwd: string

Defined in: cli/astromech/src/astromech.type.ts:13

Repo root.


optional env?: Record<string, string | undefined>

Defined in: cli/astromech/src/astromech.type.ts:47

Injectable environment for --affected (tests). Defaults to process.env.


optional exec?: ExecFn

Defined in: cli/astromech/src/astromech.type.ts:39

Injectable subprocess runner (tests). Defaults to spawnSync (stdio inherit).


optional fileExists?: (path) => boolean

Defined in: cli/astromech/src/astromech.type.ts:43

Injectable existence check (tests). Defaults to node:fs.

string

boolean


optional listDir?: (path) => string[]

Defined in: cli/astromech/src/astromech.type.ts:45

Injectable directory listing (tests). Defaults to node:fs.

string

string[]


optional logger?: RunLogger

Defined in: cli/astromech/src/astromech.type.ts:33

Structured-logging sink. Defaults to a no-op.


optional lookPath?: (cwd, bin) => string | null

Defined in: cli/astromech/src/astromech.type.ts:49

Injectable binary lookup (tests). Default checks node_modules/.bin then PATH.

string

string

string | null


optional orgContext?: OrgContext

Defined in: cli/astromech/src/astromech.type.ts:24

Org context for the deploy workflow’s preview: shorthand — used to derive the Cloudflare Pages project / domain when they are not spelt out.


optional print?: (line) => void

Defined in: cli/astromech/src/astromech.type.ts:35

User-facing line printer. Defaults to console.log.

string

void


optional readFile?: (path) => string

Defined in: cli/astromech/src/astromech.type.ts:41

Injectable fs (tests). Default to node:fs.

string

string


optional statusContexts?: readonly StatusContext[]

Defined in: cli/astromech/src/astromech.type.ts:31

The commit statuses a coverage provider reports (Coverage.statusContexts(), names only), which the CLI passes in because astromech imports no provider. Astromech.requiredChecks adds the required ones and Astromech.aggregateCaller treats them as the aggregate’s statuses. Left out, a context starting with codecov/ is a status and nothing is added, which is what a run with no provider loaded does.


optional warn?: (line) => void

Defined in: cli/astromech/src/astromech.type.ts:37

Where a deprecation notice goes (an old task name, a group name). Defaults to console.error, so it is on stderr.

string

void