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

es-alchemy

Package Overview
Dependencies
Maintainers
1
Versions
318
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

es-alchemy - npm Package Compare versions

Comparing version 1.2.0 to 1.3.0

4

lib/index.js

@@ -51,3 +51,3 @@ const cloneDeep = require("lodash.clonedeep");

query: {
build: (opts = {}) => query.build(opts)
build: (idx = null, opts = {}) => query.build(idx === null ? null : indices[idx].fields, opts)
},

@@ -59,2 +59,2 @@ rest: rest(getMapping, options)

module.exports.loadJsonInDir = loadJsonInDir;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6WyJjbG9uZURlZXAiLCJyZXF1aXJlIiwibW9kZWwiLCJpbmRleCIsImRhdGEiLCJxdWVyeSIsInJlc3QiLCJsb2FkSnNvbkluRGlyIiwibW9kdWxlIiwiZXhwb3J0cyIsIm9wdGlvbnMiLCJtb2RlbHMiLCJyZWdpc3Rlck1vZGVsIiwibmFtZSIsInNwZWNzIiwiY29tcGlsZWQiLCJjb21waWxlIiwiaW5kaWNlcyIsInJlZ2lzdGVySW5kZXgiLCJtYXBwaW5nIiwiZ2VuZXJhdGVNYXBwaW5nIiwiZmllbGRzIiwiZXh0cmFjdEZpZWxkcyIsImdldE1hcHBpbmciLCJpZHgiLCJyZWdpc3RlciIsImxpc3QiLCJPYmplY3QiLCJrZXlzIiwic29ydCIsImdldEZpZWxkcyIsInJlbWFwIiwiaW5wdXQiLCJidWlsZCIsIm9wdHMiXSwibWFwcGluZ3MiOiJBQUFBLE1BQU1BLFlBQVlDLFFBQVEsa0JBQVIsQ0FBbEI7O0FBQ0EsTUFBTUMsUUFBUUQsUUFBUSxjQUFSLENBQWQ7O0FBQ0EsTUFBTUUsUUFBUUYsUUFBUSxjQUFSLENBQWQ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AgICBnZXRNYXBwaW5nOiBpZHggPT4gZ2V0TWFwcGluZyhpZHgpLFxuICAgICAgZ2V0RmllbGRzOiBpZHggPT4gY2xvbmVEZWVwKGluZGljZXNbaWR4XS5maWVsZHMpXG4gICAgfSxcbiAgICBkYXRhOiB7XG4gICAgICByZW1hcDogKGlkeCwgaW5wdXQpID0+IGRhdGEucmVtYXAoaW5kaWNlc1tpZHhdLnNwZWNzLCBpbnB1dClcbiAgICB9LFxuICAgIHF1ZXJ5OiB7XG4gICAgICBidWlsZDogKGlkeCA9IG51bGwsIG9wdHMgPSB7fSkgPT4gcXVlcnkuYnVpbGQoaWR4ID09PSBudWxsID8gbnVsbCA6IGluZGljZXNbaWR4XS5maWVsZHMsIG9wdHMpXG4gICAgfSxcbiAgICByZXN0OiByZXN0KGdldE1hcHBpbmcsIG9wdGlvbnMpXG4gIH07XG59O1xuXG5tb2R1bGUuZXhwb3J0cy5sb2FkSnNvbkluRGlyID0gbG9hZEpzb25JbkRpcjtcbiJdfQ==

@@ -11,5 +11,6 @@ const assert = require('assert');

