()
| 63 | } |
| 64 | |
| 65 | export function buildLintMetaCatalog() { |
| 66 | const uiRoot = resolveTemplateRoot("BORINGSTACK_UI_DIR", "ui"); |
| 67 | const apiRoot = resolveTemplateRoot("BORINGSTACK_API_DIR", "api"); |
| 68 | |
| 69 | if (!existsSync(uiRoot)) { |
| 70 | throw new Error(`apps/ui not found at ${uiRoot}`); |
| 71 | } |
| 72 | |
| 73 | if (!existsSync(apiRoot)) { |
| 74 | throw new Error(`apps/api not found at ${apiRoot}`); |
| 75 | } |
| 76 | |
| 77 | for (const [label, root, relPath] of [ |
| 78 | ["ui", uiRoot, "scripts/lint-meta/export-catalog.ts"], |
| 79 | ["api", apiRoot, "scripts/lint-meta/export-catalog.ts"], |
| 80 | ]) { |
| 81 | if (!existsSync(join(root, relPath))) { |
| 82 | throw new Error( |
| 83 | `${label} is missing ${relPath}. Ensure apps/ui and apps/api export scripts exist (monorepo checkout).` |
| 84 | ); |
| 85 | } |
| 86 | } |
| 87 | |
| 88 | return { |
| 89 | ui: runJsonExport(uiRoot, "bun", [ |
| 90 | "run", |
| 91 | "scripts/lint-meta/export-catalog.ts", |
| 92 | ]), |
| 93 | api: runJsonExport(apiRoot, "bun", [ |
| 94 | "run", |
| 95 | "scripts/lint-meta/export-catalog.ts", |
| 96 | ]), |
| 97 | }; |
| 98 | } |
| 99 | |
| 100 | function parseMarkdownTableSection(text, heading) { |
| 101 | const sectionRegex = new RegExp( |
no test coverage detected