@punks/backend-entity-manager 0.0.444 → 0.0.446

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
@@ -259,6 +259,7 @@ class EntitySerializer {
259
259
  }
260
260
  async parse(data, format, payload) {
261
261
  const context = await this.getContext();
262
+ console.log("/serializer/base/parse", payload);
262
263
  const definition = await this.getDefinition(context, payload);
263
264
  switch (format) {
264
265
  case exports.EntitySerializationFormat.Csv:
@@ -965,6 +966,7 @@ class EntitiesImportCommand {
965
966
  contentType: input.file.contentType,
966
967
  fileName: input.file.fileName,
967
968
  });
969
+ console.log("/commands/import/execute", input?.payload);
968
970
  const importEntities = await this.parseImportFile(input.file.content, input.format, input?.payload);
969
971
  const validEntities = importEntities.filter((x) => x.status.isValid);
970
972
  const invalidEntities = importEntities.filter((x) => !x.status.isValid);
@@ -986,6 +988,7 @@ class EntitiesImportCommand {
986
988
  };
987
989
  }
988
990
  async parseImportFile(content, format, payload) {
991
+ console.log("/import/command/parseImportFile", payload);
989
992
  return await this.services
990
993
  .resolveSerializer()
991
994
  .parse(content, format, payload);
@@ -1017,13 +1020,15 @@ class EntitiesParseCommand {
1017
1020
  contentType: input.file.contentType,
1018
1021
  fileName: input.file.fileName,
1019
1022
  });
1020
- const entries = await this.parseImportFile(input.file.content, input.format);
1023
+ const entries = await this.parseImportFile(input.file.content, input.format, input?.payload);
1021
1024
  return {
1022
1025
  entries,
1023
1026
  };
1024
1027
  }
1025
- async parseImportFile(content, format) {
1026
- return await this.services.resolveSerializer().parse(content, format);
1028
+ async parseImportFile(content, format, payload) {
1029
+ return await this.services
1030
+ .resolveSerializer()
1031
+ .parse(content, format, payload);
1027
1032
  }
1028
1033
  async uploadImportFile(file) {
1029
1034
  await this.bucket.fileUpload({