chore: sync submodule state (parent ref update)

Made-with: Cursor
This commit is contained in:
defiQUG
2026-03-02 12:14:08 -08:00
parent 1d7e9c2d4e
commit 3cd98f979a

View File

@@ -9,14 +9,19 @@ import crypto from 'crypto';
import { readFileSync } from 'fs';
import { join, dirname } from 'path';
import { fileURLToPath } from 'url';
import { homedir } from 'os';
// Load environment variables from .env file
// Load environment variables from ~/.env file (standardized location)
const envPath = join(homedir(), '.env');
// Also try relative path as fallback for backwards compatibility
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
const envPath = join(__dirname, '../.env');
const envPathFallback = join(__dirname, '../.env');
function loadEnvFile(filePath) {
try {
const envFile = readFileSync(envPath, 'utf8');
const envFile = readFileSync(filePath, 'utf8');
const envVars = envFile.split('\n').filter(line => line.includes('=') && !line.trim().startsWith('#'));
for (const line of envVars) {
const [key, ...values] = line.split('=');
@@ -30,8 +35,17 @@ try {
process.env[key.trim()] = value;
}
}
return true;
} catch (error) {
console.error('Warning: Could not load .env file:', error.message);
return false;
}
}
// Try ~/.env first, then fallback to relative path
if (!loadEnvFile(envPath)) {
if (!loadEnvFile(envPathFallback)) {
console.error('Warning: Could not load .env file from ~/.env or ../.env');
}
}
class ProxmoxServer {