@websolutespa/bom-mixer-store 1.4.5 → 1.4.6

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @websolutespa/bom-mixer-store
2
2
 
3
+ ## 1.4.6
4
+
5
+ ### Patch Changes
6
+
7
+ - Fixing: CachedService findMany DecoratedApi
8
+
3
9
  ## 1.4.5
4
10
 
5
11
  ### Patch Changes
package/dist/index.js CHANGED
@@ -1219,16 +1219,16 @@ var CachedService = class extends import_bom_core10.JsonService {
1219
1219
  const { market, locale, ...otherParams } = params;
1220
1220
  const serializedParams = (0, import_bom_core10.qsSerialize)({ market, locale });
1221
1221
  const key = `findMany?${serializedParams}`;
1222
- return await this.fromCache_(async () => {
1223
- let items = await this.service_.findMany({ market, locale });
1224
- if (otherParams.where) {
1225
- items = this.whereItems_(items, otherParams.where);
1226
- }
1227
- if (otherParams.sort) {
1228
- items = this.sortCollection_(items, otherParams.sort);
1229
- }
1230
- return items;
1222
+ let items = await this.fromCache_(async () => {
1223
+ return await this.service_.findMany({ market, locale });
1231
1224
  }, key);
1225
+ if (otherParams.where) {
1226
+ items = this.whereItems_(items, otherParams.where);
1227
+ }
1228
+ if (otherParams.sort) {
1229
+ items = this.sortCollection_(items, otherParams.sort);
1230
+ }
1231
+ return items;
1232
1232
  } else {
1233
1233
  const serializedParams = (0, import_bom_core10.qsSerialize)(params);
1234
1234
  const key = `findMany?${serializedParams}`;
package/dist/index.mjs CHANGED
@@ -1116,16 +1116,16 @@ var CachedService = class extends JsonService3 {
1116
1116
  const { market, locale, ...otherParams } = params;
1117
1117
  const serializedParams = qsSerialize({ market, locale });
1118
1118
  const key = `findMany?${serializedParams}`;
1119
- return await this.fromCache_(async () => {
1120
- let items = await this.service_.findMany({ market, locale });
1121
- if (otherParams.where) {
1122
- items = this.whereItems_(items, otherParams.where);
1123
- }
1124
- if (otherParams.sort) {
1125
- items = this.sortCollection_(items, otherParams.sort);
1126
- }
1127
- return items;
1119
+ let items = await this.fromCache_(async () => {
1120
+ return await this.service_.findMany({ market, locale });
1128
1121
  }, key);
1122
+ if (otherParams.where) {
1123
+ items = this.whereItems_(items, otherParams.where);
1124
+ }
1125
+ if (otherParams.sort) {
1126
+ items = this.sortCollection_(items, otherParams.sort);
1127
+ }
1128
+ return items;
1129
1129
  } else {
1130
1130
  const serializedParams = qsSerialize(params);
1131
1131
  const key = `findMany?${serializedParams}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@websolutespa/bom-mixer-store",
3
- "version": "1.4.5",
3
+ "version": "1.4.6",
4
4
  "description": "Mixer Store module of the BOM Repository",
5
5
  "keywords": [
6
6
  "bom",
@@ -73,16 +73,16 @@ export class CachedService<T extends IEntity = IEntity> extends JsonService<T> {
73
73
  const { market, locale, ...otherParams } = params;
74
74
  const serializedParams = qsSerialize({ market, locale });
75
75
  const key = `findMany?${serializedParams}`;
76
- return await this.fromCache_(async () => {
77
- let items = await this.service_.findMany({ market, locale });
78
- if (otherParams.where) {
79
- items = this.whereItems_(items, otherParams.where);
80
- }
81
- if (otherParams.sort) {
82
- items = this.sortCollection_(items, otherParams.sort);
83
- }
84
- return items;
76
+ let items = await this.fromCache_(async () => {
77
+ return await this.service_.findMany({ market, locale });
85
78
  }, key) as B[];
79
+ if (otherParams.where) {
80
+ items = this.whereItems_(items, otherParams.where);
81
+ }
82
+ if (otherParams.sort) {
83
+ items = this.sortCollection_(items, otherParams.sort);
84
+ }
85
+ return items;
86
86
  } else {
87
87
  const serializedParams = qsSerialize(params);
88
88
  const key = `findMany?${serializedParams}`;