Git Product home page Git Product logo

dynasty's People

Contributors

ahassani avatar alexcu avatar alexnaish avatar aterreno avatar cmawhorter avatar codepushr avatar danieljoppi avatar dependabot[bot] avatar elylucas avatar jangerhofer avatar jonathonlui avatar mariopeixoto avatar mike-zorn avatar psykzz avatar spencerfdavis avatar tcf909 avatar timhuff avatar tiwatson avatar vectart avatar victorquinn avatar williamcoates avatar xiex avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

dynasty's Issues

Support of the scan operation

The documented scan operation doesn't seem to be available, there is no mention of it in the current master branch or in the released code.

Calling it results in this:

Object #<Table> has no method 'scan'

Cannot use Between Operator with keyConditions

Cannot use between operator with key conditions due to following code.
https://github.com/victorquinn/dynasty/blob/master/src/lib/aws-translators.coffee
line 14 - target[filter.column].AttributeValueList[0][filter.type || 'S'] = filter.value

Between operator should be like this.
"ComparisonOperator":"BETWEEN", "AttributeValueList": [ {"S": "A"}, {"S": "M"} ]

@victorquinn can we fix this by checking if filter.op Between at line 14 or any quick workaround?

current {keyConditions: [{column: 'createdDate', op: 'BETWEEN', value: '4'}]}
suggestion {keyConditions: [{column: 'createdDate', op: 'BETWEEN', value: ['4', '6']}]}
And then update line 14 accordingly. Will this work?

filterValues = _.isArray(filter.value)?filter.value:[filter.value]
filterValues.forEach((value, key) => target[filter.column].AttributeValueList[key][filter.type || 'S'] = value)

'name' keyword is reserved on update but not for insert

Hey Victor,

I notice that the name property is reserved when trying to do an update but not when trying to do an insert.

Here's an example of what I mean:

let insertEntry = createTable.then(
    function (data) {
        //return a promise (will automatically not wrap in another promise) thanks to JS awesomeness
        //if entry exists - will overwrite
        return dynasty
            .table('calvinTable')
            .insert({
                id: '1',
                name: 'calvin'
            });
    }
    // don't have an error handler here because the 'then' above took care of it
    // really we should be using catch instead of supplying a success and error handler
);

let queryEntryThatWasJustInserted = insertEntry.then(
    function (data) { //data is unwrapped promise
        //return a promise (will automatically not wrap in another promise)
        console.log('Item was inserted successfully');
        return dynasty
            .table('calvinTable')
            .find({hash: "1"});
    },
    function (err) {
        //uh oh previous step had a problem
    }
);

After that I try to update the entry that I just inserted

let updateAfterQuery = queryResults.then(
    function (data) {
        //return a promise (will automatically not wrap in another promise)
        return dynasty
            .table('calvinTable')
            .update('1', {
                name: 'calvin2',
                scala: 'isawesome'
            });
    }
);

let updateResults = updateAfterQuery.then(
    function (data) {   //data is unwrapped promise
        console.log('updated:');
        console.log(data);
    },
    function (err) {
        console.log("Uh oh, that didn't work");
        console.log(err);
    }
);

I get a okay for the table insert

Item was inserted successfully
The results are in: 
{ name: 'calvin', id: '1' }

But I get a validation exception on the update

Uh oh, that didn't work
{ [ValidationException: Invalid UpdateExpression: Attribute name is a reserved keyword; reserved keyword: name]
  cause: 
   { [ValidationException: Invalid UpdateExpression: Attribute name is a reserved keyword; reserved keyword: name]
     message: 'Invalid UpdateExpression: Attribute name is a reserved keyword; reserved keyword: name',
     code: 'ValidationException',
     time: Mon Sep 28 2015 21:28:17 GMT-0400 (Eastern Daylight Time),
     statusCode: 400,
     retryable: false,
     retryDelay: 0 },
  isOperational: true,
  code: 'ValidationException',
  time: Mon Sep 28 2015 21:28:17 GMT-0400 (Eastern Daylight Time),
  statusCode: 400,
  retryable: false,
  retryDelay: 0 }

