Replace separate `docker buildx install` step with installing `docker-buildx` package directly via apk, streamlining the Docker Buildx setup in the CI workflow.
Replace multi-step Node.js and npm install with single Alpine package install,
and simplify Docker builder setup by switching from GitHub Action to direct
CLI installation via apk. Also enable network debugging tools for better
troubleshooting in the CI environment.
- replace legacy .eslintrc files with flat eslint.config.js
- consolidate eslint globals for improved code clarity
- enable prefer-const and no-unused-vars off in *.js for flexibility
- remove unused import statements and redundant eslint directives from epic-games.js and aliexpress.js
- standardize function parameter syntax to arrow with parentheses omitted where safe
- add comments marking unused but retained functions for reference
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.
- add container support with node:20-alpine for sonar job
- consolidate git and utility installation steps
- include sonarqube-scanner installation for improved analysis
- add screenshot as a readonly global variable to ESLint configuration
♻️ refactor(epic-games): improve path resolution for screenshots
- replace resolve with path.resolve for better path management
- add OAuth device flow for secure authentication
- implement automatic and manual login handling
- enhance game claiming process with error handling and notifications
♻️ refactor(epic-claimer): remove unused code and improve structure
- remove unused resolve function
- restructure authentication and login logic for clarity
📝 docs(epic-claimer): update comments for better code understanding
- clarify function purposes and steps in comments
- add detailed explanations for new authentication flow
- remove unused functions and comments for clarity
- streamline login logic and error handling
- prepare for future enhancements with modular function placeholders
- implement extensive testing for new epic games claiming functionality
- ensure robust coverage of API interactions, OAuth flows, and game claiming logic
✨ feat(epic-claimer-new): introduce new epic games claiming logic
- add new logic for claiming free games via API with OAuth device flow
- implement automatic cookie reuse and manual login fallback
- enhance error handling and logging for improved debugging
♻️ refactor(epic-claimer-new): optimize code structure and modularity
- refactor functions for better code organization and readability
- modularize authentication and game claiming processes for reusability
🔧 chore(eslintrc): update eslint configuration
- add stylistic plugins and rules for better code consistency
- configure globals and parser options for modern JavaScript compatibility
- import axios, playwright-firefox, otplib, and node modules for enhanced functionality
- add utility imports from local modules for better code organization
- define URL_CLAIM, COOKIES_PATH, and BEARER_TOKEN_NAME constants for clearer code structure