mirror of
https://github.com/koala73/worldmonitor.git
synced 2026-04-25 17:14:57 +02:00
feat(advisories): gold standard migration for security advisories (#1637)
* feat(advisories): gold standard migration for security advisories Move security advisories from client-side RSS fetching (24 feeds per page load) to Railway cron seed with Redis-read-only Vercel handler. - Add seed script fetching via relay RSS proxy with domain allowlist - Add ListSecurityAdvisories proto, handler, and RPC cache tier - Add bootstrap hydration key for instant page load - Rewrite client service: bootstrap -> RPC fallback, no browser RSS - Wire health.js, seed-health.js, and dataSize tracking * fix(advisories): empty RPC returns ok:true, use full country map P1 fixes from Codex review: - Return ok:true for empty-but-successful RPC responses so the panel clears to empty instead of stuck loading on cold environments - Replace 50-entry hardcoded country map with 251-entry shared config generated from the project GeoJSON + aliases, matching coverage of the old client-side nameToCountryCode matcher * fix(advisories): add Cote d'Ivoire and other missing country aliases Adds 14 missing aliases including "cote d ivoire" (US State Dept title format), common article-prefixed names (the Bahamas, the Gambia), and alternative official names (Czechia, Eswatini, Cabo Verde, Timor-Leste). * fix(proto): inject @ts-nocheck via Makefile generate target buf generate does not emit @ts-nocheck, but tsc strict mode rejects the generated code. Adding a post-generation sed step in the Makefile ensures both CI proto-freshness (make generate + diff) and CI typecheck (tsc --noEmit) pass consistently.
This commit is contained in:
267
shared/country-names.json
Normal file
267
shared/country-names.json
Normal file
@@ -0,0 +1,267 @@
|
||||
{
|
||||
"afghanistan": "AF",
|
||||
"aland": "AX",
|
||||
"albania": "AL",
|
||||
"algeria": "DZ",
|
||||
"american samoa": "AS",
|
||||
"andorra": "AD",
|
||||
"angola": "AO",
|
||||
"anguilla": "AI",
|
||||
"antarctica": "AQ",
|
||||
"antigua and barbuda": "AG",
|
||||
"argentina": "AR",
|
||||
"armenia": "AM",
|
||||
"aruba": "AW",
|
||||
"australia": "AU",
|
||||
"austria": "AT",
|
||||
"azerbaijan": "AZ",
|
||||
"bahamas": "BS",
|
||||
"bahrain": "BH",
|
||||
"bangladesh": "BD",
|
||||
"barbados": "BB",
|
||||
"belarus": "BY",
|
||||
"belgium": "BE",
|
||||
"belize": "BZ",
|
||||
"benin": "BJ",
|
||||
"bermuda": "BM",
|
||||
"bhutan": "BT",
|
||||
"bolivia": "BO",
|
||||
"bosnia and herzegovina": "BA",
|
||||
"botswana": "BW",
|
||||
"brazil": "BR",
|
||||
"british indian ocean territory": "IO",
|
||||
"british virgin islands": "VG",
|
||||
"brunei": "BN",
|
||||
"brunei darussalam": "BN",
|
||||
"bulgaria": "BG",
|
||||
"burkina faso": "BF",
|
||||
"burma": "MM",
|
||||
"burundi": "BI",
|
||||
"cabo verde": "CV",
|
||||
"cambodia": "KH",
|
||||
"cameroon": "CM",
|
||||
"canada": "CA",
|
||||
"cape verde": "CV",
|
||||
"cayman islands": "KY",
|
||||
"central african republic": "CF",
|
||||
"chad": "TD",
|
||||
"chile": "CL",
|
||||
"china": "CN",
|
||||
"colombia": "CO",
|
||||
"comoros": "KM",
|
||||
"cook islands": "CK",
|
||||
"costa rica": "CR",
|
||||
"cote d ivoire": "CI",
|
||||
"cote d'ivoire": "CI",
|
||||
"croatia": "HR",
|
||||
"cuba": "CU",
|
||||
"curaçao": "CW",
|
||||
"cyprus": "CY",
|
||||
"czech republic": "CZ",
|
||||
"czechia": "CZ",
|
||||
"democratic republic of the congo": "CD",
|
||||
"denmark": "DK",
|
||||
"djibouti": "DJ",
|
||||
"dominica": "DM",
|
||||
"dominican republic": "DO",
|
||||
"dr congo": "CD",
|
||||
"east timor": "TL",
|
||||
"ecuador": "EC",
|
||||
"egypt": "EG",
|
||||
"el salvador": "SV",
|
||||
"equatorial guinea": "GQ",
|
||||
"eritrea": "ER",
|
||||
"estonia": "EE",
|
||||
"eswatini": "SZ",
|
||||
"ethiopia": "ET",
|
||||
"falkland islands": "FK",
|
||||
"faroe islands": "FO",
|
||||
"federated states of micronesia": "FM",
|
||||
"fiji": "FJ",
|
||||
"finland": "FI",
|
||||
"france": "FR",
|
||||
"french polynesia": "PF",
|
||||
"french southern and antarctic lands": "TF",
|
||||
"gabon": "GA",
|
||||
"gambia": "GM",
|
||||
"gaza": "PS",
|
||||
"georgia": "GE",
|
||||
"germany": "DE",
|
||||
"ghana": "GH",
|
||||
"gibraltar": "GI",
|
||||
"greece": "GR",
|
||||
"greenland": "GL",
|
||||
"grenada": "GD",
|
||||
"guam": "GU",
|
||||
"guatemala": "GT",
|
||||
"guernsey": "GG",
|
||||
"guinea": "GN",
|
||||
"guinea-bissau": "GW",
|
||||
"guyana": "GY",
|
||||
"haiti": "HT",
|
||||
"heard island and mcdonald islands": "HM",
|
||||
"honduras": "HN",
|
||||
"hong kong s.a.r.": "HK",
|
||||
"hungary": "HU",
|
||||
"iceland": "IS",
|
||||
"india": "IN",
|
||||
"indonesia": "ID",
|
||||
"iran": "IR",
|
||||
"iraq": "IQ",
|
||||
"ireland": "IE",
|
||||
"isle of man": "IM",
|
||||
"israel": "IL",
|
||||
"italy": "IT",
|
||||
"ivory coast": "CI",
|
||||
"jamaica": "JM",
|
||||
"japan": "JP",
|
||||
"jersey": "JE",
|
||||
"jordan": "JO",
|
||||
"kazakhstan": "KZ",
|
||||
"kenya": "KE",
|
||||
"kiribati": "KI",
|
||||
"kosovo": "XK",
|
||||
"kuwait": "KW",
|
||||
"kyrgyz republic": "KG",
|
||||
"kyrgyzstan": "KG",
|
||||
"lao pdr": "LA",
|
||||
"laos": "LA",
|
||||
"latvia": "LV",
|
||||
"lebanon": "LB",
|
||||
"lesotho": "LS",
|
||||
"liberia": "LR",
|
||||
"libya": "LY",
|
||||
"liechtenstein": "LI",
|
||||
"lithuania": "LT",
|
||||
"luxembourg": "LU",
|
||||
"macao s.a.r": "MO",
|
||||
"madagascar": "MG",
|
||||
"malawi": "MW",
|
||||
"malaysia": "MY",
|
||||
"maldives": "MV",
|
||||
"mali": "ML",
|
||||
"malta": "MT",
|
||||
"marshall islands": "MH",
|
||||
"mauritania": "MR",
|
||||
"mauritius": "MU",
|
||||
"mexico": "MX",
|
||||
"micronesia": "FM",
|
||||
"moldova": "MD",
|
||||
"monaco": "MC",
|
||||
"mongolia": "MN",
|
||||
"montenegro": "ME",
|
||||
"montserrat": "MS",
|
||||
"morocco": "MA",
|
||||
"mozambique": "MZ",
|
||||
"myanmar": "MM",
|
||||
"namibia": "NA",
|
||||
"nauru": "NR",
|
||||
"nepal": "NP",
|
||||
"netherlands": "NL",
|
||||
"new caledonia": "NC",
|
||||
"new zealand": "NZ",
|
||||
"nicaragua": "NI",
|
||||
"niger": "NE",
|
||||
"nigeria": "NG",
|
||||
"niue": "NU",
|
||||
"norfolk island": "NF",
|
||||
"north korea": "KP",
|
||||
"north macedonia": "MK",
|
||||
"northern mariana islands": "MP",
|
||||
"norway": "NO",
|
||||
"oman": "OM",
|
||||
"pakistan": "PK",
|
||||
"palau": "PW",
|
||||
"palestine": "PS",
|
||||
"panama": "PA",
|
||||
"papua new guinea": "PG",
|
||||
"paraguay": "PY",
|
||||
"peru": "PE",
|
||||
"philippines": "PH",
|
||||
"pitcairn islands": "PN",
|
||||
"poland": "PL",
|
||||
"portugal": "PT",
|
||||
"puerto rico": "PR",
|
||||
"qatar": "QA",
|
||||
"republic of serbia": "RS",
|
||||
"republic of the congo": "CG",
|
||||
"romania": "RO",
|
||||
"russia": "RU",
|
||||
"rwanda": "RW",
|
||||
"saint barthelemy": "BL",
|
||||
"saint helena": "SH",
|
||||
"saint kitts and nevis": "KN",
|
||||
"saint lucia": "LC",
|
||||
"saint martin": "MF",
|
||||
"saint pierre and miquelon": "PM",
|
||||
"saint vincent and the grenadines": "VC",
|
||||
"samoa": "WS",
|
||||
"san marino": "SM",
|
||||
"são tomé and principe": "ST",
|
||||
"saudi arabia": "SA",
|
||||
"senegal": "SN",
|
||||
"seychelles": "SC",
|
||||
"sierra leone": "SL",
|
||||
"singapore": "SG",
|
||||
"sint maarten": "SX",
|
||||
"slovakia": "SK",
|
||||
"slovenia": "SI",
|
||||
"solomon islands": "SB",
|
||||
"somalia": "SO",
|
||||
"south africa": "ZA",
|
||||
"south georgia and the islands": "GS",
|
||||
"south korea": "KR",
|
||||
"south sudan": "SS",
|
||||
"spain": "ES",
|
||||
"sri lanka": "LK",
|
||||
"sudan": "SD",
|
||||
"suriname": "SR",
|
||||
"swaziland": "SZ",
|
||||
"sweden": "SE",
|
||||
"switzerland": "CH",
|
||||
"syria": "SY",
|
||||
"tajikistan": "TJ",
|
||||
"thailand": "TH",
|
||||
"the bahamas": "BS",
|
||||
"the comoros": "KM",
|
||||
"the gambia": "GM",
|
||||
"the maldives": "MV",
|
||||
"the netherlands": "NL",
|
||||
"the philippines": "PH",
|
||||
"the seychelles": "SC",
|
||||
"timor-leste": "TL",
|
||||
"togo": "TG",
|
||||
"tonga": "TO",
|
||||
"trinidad and tobago": "TT",
|
||||
"tunisia": "TN",
|
||||
"turkey": "TR",
|
||||
"turkmenistan": "TM",
|
||||
"turks and caicos": "TC",
|
||||
"turks and caicos islands": "TC",
|
||||
"tuvalu": "TV",
|
||||
"u.s. virgin islands": "VI",
|
||||
"uae": "AE",
|
||||
"uganda": "UG",
|
||||
"uk": "GB",
|
||||
"ukraine": "UA",
|
||||
"united arab emirates": "AE",
|
||||
"united kingdom": "GB",
|
||||
"united republic of tanzania": "TZ",
|
||||
"united states": "US",
|
||||
"united states minor outlying islands": "UM",
|
||||
"united states of america": "US",
|
||||
"united states virgin islands": "VI",
|
||||
"uruguay": "UY",
|
||||
"usa": "US",
|
||||
"uzbekistan": "UZ",
|
||||
"vanuatu": "VU",
|
||||
"vatican": "VA",
|
||||
"venezuela": "VE",
|
||||
"vietnam": "VN",
|
||||
"wallis and futuna": "WF",
|
||||
"west bank": "PS",
|
||||
"western sahara": "EH",
|
||||
"yemen": "YE",
|
||||
"zambia": "ZM",
|
||||
"zimbabwe": "ZW"
|
||||
}
|
||||
Reference in New Issue
Block a user