Options are ignored

Options supplied to dynasty seem to be ignored in aws-translators.coffee

The following prints {} but I would expect it to print {id: 'one', name: 'First Thing'}.

dynasty.table('my_table')
.update({id: 'one', name: 'First Thing'}, {ReturnValues: 'ALL_NEW'})
.then(function(item) {
  console.log(item);
})

This becomes more of a problem with updating records, especially if decrementing/incrementing values.

Remove dependency on the dynamodb library

Under the hood we're using the dynamodb library.

Would be nice to remove that dependency and directly use the official aws-sdk library from Amazon so further changes to the DynamoDB API won't put is in the awkward position of relying on a third-party library when it's really not all that necessary.

dynasty breaks with latest aws-sdk

Hi there, I was trying to use dynasty with "aws-sdk": "^2.307.0", we got it working with "aws-sdk": "2.255.1" on older code but it breaks big time.

Pasting here the error:

{
    "errorMessage": "Cannot promisify an API that has normal methods with 'Async'-suffix\n\n    See http://goo.gl/iWrZbw\n",
    "errorType": "TypeError",
    "stackTrace": [
        "",
        "    See http://goo.gl/iWrZbw",
        "",
        "checkValid (/var/task/node_modules/dynasty/node_modules/bluebird/js/main/promisify.js:55:27)",
        "promisifiableMethods (/var/task/node_modules/dynasty/node_modules/bluebird/js/main/promisify.js:78:5)",
        "promisifyAll (/var/task/node_modules/dynasty/node_modules/bluebird/js/main/promisify.js:241:9)",
        "Function.Promise.promisifyAll (/var/task/node_modules/dynasty/node_modules/bluebird/js/main/promisify.js:304:12)",
        "new Dynasty (/var/task/node_modules/dynasty/lib/dynasty.js:39:15)",
        "module.exports (/var/task/node_modules/dynasty/lib/dynasty.js:224:12)",
        "Object.<anonymous> (/var/task/src/utils.js:1:97)",
        "Module._compile (module.js:652:30)",
        "Object.Module._extensions..js (module.js:663:10)",
        "Module.load (module.js:565:32)",
        "tryModuleLoad (module.js:505:12)",
        "Function.Module._load (module.js:497:3)",
        "Module.require (module.js:596:17)",
        "require (internal/module.js:11:18)",
        "Object.<anonymous> (/var/task/src/automaticSwitch.js:10:56)",
        "Module._compile (module.js:652:30)",
        "Object.Module._extensions..js (module.js:663:10)",
        "Module.load (module.js:565:32)",
        "tryModuleLoad (module.js:505:12)",
        "Function.Module._load (module.js:497:3)",
        "Module.require (module.js:596:17)",
        "require (internal/module.js:11:18)",
        "Object.<anonymous> (/var/task/iopipe_handlers/automaticSwitch-iopipe.js:8:13)",
        "Module._compile (module.js:652:30)",
        "Object.Module._extensions..js (module.js:663:10)",
        "Module.load (module.js:565:32)",
        "tryModuleLoad (module.js:505:12)",
        "Function.Module._load (module.js:497:3)"
    ]
}

It seems like they added/changed some functions in the DynamoDB library, calling them with the async prefix, so bluebird goes nuts.

https://github.com/petkaantonov/bluebird/wiki/Error:-Cannot-promisify-an-API-that-has-normal-methods

Increment version number

Since 0.0.9, we've

  • Implemented remove via aws
  • Changed our build process to not need the js files in the repo
  • Added update to the Table class to make putItem a little clearer for those coming from SQL

I think that's probably good enough for a version increment. Also, @CydeWeys is currently using a package json pointing at a sha in this repo to use dynasty in fast-action which is less than ideal.

.list() optional parameters

It appears that the code doesn't support the optional parameter as 'optional' when using a callback...

Need to shift the callback function given to the callback variable in the method if no parameter is given.

In JS I usually use something like:

//Handle options arguments
if( _.isUndefined(cb) )
if( _.isFunction(param) )
( param = options ) && ( param = undefined );

Not sure what you would do with that in CoffeeScript.

