@punks/backend-entity-manager 0.0.93 → 0.0.94
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 +4 -4
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/abstractions/import.d.ts +5 -2
- package/dist/esm/index.js +4 -4
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/abstractions/import.d.ts +5 -2
- package/dist/index.d.ts +5 -2
- package/package.json +1 -1
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { EntitySerializationFormat } from "./serializer";
|
|
3
|
-
export type
|
|
4
|
-
format: EntitySerializationFormat;
|
|
3
|
+
export type EntitiesImportInputFile = {
|
|
5
4
|
fileName: string;
|
|
6
5
|
content: Buffer;
|
|
7
6
|
contentType: string;
|
|
8
7
|
};
|
|
8
|
+
export type EntitiesImportInput = {
|
|
9
|
+
format: EntitySerializationFormat;
|
|
10
|
+
file: EntitiesImportInputFile;
|
|
11
|
+
};
|
|
9
12
|
export type EntitiesImportStatistics = {
|
|
10
13
|
importedCount: number;
|
|
11
14
|
updatedCount: number;
|
package/dist/esm/index.js
CHANGED
|
@@ -996,11 +996,11 @@ class EntitiesImportCommand {
|
|
|
996
996
|
}
|
|
997
997
|
async execute(input) {
|
|
998
998
|
await this.uploadImportFile({
|
|
999
|
-
content: input.content,
|
|
1000
|
-
contentType: input.contentType,
|
|
1001
|
-
fileName: input.fileName,
|
|
999
|
+
content: input.file.content,
|
|
1000
|
+
contentType: input.file.contentType,
|
|
1001
|
+
fileName: input.file.fileName,
|
|
1002
1002
|
});
|
|
1003
|
-
const importEntities = await this.parseImportFile(input.content, input.format);
|
|
1003
|
+
const importEntities = await this.parseImportFile(input.file.content, input.format);
|
|
1004
1004
|
for (const entry of importEntities) {
|
|
1005
1005
|
await this.importEntity(entry);
|
|
1006
1006
|
}
|