Skip to content

v2.0.0

Choose a tag to compare

@pablo-1610 pablo-1610 released this 28 Jun 10:48
· 2 commits to master since this release

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 from citizenfx.statuspage.io, and featured servers from the public Game Services endpoint.
  • Full server list streaming: servers.all(filters) decodes the protobuf streamRedir feed into CitizenServer objects, 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, parsed tags, banners, and more.
  • Restructured public API: cfx.servers.* and cfx.status.*, with fetch* 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 servers and status namespaces.

Install

npm i cfx-api