const buildQueryRec = filterBy => {
const buildQueryRec = (filterBy, allowedFields) => {
// handle actual filter clause
if (Array.isArray(filterBy)) {
assert(allowedFields === null || allowedFields.includes(filterBy[0]));
return [filterBy[0].substring(0, filterBy[0].lastIndexOf('.')), actionMap.filter[filterBy[1]](filterBy[0], ...filterBy.slice(2))];

@@ -27,3 +28,3 @@ } // handle "or" and "and" clauses

assert(["string", "object"].includes(typeof filter));
const [prefix, logic] = buildQueryRec(typeof filter === 'string' ? filter.split(" ") : filter);
const [prefix, logic] = buildQueryRec(typeof filter === 'string' ? filter.split(" ") : filter, allowedFields);

@@ -53,3 +54,3 @@ if (groups[prefix] === undefined) {

module.exports.build = ({
module.exports.build = (allowedFields, {
toReturn = [""],

@@ -66,6 +67,8 @@ filterBy = [],

from: typeof offset === "number" ? offset : 0
};
}; // eslint-disable-next-line no-underscore-dangle
assert(allowedFields === null || result._source.every(f => allowedFields.includes(f)));
if (filterBy.length !== 0) {
result.query = buildQueryRec(filterBy)[1];
result.query = buildQueryRec(filterBy, allowedFields)[1];
}

@@ -95,2 +98,2 @@

};
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlsL3F1ZXJ5LmpzIl0sIm5hbWVzIjpbImFzc2VydCIsInJlcXVpcmUiLCJnZXQiLCJpc0VxdWFsIiwib2JqZWN0UGF0aHMiLCJhY3Rpb25NYXAiLCJidWlsZFF1ZXJ5UmVjIiwiZmlsdGVyQnkiLCJBcnJheSIsImlzQXJyYXkiLCJzdWJzdHJpbmciLCJsYXN0SW5kZXhPZiIsImZpbHRlciIsInNsaWNlIiwiT2JqZWN0Iiwia2V5cyIsImxlbmd0aCIsImNsYXVzZSIsImZpbHRlcnMiLCJlbnRyaWVzIiwiaW5jbHVkZXMiLCJncm91cHMiLCJmb3JFYWNoIiwicHJlZml4IiwibG9naWMiLCJzcGxpdCIsInVuZGVmaW5lZCIsInB1c2giLCJyZXN1bHRzIiwibG9naWNzIiwibmVzdCIsIm1vZHVsZSIsImV4cG9ydHMiLCJidWlsZCIsInRvUmV0dXJuIiwib3JkZXJCeSIsInNjb3JlQnkiLCJsaW1pdCIsIm9mZnNldCIsInJlc3VsdCIsIl9zb3VyY2UiLCJzaXplIiwiZnJvbSIsInF1ZXJ5Iiwic29ydCIsImNvbmNhdCIsIm1hcCIsImUiLCJvcmRlciIsImZ1bmN0aW9uX3Njb3JlIiwibWF0Y2hfYWxsIiwiZnVuY3Rpb25zIiwic2NvcmUiLCJzY29yZV9tb2RlIiwiYm9vc3RfbW9kZSIsIl9zY29yZSJdLCJtYXBwaW5ncyI6IkFBQUEsTUFBTUEsU0FBU0MsUUFBUSxRQUFSLENBQWY7O0FBQ0EsTUFBTUMsTUFBTUQsUUFBUSxZQUFSLENBQVo7O0FBQ0EsTUFBTUUsVUFBVUYsUUFBUSxnQkFBUixDQUFoQjs7QUFD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2NvcmVbZVswXV0oLi4uZS5zbGljZSgxKSkpLFxuICAgICAgICBzY29yZV9tb2RlOiBcInN1bVwiLFxuICAgICAgICBib29zdF9tb2RlOiBcInJlcGxhY2VcIlxuICAgICAgfVxuICAgIH07XG4gICAgcmVzdWx0LnNvcnQucHVzaCh7IF9zY29yZTogeyBvcmRlcjogXCJkZXNjXCIgfSB9KTtcbiAgfVxuICByZXR1cm4gcmVzdWx0O1xufTtcbiJdfQ==
{
"name": "es-alchemy",
"version": "1.2.0",
"version": "1.3.0",
"description": "Simplification of Elasticsearch interactions",

@@ -5,0 +5,0 @@ "main": "lib/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