/** * routes:check — every public route of this site (REST, GraphQL, Next route files) against the judged list in * e2e/routes.snapshot.json (docs/security.md "Routes nobody has judged"). Reads the config only, never the database. * pnpm payload run e2e/routes.ts → fails on a route nobody has judged * pnpm payload run e2e/routes.ts update → adds new routes with an empty reason (judge them), drops gone ones * (`payload run` drops `--flags`, so the word is `update`.) From the plugin repository: pnpm routes:check [--update], * also the first step of pnpm e2e:built. */ import config from '@payload-config' import { runRouteCheck } from '@intecion/ipal-kit/doctor' process.exit(await runRouteCheck({ config: await config, update: process.argv.slice(2).includes('update') }))