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

@arranger/middleware

Package Overview
Dependencies
Maintainers
4
Versions
251
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@arranger/middleware - npm Package Compare versions

Comparing version 0.2.4 to 0.3.2

yarn.lock

36

dist/buildAggregations.js

@@ -12,12 +12,8 @@ "use strict";

function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
function _sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
function _slicedToArray(arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return _sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }
function _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

@@ -63,3 +59,3 @@

});
return cleaned && _objectSpread({}, query, _defineProperty({}, _constants.ES_NESTED, _objectSpread({}, nested, _defineProperty({}, _constants.ES_QUERY, cleaned))));
return cleaned && _extends({}, query, _defineProperty({}, _constants.ES_NESTED, _extends({}, nested, _defineProperty({}, _constants.ES_QUERY, cleaned))));
} else if (bool) {

@@ -77,3 +73,3 @@ var filtered = Object.entries(bool).reduce(function (bool, _ref6) {

}).filter(Boolean);
return filteredValues.length > 0 ? _objectSpread({}, bool, _defineProperty({}, type, filteredValues)) : bool;
return filteredValues.length > 0 ? _extends({}, bool, _defineProperty({}, type, filteredValues)) : bool;
}, {});

@@ -91,3 +87,3 @@ return Object.keys(filtered).length > 0 ? _defineProperty({}, _constants.ES_BOOL, filtered) : null;

