mirror of
https://github.com/stablyai/orca.git
synced 2026-11-04 11:07:42 +00:00
The three ipc modules re-exported symbols owned elsewhere. Importers and test mocks now name the defining module, and the re-export lines are gone (no barrels).
29 lines
1.1 KiB
TypeScript
29 lines
1.1 KiB
TypeScript
import { spawnBundledRipgrep } from '../ripgrep/bundled-ripgrep-spawn'
|
|
import { stopBundledRipgrep } from '../ripgrep/bundled-ripgrep-stop'
|
|
import { resolveBundledRipgrepWslRouting } from '../ripgrep/bundled-ripgrep-wsl-routing'
|
|
import {
|
|
collectMarkdownDocuments,
|
|
MARKDOWN_DOCUMENT_LISTING_ARGS
|
|
} from '../../shared/node-markdown-document-listing'
|
|
import type { MarkdownDocument } from '../../shared/filesystem-entry-types'
|
|
|
|
export async function listMarkdownDocuments(
|
|
rootPath: string,
|
|
options: { wslDistro?: string; signal?: AbortSignal } = {}
|
|
): Promise<MarkdownDocument[]> {
|
|
options.signal?.throwIfAborted()
|
|
const { wslDistro, wslDistroForOutput: distro } = resolveBundledRipgrepWslRouting(
|
|
rootPath,
|
|
options.wslDistro
|
|
)
|
|
const child = spawnBundledRipgrep(MARKDOWN_DOCUMENT_LISTING_ARGS, {
|
|
cwd: rootPath,
|
|
wslDistro,
|
|
wslDistroForOutput: distro,
|
|
stdio: ['ignore', 'pipe', 'pipe']
|
|
})
|
|
return collectMarkdownDocuments(child, rootPath, Boolean(distro), options.signal, {
|
|
stopProcess: () => stopBundledRipgrep(child, Boolean(distro))
|
|
})
|
|
}
|