@cablate/banini-tracker 2.0.5 → 2.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config.js +2 -2
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/config.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { existsSync, readFileSync, writeFileSync } from 'fs';
|
|
2
2
|
import { join } from 'path';
|
|
3
3
|
import { homedir } from 'os';
|
|
4
|
-
const
|
|
5
|
-
const
|
|
4
|
+
const DATA_DIR = process.env.DATA_DIR || join(homedir(), '.banini-tracker');
|
|
5
|
+
const CONFIG_PATH = join(DATA_DIR, 'config.json');
|
|
6
6
|
const SEEN_FILE = join(DATA_DIR, 'seen.json');
|
|
7
7
|
export function getConfigPath() {
|
|
8
8
|
return CONFIG_PATH;
|
package/dist/index.js
CHANGED
|
@@ -19,7 +19,7 @@ import { withRetry } from './retry.js';
|
|
|
19
19
|
import { createTranscriber, transcribeVideoPosts } from './transcribe.js';
|
|
20
20
|
// ── Config ──────────────────────────────────────────────────
|
|
21
21
|
const FB_PAGE_URL = 'https://www.facebook.com/DieWithoutBang/';
|
|
22
|
-
const DATA_DIR = join(process.cwd(), 'data');
|
|
22
|
+
const DATA_DIR = process.env.DATA_DIR || join(process.cwd(), 'data');
|
|
23
23
|
const isCronMode = process.argv.includes('--cron');
|
|
24
24
|
function env(key, fallback) {
|
|
25
25
|
const val = process.env[key] ?? fallback;
|