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

dynamite

Package Overview
Dependencies
Maintainers
17
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dynamite - npm Package Compare versions

Comparing version 0.7.2 to 0.7.3

11

lib/errors.js

@@ -13,6 +13,6 @@ // Copyright 2013. The Obvious Corporation.

Error.captureStackTrace(this)
this.data = data
this.data = data || {}
this.message = 'The conditional request failed'
this.details = msg
this.table = data.TableName
this.table = data.TableName || 'unknown'
}

@@ -33,6 +33,6 @@ util.inherits(ConditionalError, Error)

Error.captureStackTrace(this)
this.data = data
this.data = data || {}
this.message = 'The level of configured provisioned throughput for the table was exceeded'
this.details = msg
this.table = data.TableName
this.table = data.TableName || 'unknown'
this.isWrite = isWrite

@@ -54,4 +54,5 @@ }

Error.captureStackTrace(this)
this.data = data
this.data = data || {}
this.message = msg
this.table = data.TableName || 'unknown'
this.isWrite = isWrite

@@ -58,0 +59,0 @@ }

@@ -158,5 +158,5 @@ var common = require('./common')

.fail(this.emptyResults)
.failBound(this.convertErrors, null, {attributes: queryData, isWrite: false})
.failBound(this.convertErrors, null, {data: queryData, isWrite: false})
}
module.exports = QueryBuilder

@@ -156,2 +156,10 @@ // Copyright 2013 The Obvious Corporation

return Number(obj.N)
case 'M':
var mapped = {};
for (var k in obj.M) {
mapped[k] = objectToValue(obj.M[k]);
}
return mapped;
case 'L':
return obj.L.map(objectToValue);
default:

@@ -158,0 +166,0 @@ throw new Error('Unexpected key: ' + objectToType(obj) + ' for attribute: ' + obj)

{
"name": "dynamite",
"description": "promise-based DynamoDB client",
"version": "0.7.2",
"version": "0.7.3",
"homepage": "https://github.com/Medium/dynamite",

@@ -6,0 +6,0 @@ "license": "Apache-2.0",

@@ -12,11 +12,2 @@ # Dynamite [![Build Status](https://travis-ci.org/Medium/dynamite.svg?branch=master)](https://travis-ci.org/Medium/dynamite)

Currently, Dynamite runs tests against the [Fake
Dynamo](https://github.com/ananthakumaran/fake_dynamo) Ruby gem. To install the gem:
$ gem install fake_dynamo
To run the service, with an optional log level of `debug` (show everything) on port 4567, run the following in a different terminal window or as a background process:
$ fake_dynamo -l debug -p 4567
Ensure that all of the required node modules are installed in the Dynamite directory by first running:

@@ -26,3 +17,3 @@

The tests will be run against the `fake_dynamo` service running on port `4567`. Currently, there is no way to change the port without modifying the connection code in `test/utils/TestUtils.js`. To run the tests:
The tests will be run against a `LocalDynamo` service. Currently, there is no way to change the port without modifying the connection code in `test/utils/TestUtils.js`. To run the tests:

@@ -29,0 +20,0 @@ $ npm test

@@ -335,1 +335,15 @@ // Copyright 2013 The Obvious Corporation.

})
builder.add(function testValidationError(test) {
var client = this.client
return client.newQueryBuilder('comments')
.setHashKey('garbage', 'postId')
.execute()
.then(function (x) {
test.fail('Expected validation exception')
})
.fail(function (e) {
if (!client.isValidationError(e)) throw e
test.equal('comments', e.table)
})
})
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