(toolsTOC: string)
| 129 | } |
| 130 | |
| 131 | function updateReadmeWithToolsTOC(toolsTOC: string): void { |
| 132 | const readmeContent = fs.readFileSync(README_PATH, 'utf8'); |
| 133 | |
| 134 | const beginMarker = '<!-- BEGIN AUTO GENERATED TOOLS -->'; |
| 135 | const endMarker = '<!-- END AUTO GENERATED TOOLS -->'; |
| 136 | |
| 137 | const beginIndex = readmeContent.indexOf(beginMarker); |
| 138 | const endIndex = readmeContent.indexOf(endMarker); |
| 139 | |
| 140 | if (beginIndex === -1 || endIndex === -1) { |
| 141 | console.warn('Could not find auto-generated tools markers in README.md'); |
| 142 | return; |
| 143 | } |
| 144 | |
| 145 | const before = readmeContent.substring(0, beginIndex + beginMarker.length); |
| 146 | const after = readmeContent.substring(endIndex); |
| 147 | |
| 148 | const updatedContent = before + '\n\n' + toolsTOC + '\n' + after; |
| 149 | |
| 150 | fs.writeFileSync(README_PATH, updatedContent); |
| 151 | console.log('Updated README.md with tools table of contents'); |
| 152 | } |
| 153 | |
| 154 | function generateConfigOptionsMarkdown(): string { |
| 155 | let markdown = ''; |
no outgoing calls
no test coverage detected