haraka-net-utils
Advanced tools
Comparing version 1.0.14 to 1.1.0
@@ -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(); | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
74164
20
1303
4