New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@saulx/selva

Package Overview
Dependencies
Maintainers
1
Versions
263
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@saulx/selva - npm Package Compare versions

Comparing version 11.1.4 to 12.0.0

3

dist/src/connection/redisClientExtensions.js

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

'selva.index.del',
'selva.rpn.evalbool',
'selva.rpn.evaldouble',
'selva.rpn.evalstring',
];

@@ -92,0 +95,0 @@ redis.RedisClient.prototype.on_info_cmd = function (err, res) {

4

dist/src/get/executeGetOperations/aggregate.js

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

// TODO? need this?
const agg = await client.redis.selva_hierarchy_aggregatein(ctx.originDescriptors[ctx.db] || { name: ctx.db }, (0, util_1.makeLangArg)(client.schemas[ctx.db].languages, lang), '___selva_hierarchy', FN_TO_ENUM[op.function.name] || '0', 'order', ((_a = op.options.sort) === null || _a === void 0 ? void 0 : _a.$field) || '', ((_b = op.options.sort) === null || _b === void 0 ? void 0 : _b.$order) || 'asc', 'offset', op.options.offset, 'limit', op.options.limit, 'fields', (op.function.args || []).join('|'), (0, utils_1.joinIds)(op.inKeys), ...args);
const agg = await client.redis.selva_hierarchy_aggregatein(ctx.originDescriptors[ctx.db] || { name: ctx.db }, (0, util_1.makeLangArg)(client.schemas[ctx.db].languages, lang), '___selva_hierarchy', FN_TO_ENUM[op.function.name] || '0', 'order', ((_a = op.options.sort) === null || _a === void 0 ? void 0 : _a.$field) || '', ((_b = op.options.sort) === null || _b === void 0 ? void 0 : _b.$order) || 'none', 'offset', op.options.offset, 'limit', op.options.limit, 'fields', (op.function.args || []).join('|'), (0, utils_1.joinIds)(op.inKeys), ...args);
await checkForNextRefresh(ctx, client, sourceField, (0, utils_1.joinIds)(op.inKeys), op.filter, lang);

@@ -252,3 +252,3 @@ return Number(agg);

: (0, utils_1.getNestedSchema)(schema, op.id, sourceField);
const agg = await client.redis.selva_hierarchy_aggregate(ctx.originDescriptors[ctx.db] || { name: ctx.db }, (0, util_1.makeLangArg)(client.schemas[ctx.db].languages, lang), '___selva_hierarchy', FN_TO_ENUM[op.function.name] || '0', ...(0, _1.sourceFieldToFindArgs)(client.schemas[ctx.db], sourceFieldSchema, sourceField, false, op.byType), 'order', ((_c = op.options.sort) === null || _c === void 0 ? void 0 : _c.$field) || '', ((_d = op.options.sort) === null || _d === void 0 ? void 0 : _d.$order) || 'asc', 'offset', op.options.offset, 'limit', op.options.limit, 'fields', (op.function.args || []).join('|'), (0, utils_1.padId)(op.id), ...args);
const agg = await client.redis.selva_hierarchy_aggregate(ctx.originDescriptors[ctx.db] || { name: ctx.db }, (0, util_1.makeLangArg)(client.schemas[ctx.db].languages, lang), '___selva_hierarchy', FN_TO_ENUM[op.function.name] || '0', ...(0, _1.sourceFieldToFindArgs)(client.schemas[ctx.db], sourceFieldSchema, sourceField, false, op.byType), 'order', ((_c = op.options.sort) === null || _c === void 0 ? void 0 : _c.$field) || '', ((_d = op.options.sort) === null || _d === void 0 ? void 0 : _d.$order) || 'none', 'offset', op.options.offset, 'limit', op.options.limit, 'fields', (op.function.args || []).join('|'), (0, utils_1.padId)(op.id), ...args);
await checkForNextRefresh(ctx, client, sourceField, (0, utils_1.padId)(op.id), op.filter, lang);

@@ -255,0 +255,0 @@ return Number(agg);

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

// can make this a bit better....
const ids = await client.redis.selva_hierarchy_findin(ctx.originDescriptors[ctx.db] || { name: ctx.db }, (0, util_1.makeLangArg)(client.schemas[ctx.db].languages, lang), '___selva_hierarchy', 'order', ((_a = op.options.sort) === null || _a === void 0 ? void 0 : _a.$field) || '', ((_b = op.options.sort) === null || _b === void 0 ? void 0 : _b.$order) || 'asc', 'offset', op.options.offset, 'limit', op.options.limit, (0, utils_1.joinIds)(op.inKeys), ...args);
const ids = await client.redis.selva_hierarchy_findin(ctx.originDescriptors[ctx.db] || { name: ctx.db }, (0, util_1.makeLangArg)(client.schemas[ctx.db].languages, lang), '___selva_hierarchy', 'order', ((_a = op.options.sort) === null || _a === void 0 ? void 0 : _a.$field) || '', ((_b = op.options.sort) === null || _b === void 0 ? void 0 : _b.$order) || 'none', 'offset', op.options.offset, 'limit', op.options.limit, (0, utils_1.joinIds)(op.inKeys), ...args);
await checkForNextRefresh(ctx, client, sourceField, (0, utils_1.joinIds)(op.inKeys), op.filter, lang);

@@ -343,3 +343,3 @@ return ids;

: (0, utils_1.getNestedSchema)(schema, op.id, sourceField);
const ids = await client.redis.selva_hierarchy_find(ctx.originDescriptors[ctx.db] || { name: ctx.db }, (0, util_1.makeLangArg)(schema.languages, lang), '___selva_hierarchy', ...(0, _1.sourceFieldToFindArgs)(schema, sourceFieldSchema, sourceField, op.recursive, op.byType), ...(0, indexing_1.mkIndex)(schema, op), 'order', ((_c = op.options.sort) === null || _c === void 0 ? void 0 : _c.$field) || '', ((_d = op.options.sort) === null || _d === void 0 ? void 0 : _d.$order) || 'asc', 'offset', op.options.offset, 'limit', op.options.limit, (0, utils_1.padId)(op.id), ...args);
const ids = await client.redis.selva_hierarchy_find(ctx.originDescriptors[ctx.db] || { name: ctx.db }, (0, util_1.makeLangArg)(schema.languages, lang), '___selva_hierarchy', ...(0, _1.sourceFieldToFindArgs)(schema, sourceFieldSchema, sourceField, op.recursive, op.byType), ...(0, indexing_1.mkIndex)(schema, op), 'order', ((_c = op.options.sort) === null || _c === void 0 ? void 0 : _c.$field) || '', ((_d = op.options.sort) === null || _d === void 0 ? void 0 : _d.$order) || 'none', 'offset', op.options.offset, 'limit', op.options.limit, (0, utils_1.padId)(op.id), ...args);
await checkForNextRefresh(ctx, client, sourceField, (0, utils_1.padId)(op.id), op.filter, lang);

@@ -385,3 +385,3 @@ return ids;

}
const result = await client.redis.selva_hierarchy_findin(ctx.originDescriptors[ctx.db] || { name: ctx.db }, (0, util_1.makeLangArg)(client.schemas[ctx.db].languages, lang), '___selva_hierarchy', 'order', ((_a = op.options.sort) === null || _a === void 0 ? void 0 : _a.$field) || '', ((_b = op.options.sort) === null || _b === void 0 ? void 0 : _b.$order) || 'asc', 'offset', op.options.offset, 'limit', op.options.limit, ...makeFieldsString(passedSchema || client.schemas[ctx.db], fieldsOpt), (0, utils_1.joinIds)(op.inKeys), ...args);
const result = await client.redis.selva_hierarchy_findin(ctx.originDescriptors[ctx.db] || { name: ctx.db }, (0, util_1.makeLangArg)(client.schemas[ctx.db].languages, lang), '___selva_hierarchy', 'order', ((_a = op.options.sort) === null || _a === void 0 ? void 0 : _a.$field) || '', ((_b = op.options.sort) === null || _b === void 0 ? void 0 : _b.$order) || 'none', 'offset', op.options.offset, 'limit', op.options.limit, ...makeFieldsString(passedSchema || client.schemas[ctx.db], fieldsOpt), (0, utils_1.joinIds)(op.inKeys), ...args);
await checkForNextRefresh(ctx, client, sourceField, (0, utils_1.joinIds)(op.inKeys), op.filter, lang, passedSchema);

