Repository navigation
v2.0.0
First major release. The library now targets the current Cfx.re services and is no longer deprecated.
Highlights
- Updated endpoints: server data now comes from
frontend.cfx-services.net, status fromcitizenfx.statuspage.io, and featured servers from the public Game Services endpoint. - Full server list streaming:
servers.all(filters)decodes the protobufstreamRedirfeed intoCitizenServerobjects, with client-side filters (locale, gametype, min/max players, tag, search, limit). - New modules: featured servers, server icons, and direct game server queries (
info,dynamic,players). - Enriched server model:
joinUrl,connectEndpoint,locale,isFiveM/isRedM, parsedtags, banners, and more. - Restructured public API:
cfx.servers.*andcfx.status.*, withfetch*aliases kept for convenience.
Tooling
- Upgraded to TypeScript 6, ESLint 10 (flat config), Jest 30 and the latest dependencies.
- Test suite rewritten with real assertions.
- CI modernized to Node 20.
Breaking changes
- The pinned servers API and the previous flat exports are replaced by the
serversandstatusnamespaces.
Install
npm i cfx-api