@punks/backend-entity-manager 0.0.439 → 0.0.441
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 +1 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +1 -3
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -280,6 +280,7 @@ class EntitySerializer {
|
|
|
280
280
|
dateColumns: dateColumns.map((x) => x.name),
|
|
281
281
|
...(definition?.options ? definition.options : {}),
|
|
282
282
|
});
|
|
283
|
+
console.log("records", records);
|
|
283
284
|
return records.map((x, i) => this.convertSheetRecord(x, definition, i));
|
|
284
285
|
}
|
|
285
286
|
convertSheetRecord(record, definition, rowIndex) {
|
|
@@ -290,8 +291,6 @@ class EntitySerializer {
|
|
|
290
291
|
const entity = (definition.autoColumns ? { ...record } : {});
|
|
291
292
|
for (const column of definition.columns) {
|
|
292
293
|
const columnName = [column.name, ...(column?.aliases ?? [])].find((x) => normalizeSheetColumn(x) in record) ?? null;
|
|
293
|
-
console.log("name", columnName);
|
|
294
|
-
console.log("record", entity);
|
|
295
294
|
if (!columnName)
|
|
296
295
|
continue;
|
|
297
296
|
if (column.parseAction) {
|
|
@@ -306,7 +305,6 @@ class EntitySerializer {
|
|
|
306
305
|
columnName,
|
|
307
306
|
parser: column.parser,
|
|
308
307
|
});
|
|
309
|
-
console.log("parsed", parsedColumn);
|
|
310
308
|
entity[column.selector] = column.array
|
|
311
309
|
? splitArrayColumn(parsedColumn, column.arraySeparator)
|
|
312
310
|
.map((x) => applyModifiers(x, column.modifiers))
|