"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = getMachineIPAddress; const os_1 = require("os"); function getMachineIPAddress() { try { const interfaces = (0, os_1.networkInterfaces)(); for (const ifaceName in interfaces) { const iface = interfaces[ifaceName]; if (Array.isArray(iface)) { for (const address of iface) { if (address.family === "IPv4" && !address.internal) { return address.address; } } } } return null; } catch (error) { console.error(`Error accessing network interfaces: ${error.message}`); return null; } }