@punks/backend-entity-manager 0.0.454 → 0.0.456

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
@@ -141,6 +141,12 @@ class MissingEntityIdError extends EntityManagerException {
141
141
  }
142
142
  }
143
143
 
144
+ exports.InvalidEntityHandling = void 0;
145
+ (function (InvalidEntityHandling) {
146
+ InvalidEntityHandling["Skip"] = "skip";
147
+ InvalidEntityHandling["Fail"] = "fail";
148
+ })(exports.InvalidEntityHandling || (exports.InvalidEntityHandling = {}));
149
+
144
150
  class LockNotFoundError extends Error {
145
151
  }
146
152
  class ExclusiveOperationResult {
@@ -952,12 +958,6 @@ class EntitiesExportCommand {
952
958
  }
953
959
  }
954
960
 
955
- var InvalidEntityHandling;
956
- (function (InvalidEntityHandling) {
957
- InvalidEntityHandling["Skip"] = "skip";
958
- InvalidEntityHandling["Fail"] = "fail";
959
- })(InvalidEntityHandling || (InvalidEntityHandling = {}));
960
-
961
961
  class EntitiesImportCommand {
962
962
  constructor(services, settings) {
963
963
  this.services = services;
@@ -973,7 +973,7 @@ class EntitiesImportCommand {
973
973
  const validEntities = importEntities.filter((x) => x.status.isValid);
974
974
  const invalidEntities = importEntities.filter((x) => !x.status.isValid);
975
975
  if (invalidEntities.length > 0 &&
976
- input.options?.invalidEntitiesHandling !== InvalidEntityHandling.Skip) {
976
+ input.options?.invalidEntitiesHandling !== exports.InvalidEntityHandling.Skip) {
977
977
  throw new Error(`Cannot import file due to invalid entities: ${invalidEntities
978
978
  .map((x) => x.id)
979
979
  .join(", ")}`);
@@ -2816,6 +2816,7 @@ const toEntitiesImportInput = (request) => ({
2816
2816
  fileName: request.file.originalname,
2817
2817
  },
2818
2818
  payload: request.payload,
2819
+ options: request.options,
2819
2820
  });
2820
2821
 
2821
2822
  class IEntityVersionsCursor {