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

test-smtp-server

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

test-smtp-server - npm Package Compare versions

Comparing version 0.9.3 to 0.9.4

3

build/lib/test-smtp-server.d.ts

@@ -29,2 +29,4 @@ /// <reference types="node" />

smtpPort?: number;
/** restrict ip addresses to localhost */
localhostOnly?: boolean;
/** logging function like console.log() */

@@ -42,2 +44,3 @@ debug?: (message?: unknown, ...optionalParams: any[]) => void;

private isDebugging;
private localhostOnly;
private port;

@@ -44,0 +47,0 @@ private server;

@@ -53,2 +53,3 @@ "use strict";

this.isDebugging = false;
this.localhostOnly = true;
this.port = 1025;

@@ -59,2 +60,5 @@ if (options) {

}
if (options.localhostOnly) {
this.localhostOnly = options.localhostOnly;
}
if (options.debug) {

@@ -69,3 +73,4 @@ this.debug = options.debug;

onConnect(session, callback) {
if (!session.remoteAddress.match(/^127.0.0.1|::1$/)) {
// 172.17 prefix is a linux docker container
if (that.localhostOnly && !session.remoteAddress.match(/^172.17|127.0.0.1|::1$/)) {
return callback(new Error("Only connections from localhost allowed"));

@@ -72,0 +77,0 @@ }

14

package.json
{
"name": "test-smtp-server",
"version": "0.9.3",
"version": "0.9.4",
"description": "The test-smtp-server package allows internal testing of projects needing an SMTP server.",

@@ -49,10 +49,10 @@ "main": "./build/lib/test-smtp-server.js",

"@types/smtp-server": "^3.5.7",
"@typescript-eslint/eslint-plugin": "^5.26.0",
"@typescript-eslint/parser": "^5.26.0",
"commander": "^9.0.0",
"eslint": "^8.2.0",
"@typescript-eslint/eslint-plugin": "^5.29.0",
"@typescript-eslint/parser": "^5.29.0",
"commander": "^9.3.0",
"eslint": "^8.18.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-jsdoc": "^39.3.2",
"eslint-plugin-jsdoc": "^39.3.3",
"nodemailer": "^6.7.5",
"typescript": "^4.7.2"
"typescript": "^4.7.4"
},

@@ -59,0 +59,0 @@ "dependencies": {

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