✨ feat(epic-claimer): add new imports and constants
- 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
This commit is contained in:
parent
712f1caa0e
commit
dc54be10e8
2 changed files with 41 additions and 0 deletions
|
|
@ -1,3 +1,25 @@
|
|||
import axios from 'axios';
|
||||
import { firefox } from 'playwright-firefox';
|
||||
import { authenticator } from 'otplib';
|
||||
import path from 'node:path';
|
||||
import { existsSync, readFileSync, writeFileSync } from 'node:fs';
|
||||
import {
|
||||
resolve,
|
||||
jsonDb,
|
||||
datetime,
|
||||
stealth,
|
||||
filenamify,
|
||||
prompt,
|
||||
notify,
|
||||
html_game_list,
|
||||
handleSIGINT
|
||||
} from './src/util.js';
|
||||
import { cfg } from './src/config.js';
|
||||
|
||||
const URL_CLAIM = 'https://store.epicgames.com/en-US/free-games';
|
||||
const COOKIES_PATH = path.resolve(cfg.dir.browser, 'epic-cookies.json');
|
||||
const BEARER_TOKEN_NAME = 'EPIC_BEARER_TOKEN';
|
||||
|
||||
const ensureLoggedIn = async (page, context) => {
|
||||
const isLoggedIn = async () => {
|
||||
try {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue