ResolveOptions
External state the resolver may consult after parsing.
The resolver never reaches into process, files, or terminal APIs directly; callers inject those facts through this contract.
- Import:
@kjanat/dreamcli - Export kind: interface
- Declared in:
src/core/resolve/contracts.ts - Source link:
src/core/resolve/contracts.ts:63
Signatures
interface ResolveOptions {}Members
Properties
config
Parsed config file contents keyed by dotted path segments.
config?: Readonly<Record<string, unknown>>;env
Environment variable snapshot injected by the caller.
env?: Readonly<Record<string, string | undefined>>;envPrefix
Environment namespace prepended to every relative env binding, the count and templates of an indexed family included. A binding declared absolute is read as written. Diagnostics and provenance name the concrete variable.
envPrefix?: string;mkdir
Recursive directory creation for flag.path() and arg.path() create checks. When absent, missing paths are not created and existence rules apply as-is.
mkdir?: { (path: string): Promise<void>; };pathChecks
What happens to a declared filesystem check that cannot run because ResolveOptions.stat (or ResolveOptions.mkdir for create) is absent.
'lenient'— the check is skipped and recorded in ResolveResult.skippedPathChecks, so a result can still report that it was never exercised.'strict'— resolution fails with aCLIErrorof code'PATH_CHECK_SKIPPED'(exit code1) naming every skipped input, for tests that must exercise each declared check.
Only inputs that resolved a path value are affected: an unset optional path has nothing to check in production either.
pathChecks?: "strict" | "lenient";prompter
Interactive prompt engine; absent in non-TTY / CI contexts.
prompter?: PromptEngine;stat
Filesystem probe for flag.path() and arg.path() checks: what exists at the path, or null when nothing does. When absent, path checks are skipped.
stat?: { (path: string): Promise<"file" | "directory" | null>; };stdinData
Pre-read stdin content, or null when stdin was not piped.
stdinData?: string | null;