Authentication Polling, Typed Requests and Client Lifecycle listener
This is the finished release for 5.0.0. It features authentication polling, typed json requests and a brand new League Client lifecycle listener.
Documentation for the new release has been published. The GitHub Wiki has been removed because the documentation is no longer hosted there.
Added
request<T>will now properly return aResponse<T>whose .json() method will return aT(typescript)authenticatenow has options toawaitConnection, searching until a LeagueClientUx process has been found.- Running the library on a platform the game doesn't support will now throw an
InvalidPlatformErrorupon calls toauthenticate LeagueClientis a new LeagueClientUx process lifecycle listener, detecting client shutdowns and startups
Fixes
- Fixed a bug where LeagueWebSocket's subscriptions would attach twice upon registration
- Removed unnecessary
fs-extradependency
Breaking Changes
These changes are not major, but it will end up breaking edge case usage.
Credentials, the type returned fromauthenticateno longer returns the HTTP protocol used or the process name. These can always be assumed to be"https"and"LeagueClientUx".- This is because the new implementation uses the process command line arguments to retrieve password/port instead of the lockfile process. (see https://www.hextechdocs.dev/lol/lcuapi/6.getting-started-with-the-lcu-api#getting-the-port-number-and-the-password)
- LeagueWebSocket no longer has a
getListeners()method, instead, thesubscriptionsproperty is now public.- The property is no longer an object, the implementation now uses a
Map.
- The property is no longer an object, the implementation now uses a