ManifestDiscoveryOptions
Options for discoverManifest.
- Import:
@kjanat/dreamcli - Export kind: interface
- Declared in:
src/core/config/package-json.ts - Source link:
src/core/config/package-json.ts:110
Signatures
interface ManifestDiscoveryOptions {}Members
Properties
files
Candidate manifest filenames, in per-directory priority order (e.g. ['deno.json', 'jsr.json']). At each directory the first existing file that carries CLI metadata wins, so the nearest manifest directory always takes precedence over file order. A file that parses but holds no recognised metadata (e.g. a config-only deno.json with just tasks/imports) is skipped, so a sibling jsr.json — or a manifest higher up — can still be found. Defaults to ['package.json'].
An empty list is a deliberate no-op: with no candidates to probe, the walk-up reads nothing and resolves to null (consistent with the "returns null when no manifest is found" contract).
files?: readonly string[];startDir
Explicit directory or file path to walk up from. Defaults to adapter.cwd when omitted. Pass an absolute path inside your own package (e.g. fileURLToPath(import.meta.url)) for installable CLIs whose version should reflect the CLI's own package, not the consumer's working directory.
This low-level helper takes a resolved path string only. The builder sugar CLIBuilder.manifest({ from }) exposes the same anchor under the name from and additionally accepts a file: URL string or URL instance, normalizing it to a path first.
startDir?: string;