cli-whatsapp 0.1.0 → 0.1.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cli-whatsapp",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "A lightweight, fast, terminal-first WhatsApp client. Read, search, send, media, groups, and live notifications — from your terminal.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -45,4 +45,4 @@
45
45
  "@types/qrcode-terminal": "^0.12.2",
46
46
  "typescript": "^5.6.0"
47
47
  }
48
- }
48
+ }
@@ -3,12 +3,13 @@ import { join, resolve } from 'node:path';
3
3
  import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
4
4
 
5
5
  /**
6
- * All persistent state lives under a single base directory so the tool is
7
- * self-contained and easy to back up or wipe. Defaults to the project dir in
8
- * dev; override with WA_HOME for a global install (e.g. ~/.whatsapp-cli).
6
+ * All persistent state lives under a single base directory so it's easy to back
7
+ * up or wipe. Defaults to ~/.cli-whatsapp in the user's home — a stable location
8
+ * that survives package updates (never inside node_modules). Override with
9
+ * WA_HOME (e.g. for tests or a portable install).
9
10
  */
10
11
  export const BASE_DIR = resolve(
11
- process.env.WA_HOME ?? join(new URL('../../', import.meta.url).pathname),
12
+ process.env.WA_HOME ?? join(homedir(), '.cli-whatsapp'),
12
13
  );
13
14
 
14
15
  export const PATHS = {