refactor(style): align template literals and whitespace formatting
All checks were successful
build-and-push / lint (push) Successful in 7s
build-and-push / sonar (push) Successful in 20s
build-and-push / docker (push) Successful in 19s

- standardize string literals to single quotes in constants.js
- remove unused variable and normalize whitespace in cookie.js
- simplify nullish coalescing expression in device-auths.js

This consistency improvement enhances code readability and enforces uniform style across the codebase.
This commit is contained in:
nocci 2026-03-08 10:57:28 +00:00
parent 22c84a759b
commit c0d148dc8e
3 changed files with 10 additions and 11 deletions

View file

@ -27,8 +27,8 @@ export const MFA_LOGIN_ENDPOINT = 'https://www.epicgames.com/id/api/login/mfa';
export const UNREAL_SET_SID_ENDPOINT = 'https://www.unrealengine.com/id/api/set-sid';
export const TWINMOTION_SET_SID_ENDPOINT = 'https://www.twinmotion.com/id/api/set-sid';
export const CLIENT_REDIRECT_ENDPOINT = `https://www.epicgames.com/id/api/client/${EPIC_CLIENT_ID}`;
export const AUTHENTICATE_ENDPOINT = `https://www.epicgames.com/id/api/authenticate`;
export const LOCATION_ENDPOINT = `https://www.epicgames.com/id/api/location`;
export const AUTHENTICATE_ENDPOINT = 'https://www.epicgames.com/id/api/authenticate';
export const LOCATION_ENDPOINT = 'https://www.epicgames.com/id/api/location';
export const PHASER_F_ENDPOINT = 'https://talon-service-prod.ak.epicgames.com/v1/phaser/f';
export const PHASER_BATCH_ENDPOINT = 'https://talon-service-prod.ak.epicgames.com/v1/phaser/batch';
export const TALON_IP_ENDPOINT = 'https://talon-service-v4-prod.ak.epicgames.com/v1/init/ip';

View file

@ -32,7 +32,6 @@ function getCookieJar(username) {
if (cookieJar) {
return cookieJar;
}
const cookieFilename = getCookiePath(username);
cookieJar = new tough.CookieJar();
cookieJars.set(username, cookieJar);
return cookieJar;
@ -42,7 +41,7 @@ function getCookieJar(username) {
export function editThisCookieToToughCookieFileStore(etc) {
const tcfs = {};
etc.forEach((etcCookie) => {
etc.forEach(etcCookie => {
const domain = etcCookie.domain.replace(/^\./, '');
const expires = etcCookie.expirationDate
? new Date(etcCookie.expirationDate * 1000).toISOString()

View file

@ -32,7 +32,7 @@ export async function writeDeviceAuths(deviceAuths) {
}
export async function setAccountAuth(account, accountAuth) {
const existingDeviceAuths = (await getDeviceAuths()) ?? {};
const existingDeviceAuths = await getDeviceAuths() ?? {};
existingDeviceAuths[account] = accountAuth;
await writeDeviceAuths(existingDeviceAuths);
}