#!/usr/bin/env node
/**
 * Dashboard 契约轻量自检
 *   node node_modules/@tfdesign/dashboard/scripts/check-tfds-contract.mjs
 */
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import { printContractReport } from './lib/contract-scan-core.mjs';
import { runDashboardContract } from './lib/contract-rules-dashboard.mjs';

const projectRoot = path.resolve(process.env.TFDS_PROJECT_ROOT || process.cwd());
const { issues, ok } = runDashboardContract({ projectRoot });
printContractReport(projectRoot, issues, ok, 'tfds-dashboard-contract-check');
process.exit(issues.length > 0 ? 1 : 0);
