@autofleet/sheilta 1.3.5-beta.0 → 1.3.5-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -43,7 +43,13 @@ const formatOrder = ({ order, associationModels = [], }) => order.map((o) => {
43
43
  const formatPage = page => page || utils_1.PAGE_DEFAULT;
44
44
  const formatPerPage = perPage => perPage || utils_1.PER_PAGE_DEFAULT;
45
45
  const formatInclude = (include, associationsMap = {}) => {
46
- let formattedInclude = include.map(i => (Object.assign(Object.assign({}, i), { association: associationsMap[i.association || i.model], required: i.required !== false })));
46
+ let formattedInclude = include.map((i) => {
47
+ var _a;
48
+ const includedAssociation = associationsMap[i.association || i.model];
49
+ return Object.assign(Object.assign(Object.assign({}, i), { association: includedAssociation, required: i.required !== false }), (i.include && {
50
+ include: formatInclude(i.include, (_a = includedAssociation === null || includedAssociation === void 0 ? void 0 : includedAssociation.target) === null || _a === void 0 ? void 0 : _a.associations),
51
+ }));
52
+ });
47
53
  formattedInclude = formattedInclude.map(i => lodash_1.default.omit(i, ['model']));
48
54
  return formattedInclude;
49
55
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autofleet/sheilta",
3
- "version": "1.3.5-beta.0",
3
+ "version": "1.3.5-beta.3",
4
4
  "description": "manage cache",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",