expose block defs and paths

This commit is contained in:
Loren Norman 2025-06-12 12:26:31 -04:00
parent 7ed7cd21f5
commit 6c550e2984

View file

@ -33,8 +33,7 @@ const
})
)
)
},
allBlockDefinitionsAndPaths = await gatherBlockFiles()
}
// definitions
const
@ -90,7 +89,9 @@ export const
importBlockJson = async () =>
sortBy(compact(map(await gatherBlockFiles(), processBlock)), "type"),
// all definitions
// defs and paths
allBlockDefinitionsAndPaths = await gatherBlockFiles(),
// just the definitions
allBlockDefinitions = keyBy(compact(map(allBlockDefinitionsAndPaths, "definition")), "type"),
// without disabled definitions
blockDefinitions = omitBy(allBlockDefinitions, def => def.disabled),