import dotenv from 'dotenv'; dotenv.config() /** * */ export class ClientNodeObject { /** * * @param {string} param0._id The ID of the node (Assigned by the client on first boot) * @param {string} param0._name The name of the node (Assigned by the user) * @param {string} param0._location The physical location of the node (Assigned by the user) * @param {object} param0._nearbySystems An object array of nearby systems (Assigned by the user) */ constructor({ _id = undefined, _name = undefined, _location = undefined, _nearbySystems = undefined}) { this.id = _id; this.name = _name; this.location = _location; this.nearbySystems = _nearbySystems; } } /** The configuration object for the node */ export class ClientNodeConfig { constructor({ _id = process.env.CLIENT_ID, _name = process.env.CLIENT_NAME, _location = process.env.CLIENT_LOCATION, _nearbySystems = undefined, // TODO - Get the presets when loading the config instead of having to do it after the fact _serverIp = process.env.SERVER_IP, _serverPort = process.env.SERVER_PORT, }) { this.node = new ClientNodeObject({ _id:_id, _name:_name, _location:_location, _nearbySystems:_nearbySystems }); this.serverIp = _serverIp; this.serverPort = _serverPort; } }