New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@compassdigital/middleware

Package Overview
Dependencies
Maintainers
11
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@compassdigital/middleware - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

3

lib/functions/action-logger.js

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

this.options = options || {};
this.enabled = this.options.enabled || false;

@@ -66,4 +65,2 @@ this.schema = new dynamoose.Schema({

return (req, res, next) => {
if (!this.enabled) return next();
if (this.emitter.listenerCount(DATA_EVENT) === 0) {

@@ -70,0 +67,0 @@ this.emitter.addListener(DATA_EVENT, (data) => {

2

package.json
{
"name": "@compassdigital/middleware",
"version": "1.0.4",
"version": "1.0.5",
"description": "CDL Provider middleware module",

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

@@ -24,4 +24,3 @@ "use strict";

let emitter = new EventEmitter();
let options = { "enabled": true };
let ActionLogger = MW.fn.ActionLogger.call(emitter, options);
let ActionLogger = MW.fn.ActionLogger.call(emitter);

@@ -37,18 +36,4 @@ let req = {};

it("Should run the action logger and not register the data and save listeners", async function () {
let emitter = new EventEmitter();
let ActionLogger = MW.fn.ActionLogger.call(emitter);
let req = {};
let res = {};
let next = sinon.spy();
ActionLogger(req, res, next);
emitter.listenerCount(DATA_EVENT).should.equal(0);
emitter.listenerCount(SAVE_EVENT).should.equal(0);
next.calledOnce.should.equal(true);
});
it("Should run the action logger and process the data event", async function () {
let emitter = new EventEmitter();
let options = { "enabled": true };
let ActionLogger = MW.fn.ActionLogger.call(emitter);

@@ -66,4 +51,3 @@

let emitter = new EventEmitter();
let options = { "enabled": true };
let ActionLogger = MW.fn.ActionLogger.call(emitter, options);
let ActionLogger = MW.fn.ActionLogger.call(emitter);

@@ -70,0 +54,0 @@ let req = {};

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