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

@scvo/router-task-elasticsearch

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

@scvo/router-task-elasticsearch - npm Package Compare versions

Comparing version 0.0.11 to 0.0.12

28

build/index.js

@@ -161,3 +161,4 @@ "use strict";

case 4:
if (queryTemplate.noResultsRoute && response.hits.total === 0) {
if (queryTemplate.noResultsRoute && (!response.hits || !response.hits.total)) {
console.log('No results route for response:', response);
throw new router_1.RouteTaskError(new Error('No results'), {

@@ -171,2 +172,10 @@ statusCode: 404,

}
else if (!response.hits || !response.hits.total) {
console.log('No no results route for response', response);
response.hits = {
max_score: 0,
hits: [],
total: 0
};
}
pagination = this.getPagination(query.from || 0, query.size || 10, response.hits.total);

@@ -278,7 +287,5 @@ response.pagination = pagination;

var noResultsRoute = queryTemplates_1[i].noResultsRoute;
var pagination = _this.getPagination(paginationDetails.from, paginationDetails.size, response.hits.total);
response.pagination = pagination;
response.request = bulk_1[i * 2 + 1];
responseMap_1[name] = response;
if (noResultsRoute && response.hits.total === 0) {
if (noResultsRoute && (!response.hits || !response.hits.total)) {
console.log('No results route for response', response);
throw new router_1.RouteTaskError(new Error('No results'), {

@@ -292,2 +299,13 @@ statusCode: 404,

}
else if (!response.hits || !response.hits.total) {
console.log('No no results route for response', response);
response.hits = {
max_score: 0,
hits: [],
total: 0
};
}
var pagination = _this.getPagination(paginationDetails.from, paginationDetails.size, response.hits.total);
response.pagination = pagination;
response.request = bulk_1[i * 2 + 1];
});

@@ -294,0 +312,0 @@ return [2 /*return*/, responseMap_1];

2

package.json
{
"name": "@scvo/router-task-elasticsearch",
"version": "0.0.11",
"version": "0.0.12",
"description": "SCVO=>Router task for Elasticsearch",

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

@@ -107,3 +107,4 @@ /* tslint:disable:no-any */

if (queryTemplate.noResultsRoute && response.hits.total === 0) {
if (queryTemplate.noResultsRoute && (!response.hits || !response.hits.total)) {
console.log('No results route for response:', response);
throw new RouteTaskError(new Error('No results'), {

@@ -116,2 +117,9 @@ statusCode: 404,

});
} else if (!response.hits || !response.hits.total) {
console.log('No no results route for response', response);
response.hits = {
max_score: 0,
hits: [],
total: 0
};
}

@@ -225,11 +233,6 @@

const pagination = this.getPagination(
paginationDetails.from, paginationDetails.size,
response.hits.total);
response.pagination = pagination;
response.request = bulk[i * 2 + 1];
responseMap[name] = response;
if (noResultsRoute && response.hits.total === 0) {
if (noResultsRoute && (!response.hits || !response.hits.total)) {
console.log('No results route for response', response);
throw new RouteTaskError(new Error('No results'), {

@@ -242,3 +245,16 @@ statusCode: 404,

});
} else if (!response.hits || !response.hits.total) {
console.log('No no results route for response', response);
response.hits = {
max_score: 0,
hits: [],
total: 0
};
}
const pagination = this.getPagination(
paginationDetails.from, paginationDetails.size,
response.hits.total);
response.pagination = pagination;
response.request = bulk[i * 2 + 1];
});

@@ -245,0 +261,0 @@ return responseMap;

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