@@ -429,3 +429,3 @@ return result;

: (0, utils_1.getNestedSchema)(schema, op.id, sourceField);
const result = await client.redis.selva_hierarchy_find(ctx.originDescriptors[ctx.db] || { name: ctx.db }, (0, util_1.makeLangArg)(client.schemas[ctx.db].languages, lang), '___selva_hierarchy', ...(0, _1.sourceFieldToFindArgs)(schema, sourceFieldSchema, sourceField, op.recursive, op.byType), ...(0, indexing_1.mkIndex)(schema, op), 'order', ((_c = op.options.sort) === null || _c === void 0 ? void 0 : _c.$field) || '', ((_d = op.options.sort) === null || _d === void 0 ? void 0 : _d.$order) || 'asc', 'offset', op.options.offset, 'limit', op.options.limit, ...makeFieldsString(schema, fieldsOpt), (0, utils_1.padId)(op.id), ...args);
const result = await client.redis.selva_hierarchy_find(ctx.originDescriptors[ctx.db] || { name: ctx.db }, (0, util_1.makeLangArg)(client.schemas[ctx.db].languages, lang), '___selva_hierarchy', ...(0, _1.sourceFieldToFindArgs)(schema, sourceFieldSchema, sourceField, op.recursive, op.byType), ...(0, indexing_1.mkIndex)(schema, op), 'order', ((_c = op.options.sort) === null || _c === void 0 ? void 0 : _c.$field) || '', ((_d = op.options.sort) === null || _d === void 0 ? void 0 : _d.$order) || 'none', 'offset', op.options.offset, 'limit', op.options.limit, ...makeFieldsString(schema, fieldsOpt), (0, utils_1.padId)(op.id), ...args);
await checkForNextRefresh(ctx, client, sourceField, (0, utils_1.padId)(op.id), op.filter, lang);

