Archived
- scripts/gate/gate.sh: 3-stage gate — 1) gitleaks, 2) build
(tsc on commit, full next build on push), 3) LLM parse contract
tests. Fail-closed: setup errors, timeouts, and findings all block.
- scripts/gate/hooks/{pre-commit,pre-push}: exec gate.sh commit|push.
- scripts/install/install-hooks.sh: idempotent installer (verifies repo
root, bootstraps pinned gitleaks 8.30.1 if absent, wires both hooks).
- scripts/install/bootstrap-gitleaks.sh: pinned per-user install,
x86_64/arm64, GitHub release download + SHA-less checksum pin.
- .gitleaks.toml: useDefault=true; single allowlist = .env.example
placeholder lines (secret= and change-me values) by path+regex.
Real secrets — even inside .env.example — still trip the gate
(empirically verified: OpenAI/AWS/Slack/GitHub tokens all caught).
- tests/llm-parse.test.ts: pins parse.ts contracts (strict 6-paragraph
body, headline/scalar/or array rejection, stopword rules, tag
fallback) — the choke point for LLM output parsing.
- package.json: 'test' script.
- README: 'Commit gate' section (install, stages, verified fail-closed
modes).
Verified before commit: clean tree PASSes all 3 stages; staged
realistic secret FAILs stage 1 (exit 1); broken type FAILs stage 2;
broken assertion FAILs stage 3; next build exit 0.
47 lines
1.2 KiB
JSON
47 lines
1.2 KiB
JSON
{
|
|
"name": "maple-brief-aggregator",
|
|
"version": "1.0.0",
|
|
"private": true,
|
|
"description": "Automated Canadian news aggregator with AI-assisted content synthesis and Google AdSense integration.",
|
|
"scripts": {
|
|
"dev": "next dev",
|
|
"build": "prisma generate && next build",
|
|
"start": "next start",
|
|
"typecheck": "tsc --noEmit",
|
|
"test": "tsx tests/llm-parse.test.ts",
|
|
"db:generate": "prisma generate",
|
|
"db:push": "prisma db push",
|
|
"db:seed": "tsx prisma/seed.ts",
|
|
"db:studio": "prisma studio",
|
|
"migrate": "prisma migrate dev --name init"
|
|
},
|
|
"prisma": {
|
|
"seed": "tsx prisma/seed.ts"
|
|
},
|
|
"dependencies": {
|
|
"@prisma/client": "^5.19.0",
|
|
"cheerio": "^1.0.0",
|
|
"next": "^14.2.35",
|
|
"node-cron": "^3.0.3",
|
|
"react": "18.3.1",
|
|
"react-dom": "18.3.1",
|
|
"rss-parser": "^3.13.0"
|
|
},
|
|
"devDependencies": {
|
|
"@resvg/resvg-js": "^2.6.2",
|
|
"@types/node": "^20",
|
|
"@types/node-cron": "^3.0.11",
|
|
"@types/react": "^18",
|
|
"@types/react-dom": "^18",
|
|
"autoprefixer": "^10.4.20",
|
|
"postcss": "^8.4.47",
|
|
"prisma": "^5.19.0",
|
|
"tailwindcss": "^3.4.13",
|
|
"tsx": "^4.19.1",
|
|
"typescript": "^5.6.2"
|
|
},
|
|
"engines": {
|
|
"node": ">=18.17"
|
|
}
|
|
}
|