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

electrodb

Package Overview
Dependencies
Maintainers
1
Versions
163
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

electrodb - npm Package Compare versions

Comparing version 0.9.47 to 0.9.48

2

package.json
{
"name": "electrodb",
"version": "0.9.47",
"version": "0.9.48",
"description": "A library to more easily create and interact with multiple entities and heretical relationships in dynamodb",

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

const { QueryTypes, MethodTypes } = require("./types");
const v = require("./validations");
const e = require("./errors");

@@ -360,2 +361,5 @@

action(entity, state, options = {}) {
if (!v.isStringHasLength(options.table) && !v.isStringHasLength(entity._getTableName())) {
throw new e.ElectroError(e.ErrorCodes.MissingTable, `Table name not defined. Table names must be either defined on the model, instance configuration, or as a query option.`);
}
if (state.query.method === MethodTypes.query) {

@@ -362,0 +366,0 @@ return entity._queryParams(state, options);

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

if (option.limit) config.params.Limit = option.limit;
if (option.table) config.params.Limit = option.table;
if (option.table) config.params.TableName = option.table;
config.page = Object.assign({}, config.page, option.page);

@@ -1483,3 +1483,7 @@ config.params = Object.assign({}, config.params, option.params);

if (seenIndexes[indexName] !== undefined) {
throw new e.ElectroError(e.ErrorCodes.DuplicateIndexes, `Duplicate index defined in model: ${accessPattern} ${indexName || "(PRIMARY INDEX)"}`);
if (indexName === "") {
throw new e.ElectroError(e.ErrorCodes.DuplicateIndexes, `Duplicate index defined in model: ${accessPattern} ${indexName || "(PRIMARY INDEX)"}. This could be because you forgot to specify the index name of a secondary index defined in your model.`);
} else {
throw new e.ElectroError(e.ErrorCodes.DuplicateIndexes, `Duplicate index defined in model: ${accessPattern} ${indexName || "(PRIMARY INDEX)"}`);
}
}

@@ -1691,5 +1695,2 @@ seenIndexes[indexName] = indexName;

}
if (typeof table !== "string" || table.length === 0) {
throw new e.ElectroError(e.ErrorCodes.InvalidConfig, `config.table must be string`);
}
/** end beta/v1 condition **/

@@ -1696,0 +1697,0 @@

@@ -118,2 +118,8 @@ // # Errors:

},
MissingTable: {
code: 2003,
section: "missing-table",
name: "MissingTable",
sym: ErrorCode
},
InvalidAttribute: {

@@ -120,0 +126,0 @@ code: 3001,

Sorry, the diff of this file is too big to display

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