Skip to content

LoadLayeredOptions

Defined in: cli/datapad/src/load-layered/load-layered.type.ts:4

Options for loading a dedicated config file layered over a fallback file’s key.

T = unknown

optional coerce?: (raw) => T | undefined

Defined in: cli/datapad/src/load-layered/load-layered.type.ts:28

Turns each layer’s raw value — the dedicated file’s default export, and the fallback’s [key] — into the shape being merged, before the merge. Return undefined to treat the layer as absent. For configs that accept shorthand (a bare array standing for { tasks: [...] }).

unknown

T | undefined


cwd: string

Defined in: cli/datapad/src/load-config-file/load-config-file.type.ts:4

Directory to start looking in.

LoadConfigFileOptions.cwd


optional extensions?: readonly string[]

Defined in: cli/datapad/src/load-config-file/load-config-file.type.ts:8

Override the extension probe order.

LoadConfigFileOptions.extensions


optional fallback?: object

Defined in: cli/datapad/src/load-layered/load-layered.type.ts:10

When no dedicated <name>.config.* exists — or in addition to it — read <file>.config.* and take its [key]. The dedicated file (if any) is merged on top.

file: string

Base name of the fallback file, read as <file>.config.*.

key: string

The key in the fallback file whose value is taken.

optional preloaded?: Loaded<object> | null

The <file>.config.* already loaded by the caller (null: it was looked for and isn’t there). Used as is instead of loading it again; leave it undefined to have loadLayered find and load it.


name: string

Defined in: cli/datapad/src/load-config-file/load-config-file.type.ts:6

Base name — "holocron" resolves holocron.config.{ts,js,mjs,cjs,json}.

LoadConfigFileOptions.name


optional walkUp?: boolean

Defined in: cli/datapad/src/load-config-file/load-config-file.type.ts:16

Walk upward through ancestor directories when cwd itself has no match, stopping at the first directory containing a .git entry (that directory is still searched before stopping) or the filesystem root. Off by default — exact-cwd-only, unchanged behavior for any existing caller that doesn’t pass this.

LoadConfigFileOptions.walkUp