To reproduce:

var tableList = dynamo.list(function( err, test){

console.log('test');

});

and you will see the callback is never called.

The find() promise will resolve with undefined, but it should be rejecting

The bug is due to the fromDynamo method in data-translators.coffee. The expected result is that if dynasty is unable to find the value for the requested key then it should reject with an error.

var dynasty = require('dynasty')({ accessKeyId: 'redacted', secretAccessKey: 'redacted' }),
    accounts = dynasty.table('accounts'),
    log = require('npmlog'),
    resolved = log.info.bind(log, 'Resolved'),
    rejected = log.warn.bind(log, 'Rejected');

accounts.find(-1).then(resolved, rejected);
>> info Resolved undefined

Using local DynamoDB tool

Amazon is providing a tool for local Dynamo development. This is a jar to launch and then you connect to it through:

dynamo = new aws.DynamoDB({ endpoint: new aws.Endpoint('http://localhost:8000') })

No endpoint can be specified at the current version of Dynasty.

I would have written a pull request if the tests of the master branch were passing here but I got one error. Is this problem known?

1) aws-translators #deleteItem "before each" hook:
     Error: global leak detected: key

`update` replaces entire entry

.update is currently a synonym for .insert which replaces an entry with the associated key. .update should use DynamoDB's UpdateItem, not PutItem.

e.g.

