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

@xapp/dynamo-service

Package Overview
Dependencies
Maintainers
5
Versions
155
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xapp/dynamo-service - npm Package Compare versions

Comparing version 0.0.98 to 0.0.99

xapp-dynamo-service-0.0.98.tgz

16

.vscode/settings.json
{
"files.exclude": {
"**/.git": true,
"**/.DS_Store": true,
"**/*.js.map": true
},
"search.exclude": {
"**/node_modules": true,
"**/bower_components": true,
"**/outputs": true,
"**/.nyc_output": true,
"**/api.yaml": true
},
"files.trimTrailingWhitespace": true,
"typescript.tsdk": "node_modules/typescript/lib",
"tslint.enable": true,
"tslint.autoFixOnSave": true,
"cSpell.words": [

@@ -3,0 +19,0 @@ "dynoservice"

4

dist/service/DynamoService.d.ts
import { DynamoDB } from "aws-sdk";
export declare const MAX_PUT_ALL_ATTEMPTS = 15;
export declare type ConstructorDB = DynamoDB | DynamoDB.DocumentClient;

@@ -51,3 +52,4 @@ export interface QueryResult<T> {

put(TableName: string, obj: DynamoDB.DocumentClient.PutItemInputAttributeMap, condition: ConditionExpression): Promise<DynamoDB.DocumentClient.PutItemOutput>;
put(TableName: string, obj: DynamoDB.DocumentClient.PutItemInputAttributeMap[], props?: PutAllServiceProps): Promise<DynamoDB.DocumentClient.PutItemInputAttributeMap[]>;
put(TableName: string, obj: DynamoDB.DocumentClient.PutItemInputAttributeMap[]): Promise<DynamoDB.DocumentClient.PutItemInputAttributeMap[]>;
put(TableName: string, obj: DynamoDB.DocumentClient.PutItemInputAttributeMap[], props: PutAllServiceProps): Promise<DynamoDB.DocumentClient.PutItemInputAttributeMap[]>;
update<T>(table: string, key: DynamoDB.DocumentClient.Key, update: UpdateBody<T>): Promise<void>;

@@ -54,0 +56,0 @@ update<T>(table: string, key: DynamoDB.DocumentClient.Key, update: UpdateBody<T>, condition: ConditionExpression): Promise<void>;

@@ -16,3 +16,3 @@ "use strict";

const ValidationError_1 = require("./ValidationError");
const MAX_PUT_ALL_ATTEMPTS = 15;
exports.MAX_PUT_ALL_ATTEMPTS = 15;
class DynamoService {

@@ -124,3 +124,3 @@ constructor(db) {

const promises = [];
const attempts = props.attempts || MAX_PUT_ALL_ATTEMPTS;
const attempts = props.attempts || exports.MAX_PUT_ALL_ATTEMPTS;
for (let i = 0; i < writeRequests.length; i += 25) {

@@ -127,0 +127,0 @@ const sliced = writeRequests.slice(i, i + 25);

@@ -89,11 +89,10 @@ "use strict";

return this.db.put(this.tableName, putObj, primaryExistsQuery.and(condition).query())
.then((res) => { return putObj; });
.then((res) => this.convertObjFromDynamo(putObj));
}
putAll(obj) {
const putObjs = obj.map((o) => this.validateAndConvertObjectToPutObject(o));
return this.db.put(this.tableName, putObjs).then(unprocessed => {
return {
unprocessed: unprocessed
};
});
return this.db.put(this.tableName, putObjs, { attempts: DynamoService_1.MAX_PUT_ALL_ATTEMPTS })
.then((unprocessed) => ({
unprocessed: unprocessed.map((u) => this.convertObjFromDynamo(u))
}));
}

@@ -100,0 +99,0 @@ update(key, obj, conditionExpression, returnType) {

{
"name": "@xapp/dynamo-service",
"version": "0.0.98",
"version": "0.0.99",
"description": "A dynamo help class which will help maintain data integrity.",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

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