import { Logger } from "../shared/logger.js"; /** * Audit suite — a YAML-defined pipeline of audits that an operator * can codify per-project and check into version control. Lets teams * standardise their hygiene policy without each operator memorising * the right flags. * * File shape: * * version: 1 * name: monthly-hygiene * audits: * - name: broken-links * options: * root: /sitecore/content/MySite * limit: 1000 * - name: duplicates * options: * min-group-size: 3 * - name: stale-content * options: * not-updated-in-days: 180 * output: * format: markdown * path: ./reports/{date}.md * baseline: * enabled: true * update-on-success: false * * Output path templating: * {date} — YYYY-MM-DD * {datetime} — YYYY-MM-DDTHH-mm-ss * {env} — environment name * {suite} — suite `name:` from the file */ export interface AuditSuiteFile { version: number; name: string; audits: AuditSuiteEntry[]; output?: { format?: "json" | "csv" | "markdown"; path?: string; }; baseline?: { enabled?: boolean; "update-on-success"?: boolean; }; } export interface AuditSuiteEntry { name: string; /** Free-form per-audit options. Validated by the audit task itself. */ options?: Record; } export declare const loadAuditSuite: (filePath: string, logger?: Logger) => AuditSuiteFile; /** * Substitute templated tokens in an output path. * {date} — YYYY-MM-DD * {datetime} — YYYY-MM-DDTHH-mm-ss * {env} — environment name * {suite} — suite name */ export declare const expandOutputPath: (template: string, context: { envName: string; suiteName: string; now?: Date; }) => string; /** * Convert audit suite entries to the option shape `runAuditAll` * expects. The suite declares one entry per audit with free-form * options; `runAuditAll` takes a flat options object with `include` * (which audits) and shared defaults. * * Because `runAuditAll` shares one option object across all sub-audits, * per-audit option overrides aren't directly expressible — operators * who need per-audit knobs run them individually rather than through * a suite. The suite covers the common "run this set with these * shared options" case. * * Returns the suite's audit names plus the merged shared options. */ export declare const auditSuiteToRunnerInput: (suite: AuditSuiteFile) => { include: string[]; sharedOptions: Record; };