refactor(shared-rss): extract RSS parsing + Readability into one package

news-ingester and apps/api both shipped their own copy of rss-parser
+ jsdom + Readability glue. Single source now in packages/shared-rss.
Adds discoverFeeds (rel=alternate + common-paths probe) and validateFeed
which News Research will use. JSDOM virtualConsole is silenced once,
in the package, instead of in two parallel call sites.

- packages/shared-rss: parse, extract, discover, validate
- services/news-ingester: drop local parsers, depend on @mana/shared-rss
- apps/api: drop @mozilla/readability + jsdom direct deps, use shared

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Till JS 2026-04-15 22:30:44 +02:00
parent 5ae7f99fe1
commit b768a0ffce
16 changed files with 414 additions and 252 deletions

View file

@ -16,20 +16,18 @@
"@ai-sdk/openai-compatible": "^2.0.41",
"@mana/media-client": "workspace:*",
"@mana/shared-hono": "workspace:*",
"@mana/shared-rss": "workspace:*",
"@mana/shared-storage": "workspace:*",
"@mana/shared-types": "workspace:^",
"@mozilla/readability": "^0.5.0",
"ai": "^6.0.154",
"drizzle-orm": "^0.38.0",
"hono": "^4.7.0",
"jsdom": "^25.0.0",
"postgres": "^3.4.0",
"rrule": "^2.8.1",
"zod": "^3.23.0"
},
"devDependencies": {
"@types/bun": "latest",
"@types/jsdom": "^21.1.0",
"drizzle-kit": "^0.30.0",
"typescript": "^5.8.0"
}