MCPcopy Create free account
hub / github.com/arctic-cli/interface / parse

Function parse

packages/arctic/src/config/markdown.ts:17–32  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

15 }
16
17 export async function parse(filePath: string) {
18 const template = await Bun.file(filePath).text()
19
20 try {
21 const md = matter(template)
22 return md
23 } catch (err) {
24 throw new FrontmatterError(
25 {
26 path: filePath,
27 message: `Failed to parse YAML frontmatter: ${err instanceof Error ? err.message : String(err)}`,
28 },
29 { cause: err },
30 )
31 }
32 }
33
34 export const FrontmatterError = NamedError.create(
35 "ConfigFrontmatterError",

Callers

nothing calls this directly

Calls 1

textMethod · 0.65

Tested by

no test coverage detected