@gluonjs/quarks / packages/quarks/src / ComponentLibraryManifestValidation
Interface: ComponentLibraryManifestValidation
Properties
errors
readonlyerrors: readonlystring[]
valid
readonlyvalid:boolean
Example
Inspect all structural manifest errors before handing records to an explicit consumer-owned loader:
import { validateComponentLibraryManifest, type ComponentLibraryEntry, type ComponentLibraryManifest, type ComponentLibraryManifestValidation } from '@gluonjs/quarks';
const entry = {
id: 'product-configurator',
module: '@acme/shop-components/product-configurator',
exportName: 'ProductConfigurator',
layer: 'element',
tag: 'acme-product-configurator',
styles: ['acme-product-configurator'],
dependencies: [],
accessibility: 'Uses labelled native choices.',
} as const satisfies ComponentLibraryEntry;
const manifest = { schemaVersion: 1, name: '@acme/shop-components', entries: [entry] } as const satisfies ComponentLibraryManifest;
const result: ComponentLibraryManifestValidation = validateComponentLibraryManifest(manifest);
if (!result.valid) throw new Error(result.errors.join('\n'));
console.log(manifest.entries[0]?.module);