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

ddf-query-validator

Package Overview
Dependencies
Maintainers
2
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ddf-query-validator - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

11

lib/definition.service.js

@@ -58,6 +58,9 @@ "use strict";

}
errorMessages.push(checkIfSelectKeyHasInvalidDefinitions(fromClause, key, ALLOWED_KEYS), checkIfSelectValueHasInvalidDefinitions(fromClause, value, ALLOWED_VALUES));
errorMessages.push(checkIfSelectKeyHasInvalidDefinitions(fromClause, key, ALLOWED_KEYS), checkIfSelectValueHasInvalidDefinitions(query, value, ALLOWED_VALUES));
return compact(errorMessages);
}
function validateWhereDefinitions(query, options) {
if (query.debug !== true) {
return [];
}
const errorMessages = [];

@@ -112,3 +115,7 @@ const whereClause = get(query, 'where', null);

}
function checkIfSelectValueHasInvalidDefinitions(fromClause, value, ALLOWED_VALUES) {
function checkIfSelectValueHasInvalidDefinitions(query, value, ALLOWED_VALUES) {
if (query.debug !== true) {
return;
}
const fromClause = get(query, 'from', null);
const unavailableValues = getUnavailableSelectItems(value, ALLOWED_VALUES);

@@ -115,0 +122,0 @@ if (!isEmpty(value) && !isEmpty(unavailableValues)) {

2

package.json
{
"name": "ddf-query-validator",
"version": "1.2.0",
"version": "1.2.1",
"description": "DDF query validator",

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

@@ -81,3 +81,3 @@ import * as isEmpty from 'lodash.isempty';

checkIfSelectKeyHasInvalidDefinitions(fromClause, key, ALLOWED_KEYS),
checkIfSelectValueHasInvalidDefinitions(fromClause, value, ALLOWED_VALUES),
checkIfSelectValueHasInvalidDefinitions(query, value, ALLOWED_VALUES),
);

@@ -89,2 +89,6 @@

function validateWhereDefinitions (query, options): string[] {
if (query.debug !== true) {
return [];
}
const errorMessages = [];

@@ -160,3 +164,8 @@ const whereClause = get(query, 'where', null);

function checkIfSelectValueHasInvalidDefinitions (fromClause, value, ALLOWED_VALUES) {
function checkIfSelectValueHasInvalidDefinitions (query, value, ALLOWED_VALUES) {
if (query.debug !== true) {
return;
}
const fromClause = get(query, 'from', null);
const unavailableValues: string[] = getUnavailableSelectItems(value, ALLOWED_VALUES);

@@ -163,0 +172,0 @@

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