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

connect-dynamodb

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

connect-dynamodb - npm Package Compare versions

Comparing version 0.1.4 to 1.0.0

.npmignore

5

History.md

@@ -0,1 +1,6 @@

1.0.0 / 2013-05-25
==================
* Adding support for the 2012-08-10 API version of DynamoDB (https://github.com/ca98am79/connect-dynamodb/issues/6)
0.1.4 / 2013-04-19

@@ -2,0 +7,0 @@ ==================

27

lib/connect-dynamodb.js

@@ -54,3 +54,3 @@ /*!

AWS.config.loadFromPath(this.AWSConfigPath);
this.client = new AWS.DynamoDB({apiVersion: '2011-12-05'}).client;
this.client = new AWS.DynamoDB();
}

@@ -65,15 +65,14 @@

// check if sessions table exists, otherwise create it
var client = this.client;
client.describeTable({
this.client.describeTable({
TableName: this.table
}, function (error, info) {
if (error) {
client.createTable({
TableName: options.table,
KeySchema: {
HashKeyElement: {
AttributeName: 'id',
AttributeType: 'S'
}
},
this.client.createTable({
TableName: options.table,
AttributeDefinitions: [
{ AttributeName: 'id', AttributeType: 'S' }
],
KeySchema: [
{ AttributeName: 'id', KeyType: 'HASH' }
],
ProvisionedThroughput: {

@@ -85,3 +84,3 @@ ReadCapacityUnits: 5,

}
});
}.bind(this));
};

@@ -111,3 +110,3 @@

Key : {
HashKeyElement: {
id: {
'S' : sid

@@ -227,3 +226,3 @@ }

Key : {
HashKeyElement: {
id: {
'S' : sid

@@ -230,0 +229,0 @@ }

{
"name": "connect-dynamodb",
"description": "DynamoDB session store for Connect",
"version": "0.1.4",
"version": "1.0.0",
"author": "Mike Carson <ca98am79@gmail.com> (http://ca98am79.com)",

@@ -6,0 +6,0 @@ "main": "./index.js",

@@ -55,2 +55,3 @@ # Connect DynamoDB

* [B2M Development](https://github.com/b2mdevelopment)
* [Kristian Ačkar](https://github.com/kristian-ackar)

@@ -57,0 +58,0 @@ Thanks!

@@ -10,5 +10,15 @@

var store = new DynamoDBStore({table : 'sessions-test'});
var store = new DynamoDBStore({table : 'sessions-test', reapInterval : 2000});
// #set()
store.set('1234', {
cookie: {
maxAge: 2000
},
name: 'tj_reap'
}, function(err, ok){
assert.ok(!err, '#set() got an error');
assert.ok(ok, '#set() is not ok');
});
store.set('123', {

@@ -33,14 +43,17 @@ cookie: {

// #set null
store.set('123', {
cookie: {
maxAge: 2000
},
name: 'tj'
}, function(){
store.destroy('123', function(){
store.get('123', function(err, data){
assert.ok(err, '#get() should not find destroyed key');
console.log('done');
});
// #destroy
store.destroy('123', function(err, data){
assert.ok(!err, '#destroy() got an error');
store.get('123', function(err, data){
assert.strictEqual(data, null, '#get() should not find destroyed key');
// #reap()
setTimeout(function(){
store.get('1234', function(err, data){
assert.strictEqual(data, null, '#get() should not find destroyed key');
console.log('done');
});
}, 4000);
});

@@ -47,0 +60,0 @@ });

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