MCPcopy Index your code
hub / github.com/simstudioai/sim / checkIntegrationMetaCoverage

Function checkIntegrationMetaCoverage

apps/sim/scripts/check-block-registry.ts:254–274  ·  view source on GitHub ↗

* Every catalog-visible integration block must expose a `BlockMeta` entry in * `BLOCK_META_REGISTRY`. The integration detail pages * (`getTemplatesForBlock`/`getSuggestedSkillsForBlock`) and the landing catalog * read metas by block type; a `tools`-category block that ships in the toolbar * with

()

Source from the content-addressed store, hash-verified

252 * block (e.g. `github_v2`) passes via its base meta.
253 */
254function checkIntegrationMetaCoverage(): CheckResult {
255 const errors: string[] = []
256
257 for (const block of getAllBlocks()) {
258 const isCatalogIntegration = block.category === 'tools' && !block.hideFromToolbar
259 if (!isCatalogIntegration) continue
260
261 if (!getBlockMeta(block.type)) {
262 errors.push(
263 `Block "${block.type}" is a catalog integration (category: 'tools', not hidden) but has no BlockMeta.\n` +
264 ` → Export a \`${block.type}\`-keyed \`{Service}BlockMeta\` (tags + templates + skills) from its block file\n` +
265 ' and register it in BLOCK_META_REGISTRY (apps/sim/blocks/registry-maps.ts), alphabetically.'
266 )
267 }
268 }
269
270 if (errors.length === 0) {
271 return { kind: 'pass', message: 'Integration meta coverage check passed' }
272 }
273 return { kind: 'fail', errors }
274}
275
276function reportResult(label: string, failureHeader: string, result: CheckResult): boolean {
277 if (result.kind === 'pass') {

Callers 1

Calls 3

getAllBlocksFunction · 0.90
getBlockMetaFunction · 0.90
pushMethod · 0.45

Tested by

no test coverage detected