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

@xapp/dynamo-service

Package Overview
Dependencies
Maintainers
6
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.89 to 0.0.90

dist/service/ValidationError.d.ts

3

dist/service/DynamoService.js

@@ -15,2 +15,3 @@ "use strict";

const Object_1 = require("../utils/Object");
const ValidationError_1 = require("./ValidationError");
const MAX_PUT_ALL_ATTEMPTS = 15;

@@ -214,3 +215,3 @@ class DynamoService {

else {
throw new Error("Could not construct DynamoService. Bad input.");
throw new ValidationError_1.ValidationError("Could not construct DynamoService. Bad input.");
}

@@ -217,0 +218,0 @@ }

@@ -5,2 +5,3 @@ "use strict";

exports.DynamoService = DynamoService_1.DynamoService;
const ValidationError_1 = require("./ValidationError");
const DynamoQueryBuilder_1 = require("../dynamo-query-builder/DynamoQueryBuilder");

@@ -72,9 +73,9 @@ const Object_1 = require("../utils/Object");

if (primaryKeys.length === 0) {
throw new Error("Table " + tableName + " must include a primary key.");
throw new ValidationError_1.ValidationError("Table " + tableName + " must include a primary key.");
}
if (primaryKeys.length > 1) {
throw new Error("Table " + tableName + " must only have one primary key.");
throw new ValidationError_1.ValidationError("Table " + tableName + " must only have one primary key.");
}
if (sortKeys.length > 1) {
throw new Error("Table " + tableName + " can not have more than one sort key.");
throw new ValidationError_1.ValidationError("Table " + tableName + " can not have more than one sort key.");
}

@@ -215,3 +216,3 @@ this.primaryKey = primaryKeys[0];

catch (e) {
throw new Error("The the object requires the keys '" + requiredKeys.join(",") + "'.");
throw new ValidationError_1.ValidationError("The the object requires the keys '" + requiredKeys.join(",") + "'.");
}

@@ -224,3 +225,3 @@ }

catch (e) {
throw new Error("The keys '" + constantKeys.join(",") + "' are constant and can not be modified.");
throw new ValidationError_1.ValidationError("The keys '" + constantKeys.join(",") + "' are constant and can not be modified.");
}

@@ -232,3 +233,3 @@ }

if (knownKeys.indexOf(key) < 0) {
throw new Error("Key '" + key + "' is not defined in the table.");
throw new ValidationError_1.ValidationError("Key '" + key + "' is not defined in the table.");
}

@@ -243,3 +244,3 @@ }

if (bannedKeys[key].test(value)) {
throw new Error("Invalid character found in key '" + value + "'.");
throw new ValidationError_1.ValidationError("Invalid character found in key '" + value + "'.");
}

@@ -254,3 +255,3 @@ }

if (keysWithEnums[key].indexOf(value) < 0) {
throw new Error("Invalid enum value '" + value + "' for key '" + key + "'.");
throw new ValidationError_1.ValidationError("Invalid enum value '" + value + "' for key '" + key + "'.");
}

@@ -265,3 +266,3 @@ }

if (!format[key].test(value)) {
throw new Error("Invalid format '" + value + "' for key '" + key + "'.");
throw new ValidationError_1.ValidationError("Invalid format '" + value + "' for key '" + key + "'.");
}

@@ -268,0 +269,0 @@ }

{
"name": "@xapp/dynamo-service",
"version": "0.0.89",
"version": "0.0.90",
"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