Serve the News layer without a news server: GDELT, Liveuamap and World News API

With GEV_NEWS_ORIGIN unset, Core answers the News layer's routes itself.

Conflicts need no key: the last 24 h of GDELT 2.0 event exports, physical
violence only (CAMEO 18-20), one report per story (copies of one agency
story merged), placed where GDELT put it, a town the article's own words
name winning over a bare country, and titled by the article's page title
from the GKG export of the same quarter hour (the newest 3 h), else by its
address words. GDELT's actor coding is never shown. Exports are read up to
the newest GDELT lists; one that cannot be read is given up on without
holding the rest back, and an outage of two hours answers 502 rather than
an empty feed. With LIVEUAMAP_API_KEY, Liveuamap's mapped items join them.

Local reads World News API by the source country at the view centre
(WORLDNEWSAPI_KEY, at most WORLDNEWSAPI_DAILY_READS a day), with the
Conflicts reports placed inside the area. Disputed areas (11 from Natural
Earth, bundled) and territories without a country code are named as
themselves and read from no country's outlets; a country's outline leaves
them out.

Categories, relevance and severity come from shared rules; keyed answers
are cached and served while they refresh, and no key or address is logged.
This commit is contained in:
Denis Groshev committed 2026-11-06 00:45:31 +01:00
1 parent edb5837ae5
commit 34c75ff5de
13 files changed
+4399 -32

No files matched your search

+10
View File
@@ -496,7 +496,17 @@
"exports": ["./server/providers/news"],
"modules": [
"server/providers/news.js",
"server/providers/news/keyed.js",
"server/providers/news/categorize.js",
"server/providers/news/areas.js",
"server/providers/news/gdeltEvents.js",
"server/providers/news/upstream.js",
"server/providers/common/http.js",
"src/data/adminBoundaries.js",
"src/data/bundledJson.js",
"src/data/retryableLoad.js",
"src/data/local_data/natural_earth/countries.json",
"src/data/local_data/natural_earth/disputed_areas.json",
"src/layers/news/source.js",
"src/layers/news/records.js",
"src/sources/httpBody.js",