@arranger/middleware
Advanced tools
Comparing version 0.3.19 to 0.3.20
@@ -12,8 +12,12 @@ "use strict"; | ||
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 _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } | ||
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 _nonIterableRest() { throw new TypeError("Invalid attempt to destructure 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 _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 _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; } | ||
@@ -59,3 +63,3 @@ | ||
}); | ||
return cleaned && _extends({}, query, _defineProperty({}, _constants.ES_NESTED, _extends({}, nested, _defineProperty({}, _constants.ES_QUERY, cleaned)))); | ||
return cleaned && _objectSpread({}, query, _defineProperty({}, _constants.ES_NESTED, _objectSpread({}, nested, _defineProperty({}, _constants.ES_QUERY, cleaned)))); | ||
} else if (bool) { | ||
@@ -73,3 +77,3 @@ var filtered = Object.entries(bool).reduce(function (bool, _ref6) { | ||
}).filter(Boolean); | ||
return filteredValues.length > 0 ? _extends({}, bool, _defineProperty({}, type, filteredValues)) : bool; | ||
return filteredValues.length > 0 ? _objectSpread({}, bool, _defineProperty({}, type, filteredValues)) : bool; | ||
}, {}); | ||
@@ -87,3 +91,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, _extends({ | ||
return _defineProperty({}, "".concat(field, ":").concat(type), _defineProperty({}, type, _objectSpread({ | ||
field: field | ||
@@ -100,3 +104,3 @@ }, type === _constants.HISTOGRAM ? { | ||
isNested = _ref11.isNested; | ||
return _ref12 = {}, _defineProperty(_ref12, field, _extends({}, isNested ? { | ||
return _ref12 = {}, _defineProperty(_ref12, field, _objectSpread({}, isNested ? { | ||
aggs: { | ||
@@ -112,3 +116,3 @@ rn: { | ||
} | ||
})), _defineProperty(_ref12, "".concat(field, ":missing"), _extends({}, isNested ? { | ||
})), _defineProperty(_ref12, "".concat(field, ":missing"), _objectSpread({}, isNested ? { | ||
aggs: { | ||
@@ -217,3 +221,3 @@ rn: { | ||
}, fieldAggregation); | ||
return _extends({}, aggregations, wrapWithFilters({ | ||
return _objectSpread({}, aggregations, wrapWithFilters({ | ||
query: query,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Z3RoLFxuICAgICAgfSk7XG5cbiAgICAgIGNvbnN0IGFnZ3JlZ2F0aW9uID0gbmVzdGVkUGF0aHMucmV2ZXJzZSgpLnJlZHVjZShcbiAgICAgICAgKGFnZ3MsIHBhdGgpID0+ICh7XG4gICAgICAgICAgW2Ake2ZpZWxkfToke0FHR1NfV1JBUFBFUl9ORVNURUR9YF06IHsgbmVzdGVkOiB7IHBhdGggfSwgYWdncyB9LFxuICAgICAgICB9KSxcbiAgICAgICAgZmllbGRBZ2dyZWdhdGlvbixcbiAgICAgICk7XG5cbiAgICAgIHJldHVybiB7XG4gICAgICAgIC4uLmFnZ3JlZ2F0aW9ucyxcbiAgICAgICAgLi4ud3JhcFdpdGhGaWx0ZXJzKHtcbiAgICAgICAgICBxdWVyeSxcbiAgICAgICAgICBmaWVsZCxcbiAgICAgICAgICBhZ2dyZWdhdGlvbixcbiAgICAgICAgICBhZ2dyZWdhdGlvbnNGaWx0ZXJUaGVtc2VsdmVzLFxuICAgICAgICB9KSxcbiAgICAgIH07XG4gICAgfSxcbiAgICB7fSxcbiAgKTtcbn1cbiJdfQ== |
@@ -20,12 +20,22 @@ "use strict"; | ||
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 _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 _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 _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 _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } | ||
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 _nonIterableRest() { 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) { | ||
@@ -102,3 +112,3 @@ var esFilter = _ref.esFilter, | ||
}) || ''; | ||
return _extends({}, map, _defineProperty({}, group, _toConsumableArray(map[group] || []).concat([field]))); | ||
return _objectSpread({}, map, _defineProperty({}, group, _toConsumableArray(map[group] || []).concat([field]))); | ||
}, {}); // construct one multi match per nested group | ||
@@ -110,4 +120,4 @@ | ||
return wrapFilter({ | ||
filter: _extends({}, filter, { | ||
content: _extends({}, content, { | ||
filter: _objectSpread({}, filter, { | ||
content: _objectSpread({}, content, { | ||
field: fields[0] | ||
@@ -280,2 +290,2 @@ }) | ||
} | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9idWlsZFF1ZXJ5L2luZGV4LmpzIl0sIm5hbWVzIjpbIndyYXBGaWx0ZXIiLCJlc0ZpbHRlciIsIm5lc3RlZEZpZWxkcyIsImZpbHRlciIsImlzTm90IiwiY29udGVudCIsImZpZWxkIiwic3BsaXQiLCJzbGljZSIsIm1hcCIsInAiLCJpIiwic2VnbWVudHMiLCJqb2luIiwiaW5jbHVkZXMiLCJyZXZlcnNlIiwicmVkdWNlIiwicGF0aCIsImdldFJlZ2V4RmlsdGVyIiwib3AiLCJ2YWx1ZSIsInJlZ2V4cCIsInJlcGxhY2UiLCJnZXRUZXJtRmlsdGVyIiwidGVybXMiLCJpdGVtIiwiZ2V0RnV6enlGaWx0ZXIiLCJmaWVsZHMiLCJzb3J0ZWROZXN0ZWQiLCJzb3J0IiwiYSIsImIiLCJsZW5ndGgiLCJuZXN0ZWRNYXAiLCJncm91cCIsImZpbmQiLCJ5IiwiT2JqZWN0IiwidmFsdWVzIiwiZ2V0TWlzc2luZ0ZpbHRlciIsImV4aXN0cyIsImJvb3N0IiwiZ2V0UmFuZ2VGaWx0ZXIiLCJyYW5nZSIsIm1heCIsIm1pbiIsImNvbGxhcHNlTmVzdGVkRmlsdGVycyIsImJvb2xzIiwiZmlsdGVySXNOZXN0ZWQiLCJiYXNlUGF0aCIsImdldCIsImZvdW5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0ZXI6IG5vcm1hbGl6ZUZpbHRlcnMocmF3RmlsdGVycykgfSk7XG59XG4iXX0= |
@@ -10,6 +10,14 @@ "use strict"; | ||
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 _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 _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 _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) { 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) { | ||
@@ -43,8 +51,8 @@ var op = _ref.op, | ||
if (_constants.OP_ALIASES[op]) { | ||
return normalizeFilters(_extends({}, filter, { | ||
return normalizeFilters(_objectSpread({}, filter, { | ||
op: _constants.OP_ALIASES[op] | ||
})); | ||
} else if (_constants.ARRAY_CONTENT.includes(op) && !Array.isArray(value)) { | ||
return normalizeFilters(_extends({}, filter, { | ||
content: _extends({}, content, { | ||
return normalizeFilters(_objectSpread({}, filter, { | ||
content: _objectSpread({}, content, { | ||
value: [].concat(value) | ||
@@ -56,4 +64,4 @@ }) | ||
var specialFilters = value.filter(isSpecialFilter).map(function (specialValue) { | ||
return _extends({}, filter, { | ||
content: _extends({}, content, { | ||
return _objectSpread({}, filter, { | ||
content: _objectSpread({}, content, { | ||
value: [specialValue] | ||
@@ -66,4 +74,4 @@ }) | ||
}); | ||
var filters = normalValues.length > 0 ? [_extends({}, filter, { | ||
content: _extends({}, content, { | ||
var filters = normalValues.length > 0 ? [_objectSpread({}, filter, { | ||
content: _objectSpread({}, content, { | ||
value: normalValues | ||
@@ -85,2 +93,2 @@ }) | ||
exports.default = _default; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9idWlsZFF1ZXJ5L25vcm1hbGl6ZUZpbHRlcnMuanMiXSwibmFtZXMiOlsiZ3JvdXBpbmdPcHRpbWl6ZXIiLCJvcCIsImNvbnRlbnQiLCJtYXAiLCJub3JtYWxpemVGaWx0ZXJzIiwicmVkdWNlIiwiZmlsdGVycyIsImYiLCJpc1NwZWNpYWxGaWx0ZXIiLCJ2YWx1ZSIsImluY2x1ZGVzIiwiZmlsdGVyIiwiRXJyb3IiLCJBcnJheSIsImlzQXJyYXkiLCJjb25jYXQiLCJzb21lIiwibGVuZ3RoIiwic3BlY2lhbEZpbHRlcnMiLCJzcGVjaWFsVmFsdWUiLCJub3JtYWxWYWx1ZXMiLCJwc3YiXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFBQTs7Ozs7O0FBVUEsU0FBU0EsaUJBQVQsT0FBNEM7QUFBQSxNQUFmQyxFQUFlLFFBQWZBLEVBQWU7QUFBQSxNQUFYQyxPQUFXLFFBQVhBLE9BQVc7QUFDMUMsU0FBTztBQUNM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VuZ3RoID4gMFxuICAgICAgICA/IFtcbiAgICAgICAgICAgIHsgLi4uZmlsdGVyLCBjb250ZW50OiB7IC4uLmNvbnRlbnQsIHZhbHVlOiBub3JtYWxWYWx1ZXMgfSB9LFxuICAgICAgICAgICAgLi4uc3BlY2lhbEZpbHRlcnMsXG4gICAgICAgICAgXVxuICAgICAgICA6IHNwZWNpYWxGaWx0ZXJzO1xuXG4gICAgcmV0dXJuIG5vcm1hbGl6ZUZpbHRlcnMoeyBvcDogT1JfT1AsIGNvbnRlbnQ6IGZpbHRlcnMgfSk7XG4gIH0gZWxzZSBpZiAoW0FORF9PUCwgT1JfT1AsIE5PVF9PUF0uaW5jbHVkZXMob3ApKSB7XG4gICAgcmV0dXJuIGdyb3VwaW5nT3B0aW1pemVyKGZpbHRlcik7XG4gIH0gZWxzZSB7XG4gICAgcmV0dXJuIGZpbHRlcjtcbiAgfVxufVxuXG5leHBvcnQgZGVmYXVsdCBub3JtYWxpemVGaWx0ZXJzO1xuIl19 |
@@ -79,2 +79,2 @@ "use strict"; | ||
exports.AGGS_WRAPPER_NESTED = AGGS_WRAPPER_NESTED; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9jb25zdGFudHMuanMiXSwibmFtZXMiOlsiSU5fT1AiLCJOT1RfSU5fT1AiLCJTT01FX05PVF9JTl9PUCIsIkZJTFRFUl9PUCIsIkFORF9PUCIsIk9SX09QIiwiTk9UX09QIiwiTUlTU0lOR19PUCIsIkdUX09QIiwiR1RFX09QIiwiTFRfT1AiLCJMVEVfT1AiLCJPUF9BTElBU0VTIiwiQVJSQVlfQ09OVEVOVCIsIkVTX01VU1QiLCJFU19NVVNUX05PVCIsIkVTX1NIT1VMRCIsIkVTX05FU1RFRCIsIkVTX0JPT0wiLCJFU19RVUVSWSIsIkVTX1BBVEgiLCJFU19NVUxUSV9NQVRDSCIsIkVTX0ZJRUxEUyIsIkVTX1RZ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XG5leHBvcnQgY29uc3QgRVNfQk9PTCA9ICdib29sJztcbmV4cG9ydCBjb25zdCBFU19RVUVSWSA9ICdxdWVyeSc7XG5leHBvcnQgY29uc3QgRVNfUEFUSCA9ICdwYXRoJztcbmV4cG9ydCBjb25zdCBFU19NVUxUSV9NQVRDSCA9ICdtdWx0aV9tYXRjaCc7XG5leHBvcnQgY29uc3QgRVNfRklFTERTID0gJ2ZpZWxkcyc7XG5leHBvcnQgY29uc3QgRVNfVFlQRSA9ICd0eXBlJztcbmV4cG9ydCBjb25zdCBFU19QSFJBU0VfUFJFRklYID0gJ3BocmFzZV9wcmVmaXgnO1xuXG5leHBvcnQgY29uc3QgQlVDS0VUUyA9ICdidWNrZXRzJztcbmV4cG9ydCBjb25zdCBTVEFUUyA9ICdzdGF0cyc7XG5leHBvcnQgY29uc3QgSElTVE9HUkFNID0gJ2hpc3RvZ3JhbSc7XG5leHBvcnQgY29uc3QgQUdHU19XUkFQUEVSX0dMT0JBTCA9ICdnbG9iYWwnO1xuZXhwb3J0IGNvbnN0IEFHR1NfV1JBUFBFUl9GSUxURVJFRCA9ICdmaWx0ZXJlZCc7XG5leHBvcnQgY29uc3QgQUdHU19XUkFQUEVSX05FU1RFRCA9ICduZXN0ZWQnO1xuIl19 |
@@ -14,12 +14,22 @@ "use strict"; | ||
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 _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 _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 _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 flattenAggregations(aggregations) { | ||
@@ -40,11 +50,11 @@ return Object.entries(aggregations).reduce(function (prunedAggs, _ref) { | ||
} else if ([_constants.STATS, _constants.HISTOGRAM].includes(aggregationType)) { | ||
return _extends({}, prunedAggs, _defineProperty({}, field, _extends({}, prunedAggs[field], _defineProperty({}, aggregationType, value)))); | ||
return _objectSpread({}, prunedAggs, _defineProperty({}, field, _objectSpread({}, prunedAggs[field], _defineProperty({}, aggregationType, value)))); | ||
} else if (Array.isArray(value.buckets)) { | ||
var missing = (0, _lodash.get)(aggregations, ["".concat(field, ":missing")]); | ||
var buckets = _toConsumableArray(value.buckets).concat(_toConsumableArray(missing ? [_extends({}, missing, { | ||
var buckets = _toConsumableArray(value.buckets).concat(_toConsumableArray(missing ? [_objectSpread({}, missing, { | ||
key: '_missing' | ||
})] : [])); | ||
return _extends({}, prunedAggs, _defineProperty({}, field, { | ||
return _objectSpread({}, prunedAggs, _defineProperty({}, field, { | ||
buckets: buckets.map(function (_ref3) { | ||
@@ -54,3 +64,3 @@ var rn = _ref3.rn, | ||
return _extends({}, bucket, { | ||
return _objectSpread({}, bucket, { | ||
doc_count: rn ? rn.doc_count : bucket.doc_count | ||
@@ -63,3 +73,3 @@ }); | ||
} else { | ||
return _extends({}, prunedAggs, flattenAggregations(value)); | ||
return _objectSpread({}, prunedAggs, flattenAggregations(value)); | ||
} | ||
@@ -71,2 +81,2 @@ }, {}); | ||
exports.default = _default; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9mbGF0dGVuQWdncmVnYXRpb25zLmpzIl0sIm5hbWVzIjpbImZsYXR0ZW5BZ2dyZWdhdGlvbnMiLCJhZ2dyZWdhdGlvbnMiLCJPYmplY3QiLCJlbnRyaWVzIiwicmVkdWNlIiwicHJ1bmVkQWdncyIsImtleSIsInZhbHVlIiwic3BsaXQiLCJmaWVsZ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QuZG9jX2NvdW50LFxuICAgICAgICAgICAgfSkpXG4gICAgICAgICAgICAuZmlsdGVyKGIgPT4gYi5kb2NfY291bnQpLFxuICAgICAgICB9LFxuICAgICAgfTtcbiAgICB9IGVsc2Uge1xuICAgICAgcmV0dXJuIHsgLi4ucHJ1bmVkQWdncywgLi4uZmxhdHRlbkFnZ3JlZ2F0aW9ucyh2YWx1ZSkgfTtcbiAgICB9XG4gIH0sIHt9KTtcbn1cblxuZXhwb3J0IGRlZmF1bHQgZmxhdHRlbkFnZ3JlZ2F0aW9ucztcbiJdfQ== |
@@ -32,2 +32,2 @@ "use strict"; | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQTs7QUFDQTs7QUFDQSIsImZpbGUiOiJpbmRleC5qcyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCB7IGRlZmF1bHQgYXMgYnVpbGRRdWVyeSB9IGZyb20gJy4vYnVpbGRRdWVyeSc7XG5leHBvcnQgeyBkZWZhdWx0IGFzIGZsYXR0ZW5BZ2dyZWdhdGlvbnMgfSBmcm9tICcuL2ZsYXR0ZW5BZ2dyZWdhdGlvbnMnO1xuZXhwb3J0IHsgZGVmYXVsdCBhcyBidWlsZEFnZ3JlZ2F0aW9ucyB9IGZyb20gJy4vYnVpbGRBZ2dyZWdhdGlvbnMnO1xuIl19 | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQTs7QUFDQTs7QUFDQSIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCB7IGRlZmF1bHQgYXMgYnVpbGRRdWVyeSB9IGZyb20gJy4vYnVpbGRRdWVyeSc7XG5leHBvcnQgeyBkZWZhdWx0IGFzIGZsYXR0ZW5BZ2dyZWdhdGlvbnMgfSBmcm9tICcuL2ZsYXR0ZW5BZ2dyZWdhdGlvbnMnO1xuZXhwb3J0IHsgZGVmYXVsdCBhcyBidWlsZEFnZ3JlZ2F0aW9ucyB9IGZyb20gJy4vYnVpbGRBZ2dyZWdhdGlvbnMnO1xuIl19 |
@@ -23,8 +23,14 @@ "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 _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 _toArray(arr) { return _arrayWithHoles(arr) || _iterableToArray(arr) || _nonIterableRest(); } | ||
function _toArray(arr) { return Array.isArray(arr) ? arr : Array.from(arr); } | ||
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } | ||
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) { | ||
@@ -35,3 +41,3 @@ var _ref2 = _toArray(_ref), | ||
return _extends({}, target, _defineProperty({}, key, path.length ? mergePath(_lodash.default.get(target, key, {}), path, data) : data)); | ||
return _objectSpread({}, target, _defineProperty({}, key, path.length ? mergePath(_lodash.default.get(target, key, {}), path, data) : data)); | ||
} | ||
@@ -68,2 +74,2 @@ | ||
} | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlscy9lc0ZpbHRlci5qcyJdLCJuYW1lcyI6WyJtZXJnZVBhdGgiLCJ0YXJnZXQiLCJkYXRhIiwia2V5IiwicGF0aCIsImxlbmd0aCIsImdldCIsImlzTmVzdGVkIiwiZmlsdGVyIiwiaGFzT3duUHJvcGVydHkiLCJDT05TVEFOVFMiLCJFU19ORVNURUQiLCJyZWFkUGF0aCIsIkVTX1BBVEgiLCJ3cmFwTXVzdE5vdCIsInZhbHVlIiwid3JhcEJvb2wiLCJFU19NVVNUX05PVCIsIndyYXBNdXN0IiwiRVNfTVVTVCIsIndyYXBTaG91bGQiLCJFU19TSE9VTEQiLCJ3cmFwTmVzdGVkIiwiZXNGaWx0ZXIiLCJFU19RVUVSWSIsIkVTX0JPT0wiLCJvcCIsIkFycmF5IiwiaXNBcnJheSJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7QUFBQTs7QUFDQTs7Ozs7Ozs7Ozs7O0FBRU8sU0FBU0EsU0FBVCxDQUFtQkMsTUFBbkIsUUFBMkNDLElBQTNDLEVBQWlEO0FBQUE7QUFBQSxNQUFyQkMsR0FBcUI7QUFBQSxNQUFiQyxJQUFhOztBQUN0RCxzQkFDS0gsTUFETCxzQkFFR0UsR0FGSCxFQUVTQyxLQUFLQyxNQUFMLEdBQWNMLFVBQVUsZ0JBQUVNLEdBQUYsQ0FBTUwsTUFBTixFQUFjRSxHQUFkLEVBQW1CLEVBQW5CLENBQVYsRUFBa0NDLElBQWxDLEVBQXdDRixJQU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
{ | ||
"name": "@arranger/middleware", | ||
"version": "0.3.19", | ||
"version": "0.3.20", | ||
"description": "Arranger Middleware", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
459725
19
4999