feat(wallet): support COCOD_DIR env var for config dir

Allow overriding the default cocod config directory (~/.cocod)
via the COCOD_DIR environment variable. Falls back to existing
HOME/USERPROFILE logic when unset.

Bump version to 0.2.6.
This commit is contained in:
redshift
2026-04-27 22:20:33 +05:30
parent 649b3a14f8
commit 927ec863bf
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "routstrd",
"version": "0.2.3",
"version": "0.2.6",
"module": "src/index.ts",
"type": "module",
"private": false,
+2 -1
View File
@@ -2,7 +2,8 @@ import { existsSync } from "fs";
import { createHash } from "crypto";
import { logger } from "../../utils/logger";
const DEFAULT_CONFIG_DIR = `${process.env.HOME || process.env.USERPROFILE || ""}/.cocod`;
const DEFAULT_CONFIG_DIR =
process.env.COCOD_DIR || `${process.env.HOME || process.env.USERPROFILE || ""}/.cocod`;
const DEFAULT_SOCKET_PATH =
process.env.COCOD_SOCKET || `${DEFAULT_CONFIG_DIR}/cocod.sock`;