UNPKG

standardlint

Version:
33 lines (30 loc) 766 B
import { getJSONFileContents } from "./chunk-K3CM3JAW.mjs"; import { logDefaultPathMessage } from "./chunk-322CAOWI.mjs"; import { calculatePass } from "./chunk-I4KWICZI.mjs"; // src/checks/checkForDefinedRelations.ts function checkForDefinedRelations(severity, basePath, customPath) { const path = customPath || "manifest.json"; const name = "Relations"; const message = "Check for defined relations"; if (!customPath) logDefaultPathMessage(name, path); const serviceMetadata = getJSONFileContents( basePath, path ); const result = serviceMetadata?.relations && serviceMetadata?.relations.length > 0; return { name, status: calculatePass(result, severity), message, path }; } export { checkForDefinedRelations };