mv {config,migrate,util,version}.js src/
This commit is contained in:
parent
6b9420804b
commit
64676795d1
10 changed files with 11 additions and 11 deletions
|
|
@ -93,7 +93,7 @@ Available options/variables and their default values:
|
|||
| GOG_PASSWORD | | GOG password for login. Overrides PASSWORD. |
|
||||
| GOG_NEWSLETTER | 0 | Do not unsubscribe from newsletter after claiming a game if 1. |
|
||||
|
||||
See `config.js` for all options.
|
||||
See `src/config.js` for all options.
|
||||
|
||||
#### How to set options
|
||||
You can add options directly in the command or put them in a file to load.
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ import { firefox } from 'playwright-firefox'; // stealth plugin needs no outdate
|
|||
import { authenticator } from 'otplib';
|
||||
import path from 'path';
|
||||
import { existsSync, writeFileSync } from 'fs';
|
||||
import { resolve, jsonDb, datetime, stealth, filenamify, prompt, notify, html_game_list, handleSIGINT } from './util.js';
|
||||
import { cfg } from './config.js';
|
||||
import { resolve, jsonDb, datetime, stealth, filenamify, prompt, notify, html_game_list, handleSIGINT } from './src/util.js';
|
||||
import { cfg } from './src/config.js';
|
||||
|
||||
const screenshot = (...a) => resolve(cfg.dir.screenshots, 'epic-games', ...a);
|
||||
|
||||
|
|
|
|||
4
gog.js
4
gog.js
|
|
@ -1,6 +1,6 @@
|
|||
import { firefox } from 'playwright-firefox'; // stealth plugin needs no outdated playwright-extra
|
||||
import { resolve, jsonDb, datetime, filenamify, prompt, notify, html_game_list, handleSIGINT } from './util.js';
|
||||
import { cfg } from './config.js';
|
||||
import { resolve, jsonDb, datetime, filenamify, prompt, notify, html_game_list, handleSIGINT } from './src/util.js';
|
||||
import { cfg } from './src/config.js';
|
||||
|
||||
const screenshot = (...a) => resolve(cfg.dir.screenshots, 'gog', ...a);
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { firefox } from 'playwright-firefox'; // stealth plugin needs no outdate
|
|||
import { authenticator } from 'otplib';
|
||||
import chalk from 'chalk';
|
||||
import { resolve, jsonDb, datetime, stealth, filenamify, prompt, confirm, notify, html_game_list, handleSIGINT } from './util.js';
|
||||
import { cfg } from './config.js';
|
||||
import { cfg } from './src/config.js';
|
||||
|
||||
const screenshot = (...a) => resolve(cfg.dir.screenshots, 'prime-gaming', ...a);
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import { fileURLToPath } from 'node:url';
|
|||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = path.dirname(__filename);
|
||||
// explicit object instead of Object.fromEntries since the built-in type would loose the keys, better type: https://dev.to/svehla/typescript-object-fromentries-389c
|
||||
export const dataDir = s => path.resolve(__dirname, 'data', s);
|
||||
export const dataDir = s => path.resolve(__dirname, '..', 'data', s);
|
||||
|
||||
// modified path.resolve to return null if first argument is '0', used to disable screenshots
|
||||
export const resolve = (...a) => a.length && a[0] == '0' ? null : path.resolve(...a);
|
||||
|
|
@ -5,8 +5,8 @@ import { firefox } from 'playwright-firefox'; // stealth plugin needs no outdate
|
|||
import { authenticator } from 'otplib';
|
||||
import path from 'path';
|
||||
import { writeFileSync } from 'fs';
|
||||
import { resolve, jsonDb, datetime, stealth, filenamify, prompt, notify, html_game_list, handleSIGINT } from './util.js';
|
||||
import { cfg } from './config.js';
|
||||
import { resolve, jsonDb, datetime, stealth, filenamify, prompt, notify, html_game_list, handleSIGINT } from './src/util.js';
|
||||
import { cfg } from './src/config.js';
|
||||
|
||||
const screenshot = (...a) => resolve(cfg.dir.screenshots, 'unrealengine', ...a);
|
||||
|
||||
|
|
|
|||
4
xbox.js
4
xbox.js
|
|
@ -7,8 +7,8 @@ import {
|
|||
jsonDb,
|
||||
notify,
|
||||
prompt,
|
||||
} from './util.js';
|
||||
import { cfg } from './config.js';
|
||||
} from './src/util.js';
|
||||
import { cfg } from './src/config.js';
|
||||
|
||||
// ### SETUP
|
||||
const URL_CLAIM = 'https://www.xbox.com/en-US/live/gold'; // #gameswithgold";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue