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

dynamodb-admin

Package Overview
Dependencies
Maintainers
2
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dynamodb-admin - npm Package Compare versions

Comparing version 1.11.1 to 1.12.0

56

index.js

@@ -77,21 +77,41 @@ const express = require('express')

app.post('/create-table', bodyParser.urlencoded({extended: false}), (req, res, next) => {
dynamodb.createTable({
TableName: req.body.TableName,
ProvisionedThroughput: {
ReadCapacityUnits: req.body.ReadCapacityUnits,
WriteCapacityUnits: req.body.WriteCapacityUnits
},
KeySchema: [{
AttributeName: 'id',
KeyType: 'HASH'
}],
AttributeDefinitions: [{
AttributeName: 'id',
AttributeType: 'S'
}]
}).promise().then((response) => {
res.redirect('/')
}).catch(next)
})
let attributeDefinitions = [
{
AttributeName: req.body.HashAttributeName,
AttributeType: req.body.HashAttributeType,
}
];
let keySchema = [
{
AttributeName: req.body.HashAttributeName,
KeyType: 'HASH',
}
];
if (req.body.RangeAttributeName) {
attributeDefinitions.push({
AttributeName: req.body.RangeAttributeName,
AttributeType: req.body.RangeAttributeType,
});
keySchema.push({
AttributeName: req.body.RangeAttributeName,
KeyType: 'RANGE',
});
}
dynamodb.createTable({
TableName: req.body.TableName,
ProvisionedThroughput: {
ReadCapacityUnits: req.body.ReadCapacityUnits,
WriteCapacityUnits: req.body.WriteCapacityUnits,
},
KeySchema: keySchema,
AttributeDefinitions: attributeDefinitions,
}).promise().then((response) => {
res.redirect('/')
}).catch(next)
});
app.delete('/tables/:TableName', (req, res, next) => {

@@ -98,0 +118,0 @@ const TableName = req.params.TableName

{
"name": "dynamodb-admin",
"version": "1.11.1",
"version": "1.12.0",
"description": "GUI for DynamoDB. Useful for local development.",
"main": "index.js",
"bin": "./bin/dynamodb-admin.js",
"engines": {
"node": "6.4.0",
"npm": "3.10.3"
},
"scripts": {

@@ -12,0 +8,0 @@ "test": "jest"

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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