UNPKG

@supernovaio/cli

Version:

Supernova.io Command Line Interface

22 lines (20 loc) 1.06 kB
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="e5bdf7dc-ca25-514e-8f1e-68e4efc878e2")}catch(e){}}(); import { mapToSupernovaProperty } from "./property.js"; import path from "node:path"; export function mapToSupernovaComponent(component, entryPath) { return { exportName: component.exportName, exportType: component.exportType, description: component.description, tags: component.tags ?? null, componentPath: path.relative(entryPath, component.filePath), properties: Object.entries(component.props).reduce((acc, [name, property]) => { if (property.name !== "key") { acc[name] = mapToSupernovaProperty(property, entryPath); } return acc; }, {}), }; } //# sourceMappingURL=component.js.map //# debugId=e5bdf7dc-ca25-514e-8f1e-68e4efc878e2