Node tests / test (push) Has been cancelled
## Summary - Install c8 (coverage), ESLint, and Prettier as devDependencies - Add .eslintrc.json with Node.js/async-safe rules - Add .prettierrc.json for code formatting consistency - Add .nycrc.json with 80% coverage targets for statements/lines/functions, 75% for branches - Update npm test script to use c8 for coverage reporting (generates HTML + text reports) - Add lint, lint:fix, and format npm scripts ## Baseline Coverage Initial run shows 26.4% line coverage, well below 80% target. Modules with 0% coverage: - src/index.js (main entry point) - src/crawler/* (RSS, scraper, X/Twitter crawlers) - src/publisher/wordpress.js (WordPress integration) - src/listener/* (RSS listener) - src/writer/ai.js (AI news writing) These are high-risk modules that need test expansion per BIT-2861. Implements BIT-2837 Phase 1 per plan. Paperclip-Run-Id: fb08becb-e019-4cb3-ae50-fb72a4b11745
45 lines
1.4 KiB
JSON
45 lines
1.4 KiB
JSON
{
|
|
"name": "ai-news-writer",
|
|
"version": "0.1.0",
|
|
"description": "AI-powered autonomous news writing system with RSS/social listening, journalist AI, and WordPress export",
|
|
"main": "src/index.js",
|
|
"scripts": {
|
|
"start": "node src/index.js",
|
|
"dev": "nodemon src/index.js",
|
|
"write": "node src/index.js write",
|
|
"listen": "node src/index.js listen",
|
|
"pm2:start": "pm2 start ecosystem.config.cjs",
|
|
"verify:deploy": "bash tools/verify-deploy.sh",
|
|
"wp:test": "node src/index.js wp:test",
|
|
"wp:probe-xmlrpc": "node src/index.js wp:probe-xmlrpc",
|
|
"rss:test": "node src/index.js rss:test",
|
|
"x:test": "node src/index.js x:test",
|
|
"ops:check": "bash tools/ops-check.sh",
|
|
"deploy:lxc": "bash tools/deploy-lxc.sh",
|
|
"test": "c8 --reporter=text --reporter=html node --test $(find src -type f -name '*.test.js' | sort | tr '\\n' ' ')",
|
|
"lint": "eslint src/",
|
|
"lint:fix": "eslint src/ --fix && prettier --write src/",
|
|
"format": "prettier --write ."
|
|
},
|
|
"dependencies": {
|
|
"axios": "^1.7.9",
|
|
"cheerio": "^1.0.0",
|
|
"dotenv": "^16.4.7",
|
|
"fast-xml-parser": "^4.5.1",
|
|
"node-cron": "^3.0.3",
|
|
"openai": "^4.86.2",
|
|
"rss-parser": "^3.13.0",
|
|
"slugify": "^1.6.6",
|
|
"winston": "^3.17.0"
|
|
},
|
|
"devDependencies": {
|
|
"c8": "^9.1.0",
|
|
"eslint": "^8.56.0",
|
|
"nodemon": "^3.1.9",
|
|
"prettier": "^3.2.5"
|
|
},
|
|
"engines": {
|
|
"node": ">=20"
|
|
}
|
|
}
|