@@ -432,0 +432,0 @@ return result;

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

const utils_1 = require("../utils");
// import fetch from 'node-fetch'
// TODO: more concurrency for fetching

@@ -47,19 +46,19 @@ async function evaluateTextSearch(filters, language, logicalOperator, nested = false) {

// TODO: replace hard coded url and port
if (Array.isArray(f)) {
}
else {
const resp = await fetch('http://localhost:33333/get', {
method: 'POST',
headers: {
'content-type': 'application/json',
},
body: JSON.stringify({
$searchString: f.$value,
$field: f.$field,
$language: language, // FIXME
}),
});
const ids = await resp.json();
return ids;
}
//if (Array.isArray(f)) {
//} else {
// const resp = await fetch('http://localhost:33333/get', {
// method: 'POST',
// headers: {
// 'content-type': 'application/json',
// },
// body: JSON.stringify({
// $searchString: f.$value,
// $field: f.$field,
// $language: language, // FIXME
// }),
// })
// const ids = await resp.json()
// return ids
//}
return [];
}));

@@ -66,0 +65,0 @@ if (logicalOperator === 'or') {

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

const utils_1 = require("../utils");
// import fetch from 'node-fetch'
// TODO: more concurrency for fetching

@@ -14,0 +13,0 @@ async function evaluateTextSearch(filters, language, logicalOperator, nested = false) {

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

const versions = JSON.parse(msg);
if (versions && versions[0] === this.version) {
if (versions && versions[0] === this.version && !getOptions.$trigger) {
// is the same ignore

@@ -397,0 +397,0 @@ }

@@ -537,3 +537,9 @@ /// <reference types="node" />

selva_index_del(...args: args): Promise<any>;
selva_rpn_evalbool(opts: ServerSelector, ...args: args): Promise<any>;
selva_rpn_evalbool(...args: args): Promise<any>;
selva_rpn_evaldouble(opts: ServerSelector, ...args: args): Promise<any>;
selva_rpn_evaldouble(...args: args): Promise<any>;
selva_rpn_evalstring(opts: ServerSelector, ...args: args): Promise<any>;
selva_rpn_evalstring(...args: args): Promise<any>;
}
export default RedisMethods;
{
"name": "@saulx/selva",
"version": "11.1.4",
"version": "12.0.0",
"main": "dist/src/index.js",

@@ -53,3 +53,3 @@ "scripts": {

"@types/pg": "^8.6.1",
"@saulx/selva-server": "11.1.4",
"@saulx/selva-server": "12.0.0",
"before-exit": "1.0.0",

@@ -66,3 +66,2 @@ "async-exec": "^1.1.0",

"lint-staged": "^10.5.4",
"node-fetch": "^2.6.1",
"ts-node": "^9.1.1",

@@ -69,0 +68,0 @@ "typescript": "^4.1.4",

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 too big to display

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