@punks/backend-entity-manager 0.0.425 → 0.0.427
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 +6 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +6 -2
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -279,12 +279,16 @@ class EntitySerializer {
|
|
|
279
279
|
keysTransform: backendCore.ExcelKeyTransform.Lower,
|
|
280
280
|
dateColumns: dateColumns.map((x) => x.name),
|
|
281
281
|
});
|
|
282
|
-
console.log("records", records);
|
|
283
282
|
return Array.isArray(records)
|
|
284
283
|
? records.map((x, i) => this.convertSheetRecord(x, definition, i))
|
|
285
|
-
: Object.values(records)
|
|
284
|
+
: Object.values(records)
|
|
285
|
+
.flat()
|
|
286
|
+
.map((x, i) => this.convertSheetRecord(x, definition, i));
|
|
286
287
|
}
|
|
287
288
|
convertSheetRecord(record, definition, rowIndex) {
|
|
289
|
+
console.log("record", record);
|
|
290
|
+
console.log("definition", definition);
|
|
291
|
+
console.log("rowIndex", rowIndex);
|
|
288
292
|
if (definition.sheet?.useTypeColumn &&
|
|
289
293
|
(!record._type || record._type !== this.entityName)) {
|
|
290
294
|
throw new Error(`Invalid record type ${record._type} -> record: \n${JSON.stringify(record)}`);
|