also exported from index.ts
(options: DiscoverSourceFilesOptions): Promise<DiscoverSourceFilesResult> import {discoverSourceFiles} from 'svelte-docinfo/discovery.js'; Discover source files from a project root.
Used internally by analyzeFromFiles for the discovery step. Standalone consumers can call it directly when they want the discovered file list without running full analysis.
Strategy is selected by discovery (see Discovery). Exclusion globs come
from sourceOptions.exclude, also applied at analysis time by isSource();
the always-on baseline (hasBaselineExcludedSegment) applies beneath it at
both stages.
options
discovery configuration
returns
Promise<DiscoverSourceFilesResult>
discovered files (content loaded) and any diagnostics from the exports step
throws
Error- when `include` is combined with `discovery: 'exports'`, when an absolute `include` pattern falls outside `projectRoot`, or in strict `'exports'` mode when `exports` is missing, resolves to no source files, or can't map a multi-`sourcePaths` layout with no common prefix
examples
const sourceOptions = createSourceOptions(process.cwd());
const {files, diagnostics} = await discoverSourceFiles({sourceOptions});