@cablate/banini-tracker 2.0.4 → 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 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 CONFIG_PATH = join(homedir(), '.banini-tracker.json');
5
- const DATA_DIR = join(homedir(), '.banini-tracker');
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cablate/banini-tracker",
3
- "version": "2.0.4",
3
+ "version": "2.0.6",
4
4
  "description": "巴逆逆反指標追蹤器 — 常駐排程 + CLI 雙模式",
5
5
  "type": "module",
6
6
  "bin": {