@luna-oss/catalog
v5.0.0
Published
Headless catalog API: reads the Moon component metadata manifest and serves it to agents and tooling.
Readme
@luna-oss/catalog
Headless catalog API for the Moon Design System. Reads the metadata manifest
shipped by @luna-oss/core and exposes it as a typed function plus a CLI that
prints JSON.
Library use
import { getMoonComponentCatalog } from "@luna-oss/catalog";
const catalog = await getMoonComponentCatalog();
console.log(catalog.components.map((c) => c.name));You can also point the loader at a custom manifest:
const catalog = await getMoonComponentCatalog({
metadataPath: "./fixtures/metadata.json"
});CLI
npx luna-catalog | jq '.components[].name'The CLI is the binary registered as luna-catalog and prints the same payload
as the library function to stdout.
