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

sessionstore

Package Overview
Dependencies
Maintainers
2
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sessionstore - npm Package Compare versions

Comparing version 1.2.9 to 1.2.10

42

lib/databases/elasticsearch.js

@@ -77,3 +77,3 @@ 'use strict';

if (err) {
if (callback) {
if (callback && !callbacked) {
callbacked = true;

@@ -95,3 +95,3 @@ callback(err, self);

if (err) {
if (callback) {
if (callback && !callbacked) {
callbacked = true;

@@ -105,3 +105,3 @@ callback(err, self);

self.emit('connect');
if (callback) {
if (callback && !callbacked) {
callbacked = true;

@@ -133,4 +133,4 @@ callback(err, self);

sess._version = sess._version || 1;
sess._version++;
// sess._version = sess._version || 1;
// sess._version++;

@@ -141,5 +141,6 @@ this.client.index({

id: this.options.prefix + sid,
version: sess._version > 2 ? sess._version - 1 : undefined,
ttl: ttl,
body: sess
// version: sess._version > 2 ? sess._version - 1 : undefined,
ttl: ttl + 'ms',
body: sess,
refresh: true
}, function (err, res) {

@@ -163,3 +164,3 @@ if (err && (err.message.toLowerCase().indexOf('version') >= 0)) {

}, function (err, res) {
if (err && err.message.toLowerCase().indexOf('not found') >= 0) {
if (err && (err.message.toLowerCase().indexOf('not found') >= 0 || err.message.toLowerCase().indexOf('no such index') >= 0)) {
err = null;

@@ -194,17 +195,12 @@ }

clear: function (callback) {
this.client.deleteByQuery({
index: this.index,
type: this.typeName,
body: {
query: {
bool: {
must: [
{
match_all: {}
}
]
}
}
var self = this;
this.client.indices.exists({index: this.index}, function (err, result) {
if (result){
self.client.indices.delete({index: self.index}, function (err) {
if (callback) callback(err);
});
} else {
if (callback) callback(err);
}
}, callback || function () {});
});
}

@@ -211,0 +207,0 @@

{
"author": "adrai",
"name": "sessionstore",
"version": "1.2.9",
"version": "1.2.10",
"private": false,

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

"dependencies": {
"async": "1.5.0",
"async": "1.5.2",
"jsondate": "0.0.1",
"lodash": "3.10.1",
"lodash": "4.5.0",
"parent-require": "1.0.0",

@@ -23,3 +23,3 @@ "tolerance": "1.0.0"

"cradle": ">=0.2.7",
"elasticsearch": "8.x.x",
"elasticsearch": ">= 10.0.0",
"eslint": ">=1.0.0",

@@ -26,0 +26,0 @@ "expect.js": ">= 0.1.2",

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