Socket
Socket
Sign inDemoInstall

homebridge-smtp-motion

Package Overview
Dependencies
28
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.0 to 1.1.1

28

dist/index.js

@@ -5,4 +5,6 @@ "use strict";

};
const bunyan_1 = __importDefault(require("bunyan"));
const http_1 = __importDefault(require("http"));
const smtp_server_1 = require("smtp-server");
const http_1 = __importDefault(require("http"));
const stream_1 = __importDefault(require("stream"));
const PLUGIN_NAME = 'homebridge-smtp-motion';

@@ -23,3 +25,21 @@ const PLATFORM_NAME = 'smtpMotion';

const log = this.log;
const server = new smtp_server_1.SMTPServer({ authOptional: true, onData(stream, session, callback) {
const logStream = new stream_1.default.Writable({
write: (chunk, encoding, callback) => {
const data = JSON.parse(chunk);
this.log.debug('[SMTP Server] ' + data.msg);
callback();
}
});
const bunyanLog = bunyan_1.default.createLogger({
name: 'ftp',
streams: [{
stream: logStream
}]
});
const server = new smtp_server_1.SMTPServer({ authOptional: true,
disabledCommands: ['STARTTLS'],
logger: bunyanLog, onAuth(auth, session, callback) {
callback(null, { user: true });
},
onData(stream, session, callback) {
stream.on('data', () => { });

@@ -29,3 +49,3 @@ stream.on('end', callback);

const name = rcptTo.address.split('@')[0].replace(/\+/g, ' ');
log.debug(name + ' Motion Detected!');
log('[' + name + '] Email received.');
try {

@@ -35,3 +55,3 @@ http_1.default.get('http://127.0.0.1:' + httpPort + '/motion?' + name);

catch (ex) {
log.error(name + ': Error making HTTP call: ' + ex);
log.error('[' + name + '] Error making HTTP call: ' + ex);
}

@@ -38,0 +58,0 @@ });

10

package.json
{
"displayName": "Homebridge SMTP Motion",
"name": "homebridge-smtp-motion",
"version": "1.1.0",
"version": "1.1.1",
"description": "Converts SMTP messages into HTTP motion alerts that homebridge-camera-ffmpeg understands",

@@ -28,4 +28,4 @@ "main": "dist/index.js",

"format": "markdownlint --fix *.md",
"lint": "eslint **/*.ts --fix",
"lint-check": "eslint **/*.ts",
"lint": "eslint src/*.ts --fix",
"lint-check": "eslint src/*.ts",
"prepare": "npm run build",

@@ -39,3 +39,4 @@ "prepublishOnly": "npm run lint-check",

"@typescript-eslint/parser": "^3.7.0",
"@types/node": "14.0.25",
"@types/bunyan": "^1.8.6",
"@types/node": "14.0.26",
"@types/smtp-server": "3.5.4",

@@ -60,4 +61,5 @@ "eslint": "^7.5.0",

"dependencies": {
"bunyan": ">=1.8.14",
"smtp-server": ">=3.7.0"
}
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc