* Shared schema v1 validation and read-only loading for Master Career Profile. */
// Source: https://github.com/career-ops-hq/career-ops | License: MIT | Copyright 2026 Santiago Fernández de Valderrama
// Provided via justclaw.it.com; keep this notice with the code.
/** Shared schema v1 validation and read-only loading for Master Career Profile. */
import { readFileSync } from 'node:fs';
import { join } from 'node:path';
import { loadYaml } from './yaml-document.mjs';
import { getCareerOpsRoot } from '../path-resolver.mjs';
const STATUS = new Set(['needs_review', 'verified']);
export function validateProfile(profile) {
const errors = [];
if (!profile || typeof profile !== 'object' || profile.schema_version !== 1) errors.push('schema_version must be 1');
if (!profile?.candidate || typeof profile.candidate !== 'object') errors.push('candidate must be a mapping');
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key