pim-import 5.3.0 → 5.4.0

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.
@@ -227,6 +227,14 @@ const importDictionaryFields = async (offset = 0, limit = -1) => {
227
227
  }
228
228
  (0, logs_1.log)(`Add certifications to data`);
229
229
  data.certifications = certifications;
230
+ (0, logs_1.log)("Create certifiedFilters");
231
+ let certifiedFilters = [];
232
+ const pimCertified = data.certified;
233
+ for (const [, values] of Object.entries(pimCertified)) {
234
+ certifiedFilters = certifiedFilters.concat(values);
235
+ }
236
+ (0, logs_1.log)(`Add certifiedFilters to data`);
237
+ data.certifiedFilters = certifiedFilters.filter((item, index, arr) => arr.findIndex((obj) => obj.code === item.code) === index);
230
238
  (0, logs_1.log)("Create catalogs");
231
239
  data.catalogs = pimDictionaryData.Catalog;
232
240
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pim-import",
3
- "version": "5.3.0",
3
+ "version": "5.4.0",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",