@punks/backend-entity-manager 0.0.156 → 0.0.158

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/dist/cjs/index.js CHANGED
@@ -147,11 +147,11 @@ class EntitySerializer {
147
147
  const entities = await this.loadEntities(filters ?? {});
148
148
  return await this.convertToSheetItems(entities);
149
149
  }
150
- async import(items) {
150
+ async import(items, payload) {
151
151
  this.logger.info(`Entities import -> started (${items.length} items)`);
152
152
  const context = await this.getContext();
153
153
  for (const [index, item] of items.entries()) {
154
- await this.importItem(item, context);
154
+ await this.importItem(item, context, payload);
155
155
  this.logger.info(`Entity imported -> ${index + 1}/${items.length}`);
156
156
  }
157
157
  this.logger.info(`Entities import -> completed (${items.length} items)`);
@@ -707,7 +707,9 @@ class EntitiesImportCommand {
707
707
  fileName: input.file.fileName,
708
708
  });
709
709
  const importEntities = await this.parseImportFile(input.file.content, input.format);
710
- await this.services.resolveSerializer().import(importEntities);
710
+ await this.services
711
+ .resolveSerializer()
712
+ .import(importEntities, input.payload);
711
713
  return {
712
714
  statistics: {
713
715
  importedCount: importEntities.length,