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

serverless-dynamodb-local

Package Overview
Dependencies
Maintainers
3
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

serverless-dynamodb-local - npm Package Compare versions

Comparing version 0.2.27 to 0.2.28

test/indexTest.js

47

index.js

@@ -25,3 +25,9 @@ "use strict";

lifecycleEvents: ["seedHandler"],
usage: "Seeds local DynamoDB tables with data"
usage: "Seeds local DynamoDB tables with data",
options: {
online: {
shortcut: "o",
usage: "Will connect to the tables online to do an online seed run"
}
}
},

@@ -117,10 +123,22 @@ start: {

dynamodbOptions() {
const dynamoOptions = {
endpoint: `http://${this.host}:${this.port}`,
region: "localhost",
accessKeyId: "MOCK_ACCESS_KEY_ID",
secretAccessKey: "MOCK_SECRET_ACCESS_KEY"
};
dynamodbOptions(options) {
let dynamoOptions = {};
if(options && options.online){
this.serverlessLog("Connecting to online tables...");
if (!options.region) {
throw new Error("please specify the region");
}
dynamoOptions = {
region: options.region,
};
} else {
dynamoOptions = {
endpoint: `http://${this.host}:${this.port}`,
region: "localhost",
accessKeyId: "MOCK_ACCESS_KEY_ID",
secretAccessKey: "MOCK_SECRET_ACCESS_KEY"
};
}
return {

@@ -139,3 +157,4 @@ raw: new AWS.DynamoDB(dynamoOptions),

seedHandler() {
const documentClient = this.dynamodbOptions().doc;
const options = this.options;
const documentClient = this.dynamodbOptions(options).doc;
const seedSources = this.seedSources;

@@ -168,2 +187,5 @@ return BbPromise.each(seedSources, (source) => {

);
// otherwise endHandler will be mis-informed
this.options = options;
if (!options.noStart) {

@@ -251,2 +273,9 @@ dynamodbLocal.start(options);

}
if (migration.SSESpecification) {
migration.SSESpecification.Enabled = migration.SSESpecification.SSEEnabled;
delete migration.SSESpecification.SSEEnabled;
}
if (migration.Tags) {
delete migration.Tags;
}
dynamodb.raw.createTable(migration, (err) => {

@@ -253,0 +282,0 @@ if (err) {

2

package.json
{
"name": "serverless-dynamodb-local",
"version": "0.2.27",
"version": "0.2.28",
"engines": {

@@ -5,0 +5,0 @@ "node": ">=4.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