/** * cli:derive-nav-resources — validate.ts */ import { DeriveNavResourcesInputSchema } from './types.js' import type { ValidationResult } from './types.js' export function validate(raw: unknown): ValidationResult { const parsed = DeriveNavResourcesInputSchema.safeParse(raw) if (!parsed.success) { return { valid: false, errors: parsed.error.issues.map((i) => `${i.path.join('.') || '(root)'}: ${i.message}`), warnings: [], } } return { valid: true, errors: [], warnings: [], spec: parsed.data } }