()
| 3828 | } |
| 3829 | |
| 3830 | async function generateAllBlockDocs() { |
| 3831 | try { |
| 3832 | // Copy icons from sim app to docs app |
| 3833 | copyIconsFile() |
| 3834 | |
| 3835 | // Generate icon mappings from block definitions |
| 3836 | const docsIconMapping = await generateIconMapping({ includeHidden: true }) |
| 3837 | const visibleIconMapping = await generateIconMapping({ includeHidden: false }) |
| 3838 | writeIconMapping(docsIconMapping) |
| 3839 | |
| 3840 | // Generate landing integrations page data (JSON + icon mapping) |
| 3841 | await writeIntegrationsJson(visibleIconMapping) |
| 3842 | writeIntegrationsIconMapping(visibleIconMapping) |
| 3843 | |
| 3844 | // Compute the canonical set of tool docs and clean up anything stale — |
| 3845 | // covers hidden blocks AND blocks re-categorized away from `'tools'`. |
| 3846 | const validToolDocs = await getCanonicalToolDocNames() |
| 3847 | cleanupStaleToolDocs(validToolDocs) |
| 3848 | |
| 3849 | const blockFiles = (await glob(`${BLOCKS_PATH}/*.ts`)).sort() |
| 3850 | |
| 3851 | for (const blockFile of blockFiles) { |
| 3852 | await generateBlockDoc(blockFile) |
| 3853 | } |
| 3854 | |
| 3855 | // Merge trigger sections into the per-service pages (and write trigger-only pages) |
| 3856 | await generateAllTriggerDocs() |
| 3857 | |
| 3858 | // Write the integrations meta after both passes so trigger-only pages are included |
| 3859 | updateMetaJson() |
| 3860 | |
| 3861 | return true |
| 3862 | } catch (error) { |
| 3863 | console.error('Error generating documentation:', error) |
| 3864 | return false |
| 3865 | } |
| 3866 | } |
| 3867 | |
| 3868 | function updateMetaJson() { |
| 3869 | const metaJsonPath = path.join(DOCS_OUTPUT_PATH, 'meta.json') |
no test coverage detected