mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-22 02:06:42 +02:00
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:
parent
5ae7f99fe1
commit
b768a0ffce
16 changed files with 414 additions and 252 deletions
6
packages/shared-rss/src/index.ts
Normal file
6
packages/shared-rss/src/index.ts
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
export type { NormalizedFeedItem, ExtractedArticle, DiscoveredFeed, FeedValidation } from './types';
|
||||
export { DEFAULT_USER_AGENT } from './types';
|
||||
export { parseFeedUrl, parseFeedXml, parseFeedMeta, type ParsedFeed } from './parse';
|
||||
export { extractFromUrl, extractFromHtml } from './extract';
|
||||
export { discoverFeeds, discoverFeedsFromSite, probeCommonPaths } from './discover';
|
||||
export { validateFeed } from './validate';
|
||||
Loading…
Add table
Add a link
Reference in a new issue