var args = (0, _lodash.get)(graphqlField, [type, 'arguments', 0]) || {};
return _defineProperty({}, "".concat(field, ":").concat(type), _defineProperty({}, type, _objectSpread({
return _defineProperty({}, "".concat(field, ":").concat(type), _defineProperty({}, type, _extends({
field: field

@@ -100,5 +96,7 @@ }, type === _constants.HISTOGRAM ? {

function createTermAggregation(_ref11) {
var _ref12;
var field = _ref11.field,
isNested = _ref11.isNested;
return _defineProperty({}, field, _objectSpread({}, isNested ? {
return _ref12 = {}, _defineProperty(_ref12, field, _extends({}, isNested ? {
aggs: {

@@ -114,3 +112,13 @@ rn: {

}
}));
})), _defineProperty(_ref12, "".concat(field, ":missing"), _extends({}, isNested ? {
aggs: {
rn: {
reverse_nested: {}
}
}
} : {}, {
missing: {
field: field
}
})), _ref12;
}

@@ -209,3 +217,3 @@

}, fieldAggregation);
return _objectSpread({}, aggregations, wrapWithFilters({
return _extends({}, aggregations, wrapWithFilters({
query: query,

@@ -218,2 +226,2 @@ field: field,

}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9idWlsZEFnZ3JlZ2F0aW9ucy5qcyJdLCJuYW1lcyI6WyJNQVhfQUdHUkVHQVRJT05fU0laRSIsIkhJU1RPR1JBTV9JTlRFUlZBTF9ERUZBVUxUIiwiY3JlYXRlR2xvYmFsQWdncmVnYXRpb24iLCJmaWVsZCIsImFnZ3JlZ2F0aW9uIiwiQUdHU19XUkFQUEVSX0dMT0JBTCIsImdsb2JhbCIsImFnZ3MiLCJjcmVhdGVGaWx0ZXJlZEFnZ3JlZ2F0aW9uIiwiZmlsdGVyIiwiT2JqZWN0Iiwia2V5cyIsImxlbmd0aCIsIkFHR1NfV1JBUFBFUl9GSUxURVJFRCIsInJlbW92ZUZpZWxkRnJvbVF1ZXJ5IiwicXVlcnkiLCJuZXN0ZWQiLCJFU19ORVNURUQiLCJuZXN0ZWRRdWVyeSIsIkVTX1FVRVJZIiwiYm9vbCIsIkVTX0JPT0wiLCJzb21lIiwiayIsImNsZWFuZWQiLCJmaWx0ZXJlZCIsImVudHJpZXMiLCJyZWR1Y2UiLCJ0eXBlIiwidmFsdWVzIiwiZmlsdGVyZWRWYWx1ZXMiLCJtYXAiLCJ2YWx1ZSIsIkJvb2xlYW4iLCJjcmVhdGVOdW1lcmljQWdncmVnYXRpb24iLCJncmFwaHFsRmllbGQiLCJhcmdzIiwiSElTVE9HUkFNIiwiaW50ZXJ2YWwiLCJjcmVhdGVUZXJtQWdncmVnYXRpb24iLCJpc05lc3RlZCIsInJuIiwicmV2ZXJzZV9uZXN0ZWQiLCJ0ZXJtcyIsInNpemUiLCJjcmVhdGVBZ2dyZWdhdGlvbiIsIkJVQ0tFVFMiLCJTVEFUUyIsImZpbmQiLCJ0IiwiaW5jbHVkZXM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XG4gICAgICAgIC4uLndyYXBXaXRoRmlsdGVycyh7XG4gICAgICAgICAgcXVlcnksXG4gICAgICAgICAgZmllbGQsXG4gICAgICAgICAgYWdncmVnYXRpb24sXG4gICAgICAgICAgYWdncmVnYXRpb25zRmlsdGVyVGhlbXNlbHZlcyxcbiAgICAgICAgfSksXG4gICAgICB9O1xuICAgIH0sXG4gICAge30sXG4gICk7XG59XG4iXX0=

@@ -20,22 +20,12 @@ "use strict";

function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); }
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
function _sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
function _slicedToArray(arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return _sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }
function _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
function wrapFilter(_ref) {

@@ -112,3 +102,3 @@ var esFilter = _ref.esFilter,

}) || '';
return _objectSpread({}, map, _defineProperty({}, group, _toConsumableArray(map[group] || []).concat([field])));
return _extends({}, map, _defineProperty({}, group, _toConsumableArray(map[group] || []).concat([field])));
}, {}); // construct one multi match per nested group

@@ -120,4 +110,4 @@

return wrapFilter({
filter: _objectSpread({}, filter, {
content: _objectSpread({}, content, {
filter: _extends({}, filter, {
content: _extends({}, content, {
field: fields[0]

@@ -265,2 +255,2 @@ })

}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9idWlsZFF1ZXJ5L2luZGV4LmpzIl0sIm5hbWVzIjpbIndyYXBGaWx0ZXIiLCJlc0ZpbHRlciIsIm5lc3RlZEZpZWxkcyIsImZpbHRlciIsImlzTm90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HVybiBnZXRSZWdleEZpbHRlcih7IG5lc3RlZEZpZWxkcywgZmlsdGVyIH0pO1xuICAgIH0gZWxzZSB7XG4gICAgICByZXR1cm4gZ2V0VGVybUZpbHRlcih7IG5lc3RlZEZpZWxkcywgZmlsdGVyIH0pO1xuICAgIH1cbiAgfSBlbHNlIGlmIChbR1RfT1AsIEdURV9PUCwgTFRfT1AsIExURV9PUF0uaW5jbHVkZXMob3ApKSB7XG4gICAgcmV0dXJuIGdldFJhbmdlRmlsdGVyKHsgbmVzdGVkRmllbGRzLCBmaWx0ZXIgfSk7XG4gIH0gZWxzZSBpZiAoTUlTU0lOR19PUCA9PT0gb3ApIHtcbiAgICByZXR1cm4gZ2V0TWlzc2luZ0ZpbHRlcih7IG5lc3RlZEZpZWxkcywgZmlsdGVyIH0pO1xuICB9IGVsc2UgaWYgKEZJTFRFUl9PUCA9PT0gb3ApIHtcbiAgICByZXR1cm4gZ2V0RnV6enlGaWx0ZXIoeyBuZXN0ZWRGaWVsZHMsIGZpbHRlciB9KTtcbiAgfSBlbHNlIHtcbiAgICB0aHJvdyBuZXcgRXJyb3IoJ3Vua25vd24gb3AnKTtcbiAgfVxufVxuXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbih7IG5lc3RlZEZpZWxkcywgZmlsdGVyczogcmF3RmlsdGVycyB9KSB7XG4gIGlmIChPYmplY3Qua2V5cyhyYXdGaWx0ZXJzIHx8IHt9KS5sZW5ndGggPT09IDApIHJldHVybiB7fTtcbiAgcmV0dXJuIG9wU3dpdGNoKHsgbmVzdGVkRmllbGRzLCBmaWx0ZXI6IG5vcm1hbGl6ZUZpbHRlcnMocmF3RmlsdGVycykgfSk7XG59XG4iXX0=

@@ -10,14 +10,6 @@ "use strict";

function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }
function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); }
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }
function groupingOptimizer(_ref) {

@@ -51,8 +43,8 @@ var op = _ref.op,

if (_constants.OP_ALIASES[op]) {
return normalizeFilters(_objectSpread({}, filter, {
return normalizeFilters(_extends({}, filter, {
op: _constants.OP_ALIASES[op]
}));
} else if (_constants.ARRAY_CONTENT.includes(op) && !Array.isArray(value)) {
return normalizeFilters(_objectSpread({}, filter, {
content: _objectSpread({}, content, {
return normalizeFilters(_extends({}, filter, {
content: _extends({}, content, {
value: [].concat(value)

@@ -64,4 +56,4 @@ })

var specialFilters = value.filter(isSpecialFilter).map(function (specialValue) {
return _objectSpread({}, filter, {
content: _objectSpread({}, content, {
return _extends({}, filter, {
content: _extends({}, content, {
value: [specialValue]

@@ -74,4 +66,4 @@ })

});
var filters = normalValues.length > 0 ? [_objectSpread({}, filter, {
content: _objectSpread({}, content, {
var filters = normalValues.length > 0 ? [_extends({}, filter, {
content: _extends({}, content, {
value: normalValues

@@ -93,2 +85,2 @@ })

exports.default = _default;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9idWlsZFF1ZXJ5L25vcm1hbGl6ZUZpbHRlcnMuanMiXSwibmFtZXMiOlsiZ3JvdXBpbmdPcHRpbWl6ZXIiLCJvcCIsImNvbnRlbnQiLCJtYXAiLCJub3JtYWxpemVGaWx0ZXJzIiwicmVkdWNlIiwiZmlsdGVycyIsImYiLCJpc1NwZWNpYWxGaWx0ZXIiLCJ2YWx1ZSIsImluY2x1ZGVzIiwiZmlsdGVyIiwiRXJyb3IiLCJPUF9BTElBU0VTIiwiQVJSQVlfQ09OVEVOVCIsIkFycmF5IiwiaXNBcnJheSIsImNvbmNhdCIsIklOX09QIiwiTk9UX0lOX09QIiwic29tZSIsImxlbmd0aCIsInNwZWNpYWxGaWx0ZXJzIiwic3BlY2lhbFZhbHVlIiwibm9ybWFsVmFsdWVzIiwicHN2IiwiT1JfT1AiLCJBTkRfT1AiLCJOT1RfT1AiXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFBQTs7Ozs7Ozs7Ozs7Ozs7QUFVQSxTQUFTQSxpQkFBVCxPQUE0QztBQUFBLE1BQWZDLEVBQWUsUUFBZkEsRUFBZTtBQUFBLE1BQVhDLE9BQVcsUUFBWEEsT0FBVztBQUMxQyxTQUFPO0FBQ0xELFVBREs7QUFFTEMsYUFBU0EsUUFDTkMsR0FETSxDQUNGQyxnQkFERSxFQUVOQyxNQUZNLENBR0wsVUFBQ0MsT0FBRCxFQUFVQyxDQUFWO0FBQUEsZ0NBQW9CRCxPQUFwQiw0QkFBaUNDLEVBQUVOLEVBQUYsS0FBU0EsRUFBVCxHQUFjTSxFQUFFTCxPQUFoQixHQUEwQixDQUFDSyxDQUFELENBQTNEO0FBQ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X09QLCBOT1RfT1BdLmluY2x1ZGVzKG9wKSkge1xuICAgIHJldHVybiBncm91cGluZ09wdGltaXplcihmaWx0ZXIpO1xuICB9IGVsc2Uge1xuICAgIHJldHVybiBmaWx0ZXI7XG4gIH1cbn1cblxuZXhwb3J0IGRlZmF1bHQgbm9ybWFsaXplRmlsdGVycztcbiJdfQ==

@@ -79,2 +79,2 @@ "use strict";

exports.AGGS_WRAPPER_NESTED = AGGS_WRAPPER_NESTED;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9jb25zdGFudHMuanMiXSwibmFtZXMiOlsiSU5fT1AiLCJOT1RfSU5fT1AiLCJTT01FX05PVF9JTl9PUCIsIkZJTFRFUl9PUCIsIkFORF9PUCIsIk9SX09QIiwiTk9UX09QIiwiTUlTU0lOR19PUCIsIkdUX09QIiwiR1RFX09QIiwiTFRfT1AiLCJMVEVfT1AiLCJPUF9BTElBU0VTIiwiQVJSQVlfQ09OVEVOVCIsIkVTX01VU1QiLCJFU19NVVNUX05PVCIsIkVTX1NIT1VMRCIsIkVTX05FU1RFRCIsIkVTX0JPT0wiLCJFU19RVUVSWSIsIkVTX1BBVEgiLCJFU19NVUxUSV9NQVRDSCIsIkVTX0ZJRUxEUyIsIkVTX1RZUEUiLCJFU19QSFJBU0VfUFJFRklYIiwiQlVDS0VUUyIsIlNUQVRTIiwiSElTVE9HUkFNIiwiQUdHU19XUkFQUEVSX0dMT0JBTCIsIkFHR1NfV1JBUFBFUl9GSUxURVJFRCIsIkFHR1NfV1JBUFBFUl9ORVNURUQiXSwibWFwcGluZ3MiOiI7Ozs7OztBQUFBO0FBQ08sSUFBTUEsUUFBUSxJQUFkOztBQUNBLElBQU1DLFlBQVksUUFBbEI7O0FBQ0EsSUFBTUMsaUJBQWlCLGFBQXZCOztBQUNBLElBQU1DLFlBQVksUUFBbEI7O0FBQ0EsSUFBTUMsU0FBUyxLQUFmOztBQUNBL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tFVFMgPSAnYnVja2V0cyc7XG5leHBvcnQgY29uc3QgU1RBVFMgPSAnc3RhdHMnO1xuZXhwb3J0IGNvbnN0IEhJU1RPR1JBTSA9ICdoaXN0b2dyYW0nO1xuZXhwb3J0IGNvbnN0IEFHR1NfV1JBUFBFUl9HTE9CQUwgPSAnZ2xvYmFsJztcbmV4cG9ydCBjb25zdCBBR0dTX1dSQVBQRVJfRklMVEVSRUQgPSAnZmlsdGVyZWQnO1xuZXhwb3J0IGNvbnN0IEFHR1NfV1JBUFBFUl9ORVNURUQgPSAnbmVzdGVkJztcbiJdfQ==

@@ -8,2 +8,4 @@ "use strict";

var _lodash = require("lodash");
var _constants = require("./constants");

@@ -13,22 +15,12 @@

function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }
function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); }
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
function _sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
function _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
function _slicedToArray(arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return _sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
function flattenAggregations(aggregations) {

@@ -46,17 +38,27 @@ return Object.entries(aggregations).reduce(function (prunedAggs, _ref) {

if ([_constants.STATS, _constants.HISTOGRAM].includes(aggregationType)) {
return _objectSpread({}, prunedAggs, _defineProperty({}, field, _objectSpread({}, prunedAggs[field], _defineProperty({}, aggregationType, value))));
if (aggregationType === 'missing') {
return prunedAggs;
} else if ([_constants.STATS, _constants.HISTOGRAM].includes(aggregationType)) {
return _extends({}, prunedAggs, _defineProperty({}, field, _extends({}, prunedAggs[field], _defineProperty({}, aggregationType, value))));
} else if (Array.isArray(value.buckets)) {
return _objectSpread({}, prunedAggs, _defineProperty({}, field, {
buckets: _toConsumableArray(value.buckets.map(function (_ref3) {
var missing = (0, _lodash.get)(aggregations, ["".concat(field, ":missing")]);
var buckets = _toConsumableArray(value.buckets).concat(_toConsumableArray(missing ? [_extends({}, missing, {
key: '_missing'
})] : []));
return _extends({}, prunedAggs, _defineProperty({}, field, {
buckets: buckets.map(function (_ref3) {
var rn = _ref3.rn,
bucket = _objectWithoutProperties(_ref3, ["rn"]);
return _objectSpread({}, bucket, {
return _extends({}, bucket, {
doc_count: rn ? rn.doc_count : bucket.doc_count
});
}))
}).filter(function (b) {
return b.doc_count;
})
}));
} else {
return _objectSpread({}, prunedAggs, flattenAggregations(value));
return _extends({}, prunedAggs, flattenAggregations(value));
}

@@ -68,2 +70,2 @@ }, {});

exports.default = _default;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9mbGF0dGVuQWdncmVnYXRpb25zLmpzIl0sIm5hbWVzIjpbImZsYXR0ZW5BZ2dyZWdhdGlvbnMiLCJhZ2dyZWdhdGlvbnMiLCJPYmplY3QiLCJlbnRyaWVzIiwicmVkdWNlIiwicHJ1bmVkQWdncyIsImtleSIsInZhbHVlIiwic3BsaXQiLCJmaWVsZCIsImFnZ3JlZ2F0aW9uVHlwZSIsIlNUQVRTIiwiSElTVE9HUkFNIiwiaW5jbHVkZXMiLCJBcnJheSIsImlzQXJyYXkiLCJidWNrZXRzIiwibWFwIiwicm4iLCJidWNrZXQiLCJkb2NfY291bnQiXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFBQTs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBRUEsU0FBU0EsbUJBQVQsQ0FBNkJDLFlBQTdCLEVBQTJDO0FBQ3pDLFNBQU9DLE9BQU9DLE9BQVAsQ0FBZUYsWUFBZixFQUE2QkcsTUFBN0IsQ0FBb0MsVUFBQ0MsVUFBRCxRQUE4QjtBQUFBO0FBQUE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G4gIHJldHVybiBPYmplY3QuZW50cmllcyhhZ2dyZWdhdGlvbnMpLnJlZHVjZSgocHJ1bmVkQWdncywgW2tleSwgdmFsdWVdKSA9PiB7XG4gICAgY29uc3QgW2ZpZWxkLCBhZ2dyZWdhdGlvblR5cGUgPSBudWxsXSA9IGtleS5zcGxpdCgnOicpO1xuXG4gICAgaWYgKFtTVEFUUywgSElTVE9HUkFNXS5pbmNsdWRlcyhhZ2dyZWdhdGlvblR5cGUpKSB7XG4gICAgICByZXR1cm4ge1xuICAgICAgICAuLi5wcnVuZWRBZ2dzLFxuICAgICAgICBbZmllbGRdOiB7IC4uLnBydW5lZEFnZ3NbZmllbGRdLCBbYWdncmVnYXRpb25UeXBlXTogdmFsdWUgfSxcbiAgICAgIH07XG4gICAgfSBlbHNlIGlmIChBcnJheS5pc0FycmF5KHZhbHVlLmJ1Y2tldHMpKSB7XG4gICAgICByZXR1cm4ge1xuICAgICAgICAuLi5wcnVuZWRBZ2dzLFxuICAgICAgICBbZmllbGRdOiB7XG4gICAgICAgICAgYnVja2V0czogW1xuICAgICAgICAgICAgLi4udmFsdWUuYnVja2V0cy5tYXAoKHsgcm4sIC4uLmJ1Y2tldCB9KSA9PiAoe1xuICAgICAgICAgICAgICAuLi5idWNrZXQsXG4gICAgICAgICAgICAgIGRvY19jb3VudDogcm4gPyBybi5kb2NfY291bnQgOiBidWNrZXQuZG9jX2NvdW50LFxuICAgICAgICAgICAgfSkpLFxuICAgICAgICAgIF0sXG4gICAgICAgIH0sXG4gICAgICB9O1xuICAgIH0gZWxzZSB7XG4gICAgICByZXR1cm4geyAuLi5wcnVuZWRBZ2dzLCAuLi5mbGF0dGVuQWdncmVnYXRpb25zKHZhbHVlKSB9O1xuICAgIH1cbiAgfSwge30pO1xufVxuXG5leHBvcnQgZGVmYXVsdCBmbGF0dGVuQWdncmVnYXRpb25zO1xuIl19
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIj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G4gICAgICB9O1xuICAgIH0gZWxzZSB7XG4gICAgICByZXR1cm4geyAuLi5wcnVuZWRBZ2dzLCAuLi5mbGF0dGVuQWdncmVnYXRpb25zKHZhbHVlKSB9O1xuICAgIH1cbiAgfSwge30pO1xufVxuXG5leHBvcnQgZGVmYXVsdCBmbGF0dGVuQWdncmVnYXRpb25zO1xuIl19

@@ -32,2 +32,2 @@ "use strict";

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQTs7QUFDQTs7QUFDQSIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCB7IGRlZmF1bHQgYXMgYnVpbGRRdWVyeSB9IGZyb20gJy4vYnVpbGRRdWVyeSc7XG5leHBvcnQgeyBkZWZhdWx0IGFzIGZsYXR0ZW5BZ2dyZWdhdGlvbnMgfSBmcm9tICcuL2ZsYXR0ZW5BZ2dyZWdhdGlvbnMnO1xuZXhwb3J0IHsgZGVmYXVsdCBhcyBidWlsZEFnZ3JlZ2F0aW9ucyB9IGZyb20gJy4vYnVpbGRBZ2dyZWdhdGlvbnMnO1xuIl19
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQTs7QUFDQTs7QUFDQSIsImZpbGUiOiJpbmRleC5qcyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCB7IGRlZmF1bHQgYXMgYnVpbGRRdWVyeSB9IGZyb20gJy4vYnVpbGRRdWVyeSc7XG5leHBvcnQgeyBkZWZhdWx0IGFzIGZsYXR0ZW5BZ2dyZWdhdGlvbnMgfSBmcm9tICcuL2ZsYXR0ZW5BZ2dyZWdhdGlvbnMnO1xuZXhwb3J0IHsgZGVmYXVsdCBhcyBidWlsZEFnZ3JlZ2F0aW9ucyB9IGZyb20gJy4vYnVpbGRBZ2dyZWdhdGlvbnMnO1xuIl19

@@ -23,14 +23,8 @@ "use strict";

function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _toArray(arr) { return _arrayWithHoles(arr) || _iterableToArray(arr) || _nonIterableRest(); }
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
function _toArray(arr) { return Array.isArray(arr) ? arr : Array.from(arr); }
function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); }
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
function mergePath(target, _ref, data) {

@@ -41,3 +35,3 @@ var _ref2 = _toArray(_ref),

return _objectSpread({}, target, _defineProperty({}, key, path.length ? mergePath(_lodash.default.get(target, key, {}), path, data) : data));
return _extends({}, target, _defineProperty({}, key, path.length ? mergePath(_lodash.default.get(target, key, {}), path, data) : data));
}

@@ -74,2 +68,2 @@

}
//# source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mdW5jdGlvbiB3cmFwTXVzdE5vdCh2YWx1ZSkge1xuICByZXR1cm4gd3JhcEJvb2woQ09OU1RBTlRTLkVTX01VU1RfTk9ULCB2YWx1ZSk7XG59XG5cbmV4cG9ydCBmdW5jdGlvbiB3cmFwTXVzdCh2YWx1ZSkge1xuICByZXR1cm4gd3JhcEJvb2woQ09OU1RBTlRTLkVTX01VU1QsIHZhbHVlKTtcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIHdyYXBTaG91bGQodmFsdWUpIHtcbiAgcmV0dXJuIHdyYXBCb29sKENPTlNUQU5UUy5FU19TSE9VTEQsIHZhbHVlKTtcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIHdyYXBOZXN0ZWQoZXNGaWx0ZXIsIHBhdGgpIHtcbiAgcmV0dXJuIHtcbiAgICBbQ09OU1RBTlRTLkVTX05FU1RFRF06IHtcbiAgICAgIFtDT05TVEFOVFMuRVNfUEFUSF06IHBhdGgsXG4gICAgICBbQ09OU1RBTlRTLkVTX1FVRVJZXTogZXNGaWx0ZXJbQ09OU1RBTlRTLkVTX0JPT0xdXG4gICAgICAgID8gZXNGaWx0ZXJcbiAgICAgICAgOiB3cmFwTXVzdChlc0ZpbHRlciksXG4gICAgfSxcbiAgfTtcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIHdyYXBCb29sKG9wLCB2YWx1ZSkge1xuICByZXR1cm4ge1xuICAgIFtDT05TVEFOVFMuRVNfQk9PTF06IHtcbiAgICAgIFtvcF06IEFycmF5LmlzQXJyYXkodmFsdWUpID8gdmFsdWUgOiBbdmFsdWVdLFxuICAgIH0sXG4gIH07XG59XG4iXX0=
{
"name": "@arranger/middleware",
"version": "0.2.4",
"version": "0.3.2",
"description": "Arranger Middleware",

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

@@ -48,2 +48,3 @@ import buildAggregations from '../src/buildAggregations.js';

access: { terms: { field: 'access', size: 300000 } },
'access:missing': { missing: { field: 'access' } },
'cases.samples.portions.is_ffpe:nested': {

@@ -58,2 +59,6 @@ nested: { path: 'cases' },

aggs: {
'cases.samples.portions.is_ffpe:missing': {
aggs: { rn: { reverse_nested: {} } },
missing: { field: 'cases.samples.portions.is_ffpe' },
},
'cases.samples.portions.is_ffpe': {

@@ -89,2 +94,9 @@ aggs: { rn: { reverse_nested: {} } },

aggs: {
'cases.samples.portions.slides.annotations.notes:missing': {
aggs: { rn: { reverse_nested: {} } },
missing: {
field:
'cases.samples.portions.slides.annotations.notes',
},
},
'cases.samples.portions.slides.annotations.notes': {

@@ -125,2 +137,9 @@ aggs: { rn: { reverse_nested: {} } },

aggs: {
'cases.samples.portions.slides.annotations.category:missing': {
aggs: { rn: { reverse_nested: {} } },
missing: {
field:
'cases.samples.portions.slides.annotations.category',
},
},
'cases.samples.portions.slides.annotations.category': {

@@ -189,2 +208,6 @@ aggs: { rn: { reverse_nested: {} } },

aggs: {
'participants.kf_id:missing': {
aggs: { rn: { reverse_nested: {} } },
missing: { field: 'participants.kf_id' },
},
'participants.kf_id': {

@@ -238,3 +261,8 @@ aggs: { rn: { reverse_nested: {} } },

'acl:filtered': {
aggs: { acl: { terms: { field: 'acl', size: 300000 } } },
aggs: {
'acl:missing': {
missing: { field: 'acl' },
},
acl: { terms: { field: 'acl', size: 300000 } },
},
filter: {

@@ -303,2 +331,3 @@ bool: {

acl: { terms: { field: 'acl', size: 300000 } },
'acl:missing': { missing: { field: 'acl' } },
'mdx:stats': { stats: { field: 'mdx' } },

@@ -327,4 +356,8 @@ };

access: { terms: { field: 'access', size: 300000 } },
'access:missing': { missing: { field: 'access' } },
'case:global': {
aggs: { case: { terms: { field: 'case', size: 300000 } } },
aggs: {
case: { terms: { field: 'case', size: 300000 } },
'case:missing': { missing: { field: 'case' } },
},
global: {},

@@ -331,0 +364,0 @@ },

@@ -7,4 +7,4 @@ import flattenAggregations from '../src/flattenAggregations.js';

input: {
status_global: {
status_filtered: {
'status:global': {
'status:filtered': {
status: {

@@ -22,6 +22,5 @@ buckets: [{ key: 'legacy', doc_count: 34 }],

input: {
categoryName_missing: { doc_count: 0 },
itemType_missing: { doc_count: 0 },
itemType_global: {
itemType_filtered: {
'itemType:global': {
'itemType:filtered': {
'itemType:missing': { doc_count: 0 },
itemType: {

@@ -37,4 +36,5 @@ buckets: [

},
categoryName_global: {
categoryName_filtered: {
'categoryName:global': {
'categoryName:filtered': {
'categoryName:missing': { doc_count: 0 },
categoryName: {

@@ -72,4 +72,4 @@ buckets: [

input: {
status_global: {
status_filtered: {
'status:global': {
'status:filtered': {
status: {

@@ -80,3 +80,3 @@ buckets: [{ key: 'legacy', doc_count: 34 }],

},
status_missing: { doc_count: 1 },
'status:missing': { doc_count: 1 },
},

@@ -89,3 +89,3 @@ },

{ key: 'legacy', doc_count: 34 },
// { key: '_missing', doc_count: 1 },
{ key: '_missing', doc_count: 1 },
],

@@ -97,5 +97,5 @@ },

input: {
status_missing: { doc_count: 0 },
'archive.revision_global': {
'archive.revision_filtered': {
'archive.revision:global': {
'archive.revision:filtered': {
'status:missing': { doc_count: 0 },
'archive.revision': {

@@ -127,3 +127,3 @@ buckets: [

'samples.is_ffpe:missing': {
is_ffpe_missing_rn: { doc_count: 5 },
rn: { doc_count: 5 },
doc_count: 3,

@@ -145,3 +145,3 @@ },

{ key: 'a', doc_count: 7 },
// { key: '_missing', doc_count: 5 },
{ key: '_missing', doc_count: 5 },
],

@@ -153,4 +153,4 @@ },

input: {
'samples.portions.amount_global': {
'samples.portions.amount_filtered': {
'samples.portions.amount:global': {
'samples.portions.amount:filtered': {
samples: {

@@ -161,4 +161,4 @@ portions: {

},
amount_missing: {
amount_missing_rn: { doc_count: 5 },
'samples.portions.amount:missing': {
rn: { doc_count: 5 },
doc_count: 3,

@@ -179,3 +179,3 @@ },

{ key: 'a', doc_count: 7 },
// { key: '_missing', doc_count: 5 },
{ key: '_missing', doc_count: 5 },
],

@@ -187,9 +187,5 @@ },

input: {
'samples.portions.amount_global': {
'samples.portions.amount_filtered': {
'samples.portions.amount:global': {
'samples.portions.amount:filtered': {
samples: {
is_ffpe_missing: {
is_ffpe_missing_rn: { doc_count: 5 },
doc_count: 3,
},
portions: {

@@ -199,4 +195,4 @@ 'samples.portions.amount': {

},
amount_missing: {
amount_missing_rn: { doc_count: 5 },
'samples.portions.amount:missing': {
rn: { doc_count: 5 },
doc_count: 3,

@@ -206,2 +202,6 @@ },

},
'samples.is_ffpe:missing': {
rn: { doc_count: 5 },
doc_count: 3,
},
'samples.is_ffpe': {

@@ -221,3 +221,3 @@ buckets: [{ rn: { doc_count: 7 }, key: 'a', doc_count: 7 }],

{ key: 'a', doc_count: 7 },
// { key: '_missing', doc_count: 5 },
{ key: '_missing', doc_count: 5 },
],

@@ -228,3 +228,3 @@ },

{ key: 'a', doc_count: 7 },
// { key: '_missing', doc_count: 5 },
{ key: '_missing', doc_count: 5 },
],

@@ -236,4 +236,4 @@ },

input: {
status_global: {
status_filtered: {
'status:global': {
'status:filtered': {
status: {

@@ -244,10 +244,10 @@ buckets: [{ key: 'legacy', doc_count: 34 }],

},
status_missing: { doc_count: 0 },
'status:missing': { doc_count: 0 },
},
},
'samples.portions.amount_global': {
'samples.portions.amount_filtered': {
'samples.portions.amount:filtered': {
samples: {
is_ffpe_missing: {
is_ffpe_missing_rn: { doc_count: 5 },
'samples.is_ffpe:missing': {
rn: { doc_count: 5 },
doc_count: 3,

@@ -259,4 +259,4 @@ },

},
amount_missing: {
amount_missing_rn: { doc_count: 5 },
'samples.portions.amount:missing': {
rn: { doc_count: 5 },
doc_count: 3,

@@ -281,3 +281,3 @@ },

{ key: 'a', doc_count: 7 },
// { key: '_missing', doc_count: 5 },
{ key: '_missing', doc_count: 5 },
],

@@ -288,3 +288,3 @@ },

{ key: 'a', doc_count: 7 },
// { key: '_missing', doc_count: 5 },
{ key: '_missing', doc_count: 5 },
],

@@ -291,0 +291,0 @@ },

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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