Files
pi-native-hooks/examples/policies/harness-tools-verification.ts
T

9 lines
714 B
TypeScript

import type { VerificationPolicy } from "pi-native-hooks/policy";
const manifests = new Set(["package.json", "package-lock.json", "tsconfig.json"]);
const behavior = (path: string) => /^(extensions|scripts|services|skills|config)\//.test(path) || manifests.has(path);
const types = (path: string) => /\.tsx?$/.test(path) || manifests.has(path);
export default { kind: "verification", id: "harness-tools-verification", project: { matches: (project) => project.packageName === "harness-tools" }, requirements: [
{ id: "tests", command: "npm test", cwd: "project-root", affects: behavior },
{ id: "typecheck", command: "npm run typecheck", cwd: "project-root", affects: types },
] } satisfies VerificationPolicy;