✨ 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
19
.forgejo/workflows/.eslintrc.cjs
Normal file
19
.forgejo/workflows/.eslintrc.cjs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
I apologize, but the suggested edit is a `package.json` configuration, while the original code is an ESLint configuration file(`.eslintrc.cjs`).These are two different types of configuration files.
|
||||
|
||||
If you want to incorporate the suggested configuration, I'll help you merge the relevant parts. Here's a revised ESLint configuration that includes the suggestions:
|
||||
argsIgnorePattern: '^_'
|
||||
}],
|
||||
'@stylistic/js/comma-dangle': ['error', 'always-multiline'],
|
||||
'@stylistic/js/arrow-parens': ['error', 'as-needed']
|
||||
},
|
||||
plugins: [
|
||||
]
|
||||
'@stylistic/js'
|
||||
};
|
||||
|
||||
Could you clarify:
|
||||
1. Are you looking to update the ESLint configuration?
|
||||
2. Do you want to add these import statements to a specific file?
|
||||
3. What specific changes are you trying to make?
|
||||
|
||||
The previous ESLint configuration looked like this:
|
||||
|
|
@ -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