Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

haraka-net-utils

Package Overview
Dependencies
Maintainers
4
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

haraka-net-utils - npm Package Compare versions

Comparing version 1.0.14 to 1.1.0

test/config/me

4

Changes.md

@@ -0,2 +1,5 @@

1.1.0 - 2018-04-11
- add get_primary_host_name haraka/Haraka#2380
1.0.14 - 2018-01-25

@@ -51,2 +54,1 @@

* added tls.ini loading

@@ -6,2 +6,3 @@ 'use strict';

const net = require('net');
const os = require('os');

@@ -414,1 +415,5 @@ // npm modules

}
exports.get_primary_host_name = function () {
return exports.config.get('me') || os.hostname();
}
{
"name": "haraka-net-utils",
"version": "1.0.14",
"version": "1.1.0",
"description": "haraka network utilities",

@@ -5,0 +5,0 @@ "main": "index.js",

const net = require('net');
const path = require('path');
const os = require('os');

@@ -959,1 +960,16 @@ require('haraka-config').watch_files = false;

};
exports.get_primary_host_name = {
setUp: setUp,
'with me config': function (test) {
test.expect(1);
test.equals(this.net_utils.get_primary_host_name(), 'test-hostname');
test.done();
},
'without me config': function (test) {
this.net_utils.config = this.net_utils.config.module_config(path.resolve('doesnt-exist'));
test.expect(1);
test.equals(this.net_utils.get_primary_host_name(), os.hostname());
test.done();
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc