MCPcopy Index your code
hub / github.com/simstudioai/sim / parseFile

Method parseFile

apps/sim/lib/file-parsers/md-parser.ts:9–22  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

7
8export class MdParser implements FileParser {
9 async parseFile(filePath: string): Promise<FileParseResult> {
10 try {
11 if (!filePath) {
12 throw new Error('No file path provided')
13 }
14
15 const buffer = await readFile(filePath)
16
17 return this.parseBuffer(buffer)
18 } catch (error) {
19 logger.error('MD file error:', error)
20 throw new Error(`Failed to parse MD file: ${(error as Error).message}`)
21 }
22 }
23
24 async parseBuffer(buffer: Buffer): Promise<FileParseResult> {
25 try {

Callers

nothing calls this directly

Calls 3

parseBufferMethod · 0.95
readFileFunction · 0.85
errorMethod · 0.80

Tested by

no test coverage detected