@saplings/quality-contracts
v0.17.2
Published
Define typed configuration, suite IDs, execution profiles, and report shapes for the quality tools.
Readme
@saplings/quality-contracts
Define typed configuration, suite IDs, execution profiles, and report shapes for the quality tools.
Install
npm install --save-dev @saplings/quality-contractsQuick start
import { defineQualityConfig, type RunReport } from '@saplings/quality-contracts';
export default defineQualityConfig({
name: 'my-web-app',
environment: 'local',
frontend: { baseUrl: 'http://127.0.0.1:5173', routes: ['/'] },
profiles: { pr: ['frontend:accessibility'] },
});
export function passed(report: RunReport) {
return report.summary.failed === 0 && report.summary.skipped === 0;
}API and integration
defineQualityConfig<T extends QualityConfig>(config: T): Tkeeps the inferred configuration type.SuiteId,SuiteResult, andRunReportare shared by the CLI and adapters.BACKEND_SUITESandFRONTEND_SUITESlist suite names.- Use
@saplings/quality-corefor runtime validation and orchestration or@saplings/clito run the config.
Read the integration guide for configuration and operational details.
