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

dynamodb-admin

Package Overview
Dependencies
Maintainers
1
Versions
49
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.2.0 to 1.3.0

util.js

52

index.js

@@ -6,3 +6,7 @@ const express = require('express')

const path = require('path')
const errorhandler = require('errorhandler')
const { serializeKey, unserializeKey } = require('./util')
require('es7-object-polyfill')
const app = express()

@@ -29,2 +33,3 @@ app.set('json spaces', 2)

app.use(errorhandler())
app.use('/assets', express.static(path.join(__dirname, '/public')))

@@ -48,3 +53,3 @@

app.get('/tables/:TableName', (req, res) => {
app.get('/tables/:TableName', (req, res, next) => {
const TableName = req.params.TableName

@@ -54,11 +59,15 @@ Promise.all([

scan({TableName})
]).then(([description, items]) => {
]).then(([description, result]) => {
const data = Object.assign({},
description,
items
{
Items: result.Items.map((item) => {
return Object.assign({}, item, {
__key: serializeKey(item, description.Table)
})
})
}
)
res.render('scan', data)
}).catch((error) => {
res.json({error})
})
}).catch(next)
})

@@ -82,21 +91,20 @@

app.get('/tables/:TableName/items/:id', (req, res) => {
const params = {
TableName : req.params.TableName,
Key: {
id: req.params.id
app.get('/tables/:TableName/items/:key', (req, res, next) => {
const TableName = req.params.TableName
describeTable({TableName}).then((result) => {
const params = {
TableName,
Key: unserializeKey(req.params.key, result.Table)
}
}
get(params).then((response) => {
if (!response) {
return res.status(404).end()
}
res.render('item', {
TableName: req.params.TableName,
Item: response.Item
get(params).then((response) => {
if (!response) {
return res.status(404).end()
}
res.render('item', {
TableName: req.params.TableName,
Item: response.Item
})
})
}).catch((error) => {
res.json({error})
})
}).catch(next)
})

@@ -103,0 +111,0 @@

{
"name": "dynamodb-admin",
"version": "1.2.0",
"version": "1.3.0",
"description": "GUI for DynamoDB. Useful for local development.",

@@ -24,3 +24,5 @@ "main": "index.js",

"ejs": "^2.5.1",
"errorhandler": "^1.4.3",
"es6-promisify": "^4.1.0",
"es7-object-polyfill": "0.0.1",
"express": "^4.14.0",

@@ -27,0 +29,0 @@ "get-port": "^2.1.0"

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