This commit refactors epic-games.js to use the GraphQL API instead of the legacy promotions endpoint for retrieving free games. Key architectural improvements include: - Added modular authentication module (device-auths.ts) supporting persistent device auth tokens - Introduces cookie management module (cookie.ts) for persistent session handling - Extracts GraphQL query structures and API endpoints into constants.ts - Implements multiple fallback strategies: device auth login, token exchange, and fallback to standard login - Adds support for both GraphQL and promotions-based game discovery - Streamlines claim process with improved tracking and error handling - Removes legacy selectors and redundant logic Additionally, updates package.json to include TypeScript and reorganizes dependency order for better maintainability. |
||
|---|---|---|
| .. | ||
| config.js | ||
| constants.ts | ||
| cookie.ts | ||
| device-auths.ts | ||
| migrate.js | ||
| util.js | ||
| version.js | ||