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

presentation-service-server

Package Overview
Dependencies
Maintainers
5
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

presentation-service-server - npm Package Compare versions

Comparing version 2.0.16 to 2.1.0

14

lib/v1.js

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

var logger = require('winston').loggers.get('elasticsearch');
var hydrateString = require("./hydrateString");

@@ -37,3 +36,3 @@ logger.transports.console.timestamp = true;

const key = decodeURIComponent(req.path());
hydrateString(db, {}, "${" + key + "}")
db.get(key)
.errors(logStreamExceptions(req))

@@ -74,5 +73,5 @@ .stopOnError(e => {

if (R.isNil(score)) {
return db.setKey(key, value);
return db.put(key, value);
} else if (!isNaN(score)) {
return db.addToKey(key, score, value);
return db.add(key, score, value);
} else {

@@ -93,8 +92,3 @@ throw new restify.BadRequestError('score must be a number');

const key = decodeURIComponent(req.path());
const stream = req.query.value == null ? db.delKey(key)
: isNaN(req.query.value) ? db.delFromKey(key, req.query.value)
: db.delFromKeyByScore(key, Number(req.query.value));
stream
db.rem(key, req.query.value)
.errors(logStreamExceptions(req))

@@ -101,0 +95,0 @@ .stopOnError(next)

{
"name": "presentation-service-server",
"version": "2.0.16",
"version": "2.1.0",
"description": "Server component for the presentation service",

@@ -16,7 +16,6 @@ "main": "server.js",

"config": "1.20.1",
"fakeredis": "1.0.3",
"highland": "2.7.4",
"morgan": "1.7.0",
"ps-direct-sdk": "2.1.0",
"ramda": "0.21.0",
"redis": "2.5.3",
"restify": "4.0.4",

@@ -34,3 +33,2 @@ "winston": "2.2.0"

}
}

@@ -17,6 +17,6 @@ "use strict";

var redisClient = require('./lib/db')(config);
var db = require("ps-direct-sdk")(config.redis);
function useAPI(prefix, server) {
var api = require('./lib/' + prefix)(redisClient);
var api = require('./lib/' + prefix)(db);
for (var method in api) {

@@ -23,0 +23,0 @@ if (api.hasOwnProperty(method) && R.contains(translateAPIMethodName(method), config.allowedMethods)) {

@@ -10,11 +10,10 @@ "use strict";

var config = {
"redis": {
"redis": process.env.USE_REDIS === 'true' ? {
"host": "127.0.0.1",
"port": 6379
},
} : void 0,
"server": {
"port": 8080
},
"allowedMethods": ["GET", "PUT", "DELETE"],
"database": process.env.USE_REDIS === 'true' ? "redis" : "fakeRedis"
"allowedMethods": ["GET", "PUT", "DELETE"]
};

@@ -40,3 +39,2 @@

});
var del = hl.wrapCallback((key, cb) => {

@@ -43,0 +41,0 @@ request.del(key).end(cb);

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