Created
July 6, 2025 22:20
-
-
Save possibilities/71cd444268b012a7c357c875c2e79ead to your computer and use it in GitHub Desktop.
Function signatures for fs-to-xml pipeline
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Function Pipeline Signatures | |
| // ============ parseContent ============ | |
| // From src/parse-content.ts | |
| interface AstNode { | |
| type: string | |
| [key: string]: any | |
| } | |
| interface TextLine { | |
| type: 'text' | |
| content: string | |
| children?: ParsedLine[] | |
| } | |
| interface CommandLine { | |
| type: 'command' | |
| content: string | |
| commandName: string | |
| ast?: AstNode | |
| statusCode?: number | |
| stdout?: string | |
| stderr?: string | |
| children?: ParsedLine[] | |
| } | |
| type ParsedLine = TextLine | CommandLine | |
| export function parseContent(input: string): ParsedLine[] | |
| // ============ validateCommands ============ | |
| // From src/validate-commands.ts | |
| interface ParsedLine { | |
| type: string | |
| ast?: AstNode | |
| children?: ParsedLine[] | |
| [key: string]: any | |
| } | |
| export function validateCommands(lines: ParsedLine[]): ParsedLine[] | |
| // ============ executeCommands ============ | |
| // From src/execute-commands.ts | |
| interface ParsedLine { | |
| type: string | |
| content?: string | |
| commandName?: string | |
| statusCode?: number | |
| stdout?: string | |
| stderr?: string | |
| children?: ParsedLine[] | |
| [key: string]: any | |
| } | |
| export function executeCommands(lines: ParsedLine[]): ParsedLine[] | |
| // ============ renderTags ============ | |
| // From src/render-tags.ts | |
| interface ParsedLine { | |
| type: string | |
| children?: ParsedLine[] | |
| [key: string]: any | |
| } | |
| interface RenderOptions { | |
| indent?: string | |
| } | |
| export function renderTags( | |
| lines: ParsedLine[], | |
| options: RenderOptions = {}, | |
| ): string | |
| // ============ Complete Pipeline ============ | |
| // parseContent(string) → validateCommands(ParsedLine[]) → executeCommands(ParsedLine[]) → renderTags(ParsedLine[]) → string |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment