@punks/backend-entity-manager 0.0.429 → 0.0.431

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
@@ -289,9 +289,9 @@ class EntitySerializer {
289
289
  }
290
290
  const entity = (definition.autoColumns ? { ...record } : {});
291
291
  for (const column of definition.columns) {
292
- const columnName = normalizeSheetColumn(column.name);
293
- if (!(columnName in record))
292
+ if (!(column.name in record))
294
293
  continue;
294
+ const columnName = normalizeSheetColumn(column.name);
295
295
  if (column.parseAction) {
296
296
  column.parseAction(record[columnName], entity);
297
297
  continue;
@@ -305,10 +305,11 @@ class EntitySerializer {
305
305
  .map((x) => applyModifiers(x, column.modifiers))
306
306
  .filter((x) => isValidValue(x))
307
307
  : applyModifiers(parsedColumn, column.modifiers);
308
+ delete record[column.name];
308
309
  }
309
310
  const validationErrors = [];
310
311
  for (const column of definition.columns) {
311
- if (!(normalizeSheetColumn(column.name) in record))
312
+ if (!(column.name in record))
312
313
  continue;
313
314
  for (const validator of column.validators ?? []) {
314
315
  const result = validator.fn(entity);