var my_table = dynasty.table('my_table);

my_table.insert({
  id: 5, // The hash key of the table
  name: 'An ietm',
  description: 'A thing'
})
.then(function() {
  my_table.update({
    id: 5,
    name: 'An item'
});

This leaves you with an entry lacking the description field.

Table is not a constructor

Hi,

Thanks for the library. Trying to use this within an Alexa lambda function and am testing simple functions to see if I am connecting properly. I can successfully create a table and see the result in DynamoDB, but when I try to use dynasty.table(tableName) it throw a "Table is not a constructor" error. I am using the same syntax that I say on this page http://dynastyjs.com/table.html

At the moment I am running the script locally, but connecting to DynamoDB on aws (not locally).

Any insight would be very much appreciated.

Thanks,
Jarrod

scan is not implemented correctly according to http://dynastyjs.com/#scan

Hello Victor,

It seems that scan ignores {ExclusiveStartKey: <startkey>} when passed in as an argument, I took a deeper look into this and I found the following
https://github.com/victorquinn/dynasty/blob/master/src/lib/aws-translators.coffee#L106

awsParams =
    TableName: @name
    ScanFilter: {}
    Select: 'SPECIFIC_ATTRIBUTES'
    AttributesToGet: params.attrsGet || [keySchema.hashKeyName]
    Limit: params.limit
    TotalSegments: params.totalSegment
    Segment: params.segment

There is no mention of ExclusiveStartKey. Not too bad to fix this, just need to add
ExclusiveStartKey: params.ExclusiveStartKey if you want it to adhere to the dynastyjs documentation

Also scan should return a LastEvaluatedKey, however when doing
https://github.com/victorquinn/dynasty/blob/master/src/lib/aws-translators.coffee#L128

  @parent.dynamo.scanAsync(awsParams)
    .then (data)->
      dataTrans.fromDynamo(data.Items)
    .nodeify(callback)

The LastEvaluatedKey is not passed to the user as it exists in data.LastEvaluatedKey,
Ideally, this should be doing something along the lines of

@parent.dynamo.scanAsync(awsParams)
    .then (data)->
      result = 
              Items: dataTrans.fromDynamo(data.Items),
              Count: data.Count,
              LastEvaluatedKey: data.LastEvaluatedKey
    .nodeify(callback)

This way the fromDynamo function can remain as is and the information can propagate through to the user

I deduced this information based on the debugger
image

Constructor should return instance of self

At current, can't use shorthand:

dynasty = require('dynasty')(credentials)

Because dynasty's constructor isn't returning an instance of itself. Fix this!

Currently you have to do:

Dynasty = require('dynasty')
dynasty = new Dynasty(credentials)

Chain-ify `remove`

@ApeChimp
I'm going to need Table.remove tomorrow so I'll probably have a go at getting it to resemble Table.find tonight. My thoughts, for your consideration:

I don't want any mishaps with remove. As a result, I thought that all remove calls could take one of the following forms:

Hash Tables
users.remove().one().hash(id)
users.remove().all()

Hash/Range Tables
posts.remove().one().hash(user_id).range(timestamp)
posts.remove().some().hash(user_id)
posts.remove().all()

Any deviation from this (such as providing a range key on a some call) will result in the function throwing an error.

This function is going to be a bit more involved than find because some and all will have to use a query or scan and a batchWrite operation, which can be a bit of a pain. Luckily, I already have these functions in When-DynamoDB, so I should be able to just port them over pretty quickly.

Doesn't work with serverless-optimize-plugin

Hi All,

Been using Dynasty for a while now but wanted to reduce the size of my Lambda functions so brought in the serverless-optimize-plugin. However theres an exception thrown in the code when the plugin is used and the lambda is executed.

I've done some digging and from the stacktrace (heavily reduced for brevity):

module initialization error: TypeError
at assertPath (path.js:28:11)
at dirname (path.js:1349:5)
at requireDirectory
at Object.4.require-directory
at Object.3../lib
at Object.75.dynasty/lib/dynasty

I think the issue lies with the require-directory module where since the file is now bundled and minified into one file by the optimisation plugin it fails to resolve the path as its no longer in a traditional file system anymore.

I'm going to fork this and test it (and if so create a PR to hopefully be merged back in) but wanted to raise this with you because this is a fantastic module overall and its perfectly met my needs over the years so far!

SSL error when connecting to a local DynamoDB instance

When trying to access a local instance of DynamoDB we are getting an error connecting

Sample Code
`var credentials = {
accessKeyId: '',
secretAccessKey: '<YOUR_SECRET_ACCESS_KEY>'
};
var dynasty = require('dynasty')(credentials, 'localhost:8000');

var user = dynasty.table('Music'),
promise = user.find('No One You Know');
console.log(promise)
promise.then(function(user) {
console.log('********')
console.log(user)
});
`

Error

`Promise {
_bitField: 0,
_fulfillmentHandler0: undefined,
_rejectionHandler0: undefined,
_progressHandler0: undefined,
_promise0: undefined,
_receiver0: undefined,
_settledValue: undefined }
Unhandled rejection Error: write EPROTO 140735176974336:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:794:

at exports._errnoException (util.js:907:11)
at WriteWrap.afterWrite (net.js:785:14)`

Unable to find item without range key

When trying to find an item without a range key ...

var promise = table.find({ hash: 'some-user-id', range: 'some-date' }) // works
var promise = table.find('some-user-id') // fails, see error below:

... I get this:

Unhandled rejection ValidationException: The provided key element does not match the schema
    at Request.extractError (/app/node_modules/aws-sdk/lib/protocol/json.js:43:27)
    at Request.callListeners (/app/node_modules/aws-sdk/lib/sequential_executor.js:105:20)
    at Request.emit (/app/node_modules/aws-sdk/lib/sequential_executor.js:77:10)
    at Request.emit (/app/node_modules/aws-sdk/lib/request.js:596:14)
    at Request.transition (/app/node_modules/aws-sdk/lib/request.js:21:10)
    at AcceptorStateMachine.runTo (/app/node_modules/aws-sdk/lib/state_machine.js:14:12)
    at /app/node_modules/aws-sdk/lib/state_machine.js:26:10
    at Request.<anonymous> (/app/node_modules/aws-sdk/lib/request.js:37:9)
    at Request.<anonymous> (/app/node_modules/aws-sdk/lib/request.js:598:12)
    at Request.callListeners (/app/node_modules/aws-sdk/lib/sequential_executor.js:115:18)
    at Request.emit (/app/node_modules/aws-sdk/lib/sequential_executor.js:77:10)
    at Request.emit (/app/node_modules/aws-sdk/lib/request.js:596:14)
    at Request.transition (/app/node_modules/aws-sdk/lib/request.js:21:10)
    at AcceptorStateMachine.runTo (/app/node_modules/aws-sdk/lib/state_machine.js:14:12)
    at /app/node_modules/aws-sdk/lib/state_machine.js:26:10
    at Request.<anonymous> (/app/node_modules/aws-sdk/lib/request.js:37:9)

Any ideas as to why this happens? Is it mandatory to supply the range key?

Update issue

I seem to be having issues with updating DynamoDB. Here is the function:

DynastyUtil.prototype.updateJob = function(data, cb){
  var table = this.dynasty.table('jobs');
  console.log(data);
  var item = {
    step: data.step,
    status: data.stepstatus,
    stepsStatus: data.jobstatus
  }
  console.log('data.JOBID: ',data.jobid);
  table.update({hash: data.jobid},{
    step: data.step,
    status: data.stepstatus,
    stepsStatus: data.jobstatus
  }).then(function(res){
    if (res && typeof cb == 'function') {
      cb()
    }
  },function(err){
    logentries.logging(logentries.LOG_LEVEL_ERR,err);
  })
}

The error I get is:

  • MissingRequiredParameter: Missing required key 'Key' in params
  • UnexpectedParameter: Unexpected key 'Item' found in params

GSI translator on table creation is not working

While trying to create a table with Global Secondary Index, the translator throws errors saying missing AttributeType or something like that. That's due to the fact that the aws translator is adding the wrong columns to the attribute definitions.

I'll send a PR for this.

`dynasty.table()` requires the table to exist

The following example fails due to a race condition where the table has not yet been created.

dynasty.list()
  .then(function(resp) {
    if (resp.TableNames.indexOf(`my_table`) === -1) {
      dynasty.create('my_table', {key_schema: {hash: ['id', 'string']}});
    }
  });
exports.my_table = dynasty.table('my_table');

Doing any operation on my_table fails with the error Unhandled rejection ResourceNotFoundException: Cannot do operations on a non-existent table even after the table has been successfully created.

Is it possible to allow dynasty.table() to be lazy (i.e. the table does not need to exist when the object is created) or make it a promise somehow?

What I'm trying to achieve is:

  1. Create my_table if necessary
  2. Export dynasty.table('my_table')

toDynamo array data types cause DynamoDB insertion errors

In data-translators.js, in the toDynamo function, there is some logic that picks a Dynamo data type for an inputted JavaScript array. If the array contains all numbers, it gets the NS or Number Set data type. If the array contains all strings, it gets the SS or String Set data type. And then if the array contains only objects, it gets the L or List data type.

The problem is that Number Set or String Set data types require every element of the array to be unique, and the insertion/update will fail if the JavaScript array contains duplicates. So using Dynasty there's no way to save a JavaScript array with duplicate values. I don't see a downside to simply assigning the List data type to every array, since it can handle various data types within, has no restriction on duplicates, and is even suggested as the most similar to a JSON array in the AWS doc on this topic.

Alternatively, in the logic that checks for all numbers or all strings in an array before assigning a Set data type, you could also check that the array only contains unique values. But I think using List data type for all arrays may be simpler.

Link to code:
https://github.com/victorquinn/dynasty/blob/master/src/lib/data-translators.coffee#L49

batchFind results in thrown validation errors

I'm having trouble performing a batchFind. Here's an example scenario:

created a table with:

const options = {
  key_schema: { hash: ['id', 'string'] },
  throughput: { write: 5, read: 5 },
};

await dynasty.create('fruit', options);

inserted data:

await dynasty.table('fruit').insert({ id: 'apple-id', name: 'Apple', colour: 'red' });
await dynasty.table('fruit').insert({ id: 'orange-id', name: 'Orange', colour: 'orange' })

finding a single item works without a hitch:

const apple = await dynasty.table('fruit').find('apple-id');
console.log(apple);
// {
// 	id: 'apple-id',
// 	name: 'Apple',
// 	colour: 'red'
// }

however, when I want to find items with ids 'apple-id' and 'orange-id', this happens:

try {
  const applesAndOranges = await dynasty.table('fruit').batchFind(['apple-id', 'orange-id']);
  console.log(applesAndOranges);
} catch (error) {
  console.log('error', error);
}

//   error:
//    { MultipleValidationErrors: There were 2 validation errors:
// * UnexpectedParameter: Unexpected key '0' found in params
// * UnexpectedParameter: Unexpected key '1' found in params
//     at ParamValidator.validate (/Users/eric/sites/fruity-example/node_modules/aws-sdk/lib/param_validator.js:40:28)
//     at Request.VALIDATE_PARAMETERS (/Users/eric/sites/fruity-example/node_modules/aws-sdk/lib/event_listeners.js:126:42)
//     at Request.callListeners (/Users/eric/sites/fruity-example/node_modules/aws-sdk/lib/sequential_executor.js:106:20)
//     at callNextListener (/Users/eric/sites/fruity-example/node_modules/aws-sdk/lib/sequential_executor.js:96:12)
//     at /Users/eric/sites/fruity-example/node_modules/aws-sdk/lib/event_listeners.js:86:9
//     at finish (/Users/eric/sites/fruity-example/node_modules/aws-sdk/lib/config.js:341:7)
//     at /Users/eric/sites/fruity-example/node_modules/aws-sdk/lib/config.js:359:9
//     at Credentials.get (/Users/eric/sites/fruity-example/node_modules/aws-sdk/lib/credentials.js:126:7)
//     at getAsyncCredentials (/Users/eric/sites/fruity-example/node_modules/aws-sdk/lib/config.js:353:24)
//     at Config.getCredentials (/Users/eric/sites/fruity-example/node_modules/aws-sdk/lib/config.js:373:9)
//     at Request.VALIDATE_CREDENTIALS (/Users/eric/sites/fruity-example/node_modules/aws-sdk/lib/event_listeners.js:81:26)
//     at Request.callListeners (/Users/eric/sites/fruity-example/node_modules/aws-sdk/lib/sequential_executor.js:102:18)
//     at Request.emit (/Users/eric/sites/fruity-example/node_modules/aws-sdk/lib/sequential_executor.js:78:10)
//     at Request.emit (/Users/eric/sites/fruity-example/node_modules/aws-sdk/lib/request.js:683:14)
//     at Request.transition (/Users/eric/sites/fruity-example/node_modules/aws-sdk/lib/request.js:22:10)
//     at AcceptorStateMachine.runTo (/Users/eric/sites/fruity-example/node_modules/aws-sdk/lib/state_machine.js:14:12)
//     at Request.runTo (/Users/eric/sites/fruity-example/node_modules/aws-sdk/lib/request.js:403:15)
//     at Request.send (/Users/eric/sites/fruity-example/node_modules/aws-sdk/lib/request.js:367:10)
//     at features.constructor.makeRequest (/Users/eric/sites/fruity-example/node_modules/aws-sdk/lib/service.js:205:27)
//     at features.constructor.svc.(anonymous function) [as batchGetItem] (/Users/eric/sites/fruity-example/node_modules/aws-sdk/lib/service.js:652:23)
//     at features.constructor.tryCatcher (/Users/eric/sites/fruity-example/node_modules/bluebird/js/release/util.js:16:23)
//     at features.constructor.ret [as batchGetItemPromise] (eval at makeNodePromisifiedEval (/Users/eric/sites/fruity-example/node_modules/bluebird/js/release/promisify.js:184:12), <anonymous>:13:39)
//      cause:
//       { MultipleValidationErrors: There were 2 validation errors:
// * UnexpectedParameter: Unexpected key '0' found in params
// * UnexpectedParameter: Unexpected key '1' found in params
//     at ParamValidator.validate (/Users/eric/sites/fruity-example/node_modules/aws-sdk/lib/param_validator.js:40:28)
//     at Request.VALIDATE_PARAMETERS (/Users/eric/sites/fruity-example/node_modules/aws-sdk/lib/event_listeners.js:126:42)
//     at Request.callListeners (/Users/eric/sites/fruity-example/node_modules/aws-sdk/lib/sequential_executor.js:106:20)
//     at callNextListener (/Users/eric/sites/fruity-example/node_modules/aws-sdk/lib/sequential_executor.js:96:12)
//     at /Users/eric/sites/fruity-example/node_modules/aws-sdk/lib/event_listeners.js:86:9
//     at finish (/Users/eric/sites/fruity-example/node_modules/aws-sdk/lib/config.js:341:7)
//     at /Users/eric/sites/fruity-example/node_modules/aws-sdk/lib/config.js:359:9
//     at Credentials.get (/Users/eric/sites/fruity-example/node_modules/aws-sdk/lib/credentials.js:126:7)
//     at getAsyncCredentials (/Users/eric/sites/fruity-example/node_modules/aws-sdk/lib/config.js:353:24)
//     at Config.getCredentials (/Users/eric/sites/fruity-example/node_modules/aws-sdk/lib/config.js:373:9)
//     at Request.VALIDATE_CREDENTIALS (/Users/eric/sites/fruity-example/node_modules/aws-sdk/lib/event_listeners.js:81:26)
//     at Request.callListeners (/Users/eric/sites/fruity-example/node_modules/aws-sdk/lib/sequential_executor.js:102:18)
//     at Request.emit (/Users/eric/sites/fruity-example/node_modules/aws-sdk/lib/sequential_executor.js:78:10)
//     at Request.emit (/Users/eric/sites/fruity-example/node_modules/aws-sdk/lib/request.js:683:14)
//     at Request.transition (/Users/eric/sites/fruity-example/node_modules/aws-sdk/lib/request.js:22:10)
//     at AcceptorStateMachine.runTo (/Users/eric/sites/fruity-example/node_modules/aws-sdk/lib/state_machine.js:14:12)
//     at Request.runTo (/Users/eric/sites/fruity-example/node_modules/aws-sdk/lib/request.js:403:15)
//     at Request.send (/Users/eric/sites/fruity-example/node_modules/aws-sdk/lib/request.js:367:10)
//     at features.constructor.makeRequest (/Users/eric/sites/fruity-example/node_modules/aws-sdk/lib/service.js:205:27)
//     at features.constructor.svc.(anonymous function) [as batchGetItem] (/Users/eric/sites/fruity-example/node_modules/aws-sdk/lib/service.js:652:23)
//     at features.constructor.tryCatcher (/Users/eric/sites/fruity-example/node_modules/bluebird/js/release/util.js:16:23)
//     at features.constructor.ret [as batchGetItemPromise] (eval at makeNodePromisifiedEval (/Users/eric/sites/fruity-example/node_modules/bluebird/js/release/promisify.js:184:12), <anonymous>:13:39)
//         message: 'There were 2 validation errors:\n* UnexpectedParameter: Unexpected key \'0\' found in params\n* UnexpectedParameter: Unexpected key \'1\' found in params',
//         code: 'MultipleValidationErrors',
//         errors: [Array],
//         time: 2018-11-13T21:47:22.549Z },
//      isOperational: true,
//      code: 'MultipleValidationErrors',
//      errors: [ [Object], [Object] ],
//      time: 2018-11-13T21:47:22.549Z,
//      timestamp: '2018-11-13T21:47:22.550Z' } }

I think i'm doing everything right according to the docs. What am I missing?

I'm using dynasty version 0.3.14

Test runner broken

Looks like no tests are actually being run by Travis. The output of the last run looks like this:

> [email protected] test /home/travis/build/victorquinn/dynasty
> grunt test
Running "coffee:compile" (coffee) task
>> 5 files created.
Running "coffee:compileTests" (coffee) task
>> 1 files created.
Running "simplemocha:all" (simplemocha) task
  0 passing (2ms)
Done, without errors.
The command "npm test" exited with 0.
Done. Your build exited with 0.

doc about error handling?

I couldn't find any doc about how to handle errors for dynasty. Since it's promise-based, I'm guessing it supports all the error handling functions come with promise. catch, fail, and done.

Please confirm. And maybe update the doc regarding error handling?

Thanks

Got An error on M type

I have a M type on my dynamoDB

on translator got this error
throw new Error('Non Compatible Field [not "S"|"N"|"NS"|"SS"]: ' + key);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.