@punks/backend-entity-manager 0.0.443 → 0.0.445
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 +5 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/abstractions/actions.d.ts +2 -2
- package/dist/cjs/types/base/serializer.d.ts +2 -2
- package/dist/cjs/types/commands/import.d.ts +1 -1
- package/dist/esm/index.js +5 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/abstractions/actions.d.ts +2 -2
- package/dist/esm/types/base/serializer.d.ts +2 -2
- package/dist/esm/types/commands/import.d.ts +1 -1
- package/dist/index.d.ts +4 -4
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -257,9 +257,10 @@ class EntitySerializer {
|
|
|
257
257
|
}
|
|
258
258
|
this.logger.info(`Entities import -> completed (${items.length} items)`);
|
|
259
259
|
}
|
|
260
|
-
async parse(data, format) {
|
|
260
|
+
async parse(data, format, payload) {
|
|
261
261
|
const context = await this.getContext();
|
|
262
|
-
|
|
262
|
+
console.log("/serializer/base/parse", payload);
|
|
263
|
+
const definition = await this.getDefinition(context, payload);
|
|
263
264
|
switch (format) {
|
|
264
265
|
case exports.EntitySerializationFormat.Csv:
|
|
265
266
|
return this.parseCsv(data, definition);
|
|
@@ -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);
|