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

express-cassandra

Package Overview
Dependencies
Maintainers
1
Versions
98
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-cassandra - npm Package Compare versions

Comparing version 2.2.2 to 2.2.3

.nyc_output/692a279c3783f9cc332b7effe48f253b.json

7

CHANGELOG.md

@@ -9,2 +9,6 @@ # Changelog

## [2.2.3] - 2018-07-10
### Fixed
- Auto timestamp and version fields are not working properly if used in index and materialized views
## [2.2.2] - 2018-06-17

@@ -489,3 +493,4 @@ ### Fixed

[Unreleased]: https://github.com/masumsoft/express-cassandra/compare/v2.2.2...master
[Unreleased]: https://github.com/masumsoft/express-cassandra/compare/v2.2.3...master
[2.2.3]: https://github.com/masumsoft/express-cassandra/compare/v2.2.2...v2.2.3
[2.2.2]: https://github.com/masumsoft/express-cassandra/compare/v2.2.1...v2.2.2

@@ -492,0 +497,0 @@ [2.2.1]: https://github.com/masumsoft/express-cassandra/compare/v2.2.0...v2.2.1

79

lib/validators/schema.js

@@ -12,2 +12,23 @@ 'use strict';

},
has_field(modelSchema, fieldName) {
var optionFieldNames = [];
if (modelSchema.options) {
if (modelSchema.options.timestamps) {
var timestampOptions = {
createdAt: modelSchema.options.timestamps.createdAt || 'createdAt',
updatedAt: modelSchema.options.timestamps.updatedAt || 'updatedAt'
};
optionFieldNames.push(timestampOptions.createdAt);
optionFieldNames.push(timestampOptions.updatedAt);
}
if (modelSchema.options.versions) {
var versionOptions = {
key: modelSchema.options.versions.key || '__v'
};
optionFieldNames.push(versionOptions.key);
}
}
return _.has(modelSchema.fields, fieldName) || optionFieldNames.includes(fieldName);
},
validate_field(modelSchema, fieldObject, fieldName) {

@@ -35,7 +56,9 @@ if (!fieldObject) {

validate_primary_key(modelSchema) {
var _this = this;
if (typeof modelSchema.key[0] === 'string') {
if (!_.has(modelSchema.fields, modelSchema.key[0])) {
if (!this.has_field(modelSchema, modelSchema.key[0])) {
throw new Error('Partition Key must also be a valid field name');
}
if (modelSchema.fields[modelSchema.key[0]].virtual) {
if (modelSchema.fields[modelSchema.key[0]] && modelSchema.fields[modelSchema.key[0]].virtual) {
throw new Error("Partition Key must also be a db field name, can't be a virtual field name");

@@ -48,6 +71,6 @@ }

modelSchema.key[0].forEach(function (partitionKeyField) {
if (typeof partitionKeyField !== 'string' || !_.has(modelSchema.fields, partitionKeyField)) {
if (typeof partitionKeyField !== 'string' || !_this.has_field(modelSchema, partitionKeyField)) {
throw new Error('Partition Key array must contain only valid field names');
}
if (modelSchema.fields[partitionKeyField].virtual) {
if (modelSchema.fields[partitionKeyField] && modelSchema.fields[partitionKeyField].virtual) {
throw new Error("Partition Key array must contain only db field names, can't contain virtual field names");

@@ -62,6 +85,6 @@ }

if (primaryKeyIndex > 0) {
if (typeof primaryKeyField !== 'string' || !_.has(modelSchema.fields, primaryKeyField)) {
if (typeof primaryKeyField !== 'string' || !_this.has_field(modelSchema, primaryKeyField)) {
throw new Error('Clustering Keys must be valid field names');
}
if (modelSchema.fields[primaryKeyField].virtual) {
if (modelSchema.fields[primaryKeyField] && modelSchema.fields[primaryKeyField].virtual) {
throw new Error("Clustering Keys must be db field names, can't be virtual field names");

@@ -89,2 +112,4 @@ }

validate_materialized_view(modelSchema, materializedViewObject, materializedViewName) {
var _this2 = this;
if (!_.isPlainObject(materializedViewObject)) {

@@ -103,3 +128,3 @@ throw new Error(util.format('attribute "%s" under materialized_views must be an object', materializedViewName));

materializedViewObject.select.forEach(function (materializedViewSelectField) {
if (typeof materializedViewSelectField !== 'string' || !(_.has(modelSchema.fields, materializedViewSelectField) || materializedViewSelectField === '*')) {
if (typeof materializedViewSelectField !== 'string' || !(_this2.has_field(modelSchema, materializedViewSelectField) || materializedViewSelectField === '*')) {
throw new Error(util.format('the select attribute under materialized_view %s must be an array of field name strings or ["*"]', materializedViewName));

@@ -115,6 +140,6 @@ }

if (typeof materializedViewObject.key[0] === 'string') {
if (!_.has(modelSchema.fields, materializedViewObject.key[0])) {
if (!this.has_field(modelSchema, materializedViewObject.key[0])) {
throw new Error(util.format('materialized_view %s: partition key string must match a valid field name', materializedViewName));
}
if (modelSchema.fields[materializedViewObject.key[0]].virtual) {
if (modelSchema.fields[materializedViewObject.key[0]] && modelSchema.fields[materializedViewObject.key[0]].virtual) {
throw new Error(util.format('materialized_view %s: partition key must match a db field name, cannot be a virtual field name', materializedViewName));

@@ -127,6 +152,6 @@ }

materializedViewObject.key[0].forEach(function (materializedViewPartitionKeyField) {
if (typeof materializedViewPartitionKeyField !== 'string' || !_.has(modelSchema.fields, materializedViewPartitionKeyField)) {
if (typeof materializedViewPartitionKeyField !== 'string' || !_this2.has_field(modelSchema, materializedViewPartitionKeyField)) {
throw new Error(util.format('materialized_view %s: partition key array must contain only valid field names', materializedViewName));
}
if (modelSchema.fields[materializedViewPartitionKeyField].virtual) {
if (modelSchema.fields[materializedViewPartitionKeyField] && modelSchema.fields[materializedViewPartitionKeyField].virtual) {
throw new Error(util.format('materialized_view %s: partition key array must contain only db field names, ' + 'cannot contain virtual field names', materializedViewName));

@@ -141,6 +166,6 @@ }

if (materializedViewPrimaryKeyIndex > 0) {
if (typeof materializedViewPrimaryKeyField !== 'string' || !_.has(modelSchema.fields, materializedViewPrimaryKeyField)) {
if (typeof materializedViewPrimaryKeyField !== 'string' || !_this2.has_field(modelSchema, materializedViewPrimaryKeyField)) {
throw new Error(util.format('materialized_view %s: clustering keys must be valid field names', materializedViewName));
}
if (modelSchema.fields[materializedViewPrimaryKeyField].virtual) {
if (modelSchema.fields[materializedViewPrimaryKeyField] && modelSchema.fields[materializedViewPrimaryKeyField].virtual) {
throw new Error(util.format('materialized_view %s: clustering keys must be db field names, cannot contain virtual fields', materializedViewName));

@@ -178,13 +203,13 @@ }

}
if (!_.has(modelSchema.fields, indexNameList[1])) {
if (!this.has_field(modelSchema, indexNameList[1])) {
throw new Error(util.format('"%s" is not a valid field name, indexes must be defined on field names', indexNameList[1]));
}
if (modelSchema.fields[indexNameList[1]].virtual) {
if (modelSchema.fields[indexNameList[1]] && modelSchema.fields[indexNameList[1]].virtual) {
throw new Error("indexes must be an array of db field names, can't contain virtual fields");
}
} else {
if (!_.has(modelSchema.fields, indexNameList[0])) {
if (!this.has_field(modelSchema, indexNameList[0])) {
throw new Error(util.format('"%s" is not a valid field, indexes must be defined on field names', indexNameList[0]));
}
if (modelSchema.fields[indexNameList[0]].virtual) {
if (modelSchema.fields[indexNameList[0]] && modelSchema.fields[indexNameList[0]].virtual) {
throw new Error("indexes must be an array of db field names, can't contain virtual fields");

@@ -199,6 +224,6 @@ }

}
if (typeof customIndex.on !== 'string' || !_.has(modelSchema.fields, customIndex.on)) {
if (typeof customIndex.on !== 'string' || !this.has_field(modelSchema, customIndex.on)) {
throw new Error("custom_index must have an 'on' attribute with string value and value must be a valid field name");
}
if (modelSchema.fields[customIndex.on].virtual) {
if (modelSchema.fields[customIndex.on] && modelSchema.fields[customIndex.on].virtual) {
throw new Error("custom_index 'on' attribute must be a db field name, can't contain virtual fields");

@@ -215,3 +240,3 @@ }

validate_model_schema(modelSchema) {
var _this = this;
var _this3 = this;

@@ -231,3 +256,3 @@ if (!modelSchema) {

_.forEach(modelSchema.fields, function (fieldObject, fieldName) {
_this.validate_field(modelSchema, fieldObject, fieldName);
_this3.validate_field(modelSchema, fieldObject, fieldName);
});

@@ -242,3 +267,3 @@

_.forEach(modelSchema.materialized_views, function (materializedViewObject, materializedViewName) {
_this.validate_materialized_view(modelSchema, materializedViewObject, materializedViewName);
_this3.validate_materialized_view(modelSchema, materializedViewObject, materializedViewName);
});

@@ -253,3 +278,3 @@ }

modelSchema.indexes.forEach(function (indexDef) {
_this.validate_index(modelSchema, indexDef);
_this3.validate_index(modelSchema, indexDef);
});

@@ -271,3 +296,3 @@ }

modelSchema.custom_indexes.forEach(function (customIndex) {
_this.validate_custom_index(modelSchema, customIndex);
_this3.validate_custom_index(modelSchema, customIndex);
});

@@ -318,3 +343,3 @@ }

get_validators(modelSchema, fieldname) {
var _this2 = this;
var _this4 = this;

@@ -339,3 +364,3 @@ var validators = [];

field.rule.validators.forEach(function (fieldrule) {
validators.push(_this2.format_validation_rule(fieldrule, fieldname));
validators.push(_this4.format_validation_rule(fieldrule, fieldname));
});

@@ -389,2 +414,2 @@ } else if (field.rule.validator) {

module.exports = schemer;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy92YWxpZGF0b3JzL3NjaGVtYS5qcyJdLCJuYW1lcyI6WyJfIiwicmVxdWlyZSIsInV0aWwiLCJkYXRhdHlwZXMiLCJzY2hlbWVyIiwidmFsaWRhdGVfdGFibGVfbmFtZSIsInRhYmxlTmFtZSIsInRlc3QiLCJ2YWxpZGF0ZV9maWVsZCIsIm1vZGVsU2NoZW1hIiwiZmllbGRPYmplY3QiLCJmaWVsZE5hbWUiLCJFcnJvciIsImZvcm1hdCIsImZpZWxkdHlwZSIsImdldF9maWVsZF90eXBlIiwiaGFzIiwidHlwZSIsImluY2x1ZGVzIiwidHlwZURlZiIsImlzX2ZpZWxkX2RlZmF1bHRfdmFsdWVfdmFsaWQiLCJ2YWxpZGF0ZV9wcmltYXJ5X2tleSIsImtleSIsImZpZWxkcyIsInZpcnR1YWwiLCJpc0FycmF5IiwibGVuZ3RoIiwiZm9yRWFjaCIsInBhcnRpdGlvbktleUZpZWxkIiwicHJpbWFyeUtleUZpZWxkIiwicHJpbWFyeUtleUluZGV4IiwiY2x1c3RlcmluZ19vcmRlciIsImlzUGxhaW5PYmplY3QiLCJjbHVzdGVyaW5nT3JkZXIiLCJjbHVzdGVyaW5nRmllbGROYW1lIiwidG9Mb3dlckNhc2UiLCJpbmRleE9mIiwidmFsaWRhdGVfbWF0ZXJpYWxpemVkX3ZpZXciLCJtYXRlcmlhbGl6ZWRWaWV3T2JqZWN0IiwibWF0ZXJpYWxpemVkVmlld05hbWUiLCJzZWxlY3QiLCJtYXRlcm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R1cm4gWydtYXAnLCAnbGlzdCcsICdzZXQnLCAnZnJvemVuJ10uaW5jbHVkZXMobW9kZWxTY2hlbWEuZmllbGRzW2ZpZWxkTmFtZV0udHlwZSk7XG4gICAgICB9XG4gICAgICByZXR1cm4gdHJ1ZTtcbiAgICB9XG4gICAgcmV0dXJuIHRydWU7XG4gIH0sXG5cbn07XG5cbm1vZHVsZS5leHBvcnRzID0gc2NoZW1lcjtcbiJdfQ==
{
"name": "express-cassandra",
"version": "2.2.2",
"version": "2.2.3",
"dependencies": {

@@ -5,0 +5,0 @@ "JSONStream": "^1.3.1",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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