Files
2025-01-30 00:50:58 +01:00

10 lines
1017 B
JSON

[
{
"path": "src/lib/config/logger.ts",
"content": "import { Logger } from 'tslog';\n\nexport const logger = new Logger({\n name: 'markdown-tree-parser',\n type: 'pretty',\n prettyLogTemplate: '{{yyyy}}-{{mm}}-{{dd}} {{hh}}:{{MM}}:{{ss}}:{{ms}} {{logLevelName}} [{{name}}]',\n prettyLogTimeZone: 'local'\n});"
},
{
"path": "src/lib/types/schema.ts",
"content": "import { z } from 'zod';\n\nexport const HeadingNodeSchema = z.lazy(() => z.object({\n title: z.string(),\n depth: z.number(),\n content: z.string().optional(),\n children: z.array(HeadingNodeSchema)\n}));\n\nexport type HeadingNode = z.infer<typeof HeadingNodeSchema>;\n\nexport const MarkdownNodeSchema = z.object({\n type: z.string(),\n depth: z.number().optional(),\n children: z.array(z.lazy(() => MarkdownNodeSchema)).optional(),\n value: z.string().optional(),\n title: z.string().optional(),\n content: z.string().optional()\n});\n\nexport type MarkdownNode = z.infer<typeof MarkdownNodeSchema>;"
}
]</invoke>