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
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 3.1.1 to 3.1.2

22

lib/actions/purgeTable.js
const { doSearch } = require('../util')
const findPrimaryKey = context => {
const findPrimaryKeys = context => {
const params = {

@@ -10,4 +10,10 @@ TableName: context.tableName

.then(tableDescription => {
context.primaryKey = tableDescription.Table.KeySchema.find(
element => element.KeyType === 'HASH').AttributeName
const tableSchema = tableDescription.Table.KeySchema
context.primaryKeys = ['HASH', 'RANGE']
.map(keyType => tableSchema.find(element => element.KeyType === keyType))
.filter(attribute => attribute)
.map(attribute => attribute.AttributeName)
return context

@@ -30,5 +36,3 @@ })

DeleteRequest: {
Key: {
[context.primaryKey]: item[context.primaryKey]
}
Key: item
}

@@ -55,3 +59,3 @@ })

const scanParams = {
ProjectionExpression: context.primaryKey,
ProjectionExpression: context.primaryKeys.join(', '),
}

@@ -87,3 +91,3 @@

return findPrimaryKey(context)
return findPrimaryKeys(context)
.then(findAllElements)

@@ -93,2 +97,2 @@ .then(deleteAllElements)

module.exports = {purgeTable}
module.exports = { purgeTable }
{
"name": "dynamodb-admin",
"version": "3.1.1",
"version": "3.1.2",
"description": "GUI for DynamoDB. Useful for local development.",

@@ -11,4 +11,10 @@ "main": "lib/backend.js",

"lint": "eslint --ext .js .",
"fix": "eslint --ext .js --fix .",
"test": "jest"
},
"husky": {
"hooks": {
"pre-commit": "npm run lint"
}
},
"repository": {

@@ -30,3 +36,3 @@ "type": "git",

"argparse": "^1.0.10",
"aws-sdk": "^2.390.0",
"aws-sdk": "^2.411.0",
"body-parser": "^1.18.3",

@@ -42,7 +48,8 @@ "cli-color": "^1.3.0",

"devDependencies": {
"eslint": "^5.12.0",
"eslint-plugin-jest": "^22.1.0",
"jest-cli": "^23.6.0",
"nodemon": "^1.18.9"
"eslint": "^5.14.1",
"eslint-plugin-jest": "^22.3.0",
"husky": "^1.3.1",
"jest-cli": "^24.1.0",
"nodemon": "^1.18.10"
}
}
# dynamodb-admin
[![npm](https://img.shields.io/npm/v/dynamodb-admin.svg)](https://www.npmjs.com/package/dynamodb-admin)
[![CircleCI (all branches)](https://img.shields.io/circleci/project/github/aaronshaf/dynamodb-admin.svg)](https://circleci.com/gh/aaronshaf/dynamodb-admin)
[![CircleCI](https://circleci.com/gh/aaronshaf/dynamodb-admin/tree/master.svg?style=svg)](https://circleci.com/gh/aaronshaf/dynamodb-admin/tree/master)
> GUI for [DynamoDB Local](https://aws.amazon.com/blogs/aws/dynamodb-local-for-desktop-development/) or [dynalite](https://github.com/mhart/dynalite).

@@ -12,3 +11,3 @@

```
```bash
npm install dynamodb-admin -g

@@ -35,3 +34,3 @@ export DYNAMO_ENDPOINT=http://localhost:8000

```
```js
const AWS = require('aws-sdk');

@@ -38,0 +37,0 @@ const {createServer} = require('dynamodb-admin');

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