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

dynamodb-admin

Package Overview
Dependencies
Maintainers
4
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 2.0.2 to 2.0.3

26

index.js
const express = require('express')
const _ = require('lodash')
const AWS = require('aws-sdk')
const promisify = require('es6-promisify')
const {promisify} = require('es6-promisify')
const path = require('path')
const errorhandler = require('errorhandler')
const { extractKey, parseKey } = require('./util')
const { extractKey, extractKeysForItems, parseKey } = require('./util')
const bodyParser = require('body-parser')
const pickBy = require('lodash/pickBy')
const omit = require('lodash/omit')
const yaml = require('js-yaml')
const querystring = require('querystring')

@@ -365,5 +364,11 @@ const clc = require('cli-color')

const Items = pageItems.map(item => {
return Object.assign({}, item, {
__key: extractKey(item, description.Table.KeySchema)
})
});
const UniqueKeys = extractKeysForItems(Items);
const data = Object.assign({}, description, {
query: req.query,
yaml,
omit,

@@ -374,7 +379,4 @@ filters,

filterQueryString: querystring.stringify(filters),
Items: pageItems.map(item => {
return Object.assign({}, item, {
__key: extractKey(item, description.Table.KeySchema)
})
})
Items,
UniqueKeys,
})

@@ -516,4 +518,6 @@ res.render('scan', data)

const port = process.env.PORT || 8001
app.listen(port, () => {
console.log(` listening on port ${port}`)
const server = app.listen(port, '127.0.0.1');
server.on('listening', () => {
const address = server.address();
console.log(` listening on http://${address.address}:${address.port}`);
})
{
"name": "dynamodb-admin",
"version": "2.0.2",
"version": "2.0.3",
"description": "GUI for DynamoDB. Useful for local development.",

@@ -8,2 +8,3 @@ "main": "index.js",

"scripts": {
"start": "node bin/dynamodb-admin.js",
"test": "jest"

@@ -26,16 +27,15 @@ },

"dependencies": {
"aws-sdk": "^2.7.27",
"body-parser": "^1.15.2",
"aws-sdk": "^2.273.1",
"body-parser": "^1.18.3",
"cli-color": "^1.2.0",
"ejs": "^2.5.1",
"ejs": "^2.6.1",
"errorhandler": "^1.4.3",
"es6-promisify": "^4.1.0",
"es7-object-polyfill": "0.0.1",
"express": "^4.14.0",
"js-yaml": "^3.6.1",
"lodash": "^4.16.4"
"es6-promisify": "^6.0.0",
"es7-object-polyfill": "0.0.7",
"express": "^4.16.3",
"lodash": "^4.17.10"
},
"devDependencies": {
"jest-cli": "^15.0.2"
"jest-cli": "^23.4.0"
}
}

@@ -1,2 +0,2 @@

GUI for DynamoDB Local.
GUI for [DynamoDB Local](https://aws.amazon.com/blogs/aws/dynamodb-local-for-desktop-development/) or [dynalite](https://github.com/mhart/dynalite).

@@ -3,0 +3,0 @@ ## Usage

@@ -23,2 +23,14 @@ exports.extractKey = function(item, KeySchema) {

exports.extractKeysForItems = function(Items) {
const keys = new Set();
for (const item of Items) {
for (const key of Object.keys(item)) {
if (!keys.has(key)) {
keys.add(key);
}
}
}
return Array.from(keys);
}
function typecastKey(keyName, keyValue, table) {

@@ -25,0 +37,0 @@ const definition = table.AttributeDefinitions.find(attribute => {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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