CliOptions CLI options parsed from command line arguments.
include
File patterns to include (undefined = use exports discovery or defaults).
Array<string>exclude
File patterns to exclude (undefined = use defaults — test and spec files).
When provided, fully replaces the defaults — no array merge. Passing
a custom --exclude pattern drops the default test/spec filters unless
the caller re-includes them explicitly.
Array<string>output
Output file path (undefined = stdout).
stringresolveDependencies
Whether to resolve dependencies. Mapped from the --no-resolve-dependencies
flag (commander populates true by default; false when the flag is passed).
Optional here so external callers can omit it; treated as true when undefined.
booleandiscovery
Discovery strategy (undefined = 'auto').
Mapped from --discovery <auto|exports|glob>.
distDir
Dist directory name for exports-based discovery (undefined = 'dist').
stringsourceDir
Source directories relative to project root (undefined = ['src/lib']).
Repeatable. Drives the implicit include glob in the glob-discovery
fallback (via deriveIncludePatterns inside discoverSourceFiles) so
custom source directories survive without needing an explicit --include.
Array<string>sourceRoot
Source root for module path extraction, relative to project root (undefined = single sourceDir or longest common prefix).
Module paths in output are stripped of <projectRoot>/<sourceRoot>/.
Pass . (or "") to keep module paths project-relative — useful when
sourceDir entries share no common prefix. The . form is normalized
to "" inside normalizeSourceOptions.
stringonDuplicates
Behavior when duplicate declaration names are found across modules
(undefined = emit duplicate_declaration diagnostic, no dispatch).
Duplicate detection always runs regardless of this option — the diagnostic is the data, this option is the dispatch action.
OnDuplicatesFlagonly
Glob patterns to filter the emitted modules array against ModuleJson.path
(undefined = emit all analyzed modules).
Repeatable. Output-only filter: full-project analysis still runs so re-exports,
dependents, and alsoExportedFrom stay correct against the complete owned set.
Diagnostics aren't filtered — they may reference modules dropped from output.
Array<string>quiet
Whether to suppress info messages to stderr. Treated as false when undefined.
booleanpretty
Whether to pretty-print JSON output. Treated as false when undefined.
boolean