scheduler-node-models 1.2.93 → 1.2.95
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/config/logging.d.ts
CHANGED
package/config/logging.js
CHANGED
|
@@ -6,4 +6,7 @@ const general_1 = require("../general");
|
|
|
6
6
|
exports.logConnection = {};
|
|
7
7
|
async function createLogs(application) {
|
|
8
8
|
exports.logConnection.log = new general_1.Logger(`${process.env.LOG_DIR}/${application}/process_${(new Date().toDateString())}.log`);
|
|
9
|
+
exports.logConnection.employeeLog = new general_1.Logger(`${process.env.LOG_DIR}/${application}/employee_${(new Date().toDateString())}.log`);
|
|
10
|
+
exports.logConnection.siteLog = new general_1.Logger(`${process.env.LOG_DIR}/${application}/site_${(new Date().toDateString())}.log`);
|
|
11
|
+
exports.logConnection.teamLog = new general_1.Logger(`${process.env.LOG_DIR}/${application}/team_${(new Date().toDateString())}.log`);
|
|
9
12
|
}
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ITeam, Team } from "../teams";
|
|
2
2
|
import { ExcelRow } from "./excelRow";
|
|
3
3
|
export declare class SAPIngest {
|
|
4
|
-
files: File[];
|
|
4
|
+
files: Express.Multer.File[];
|
|
5
5
|
team: Team;
|
|
6
|
-
constructor(files?: File[], team?: ITeam);
|
|
6
|
+
constructor(files?: Express.Multer.File[], team?: ITeam);
|
|
7
7
|
Process(): Promise<ExcelRow[]>;
|
|
8
|
-
processFile(file: File): Promise<ExcelRow[]>;
|
|
8
|
+
processFile(file: Express.Multer.File): Promise<ExcelRow[]>;
|
|
9
9
|
}
|
|
@@ -4,6 +4,7 @@ exports.SAPIngest = void 0;
|
|
|
4
4
|
const teams_1 = require("../teams");
|
|
5
5
|
const excelRow_1 = require("./excelRow");
|
|
6
6
|
const exceljs_1 = require("exceljs");
|
|
7
|
+
const stream_1 = require("stream");
|
|
7
8
|
class SAPIngest {
|
|
8
9
|
files;
|
|
9
10
|
team;
|
|
@@ -27,7 +28,7 @@ class SAPIngest {
|
|
|
27
28
|
const result = [];
|
|
28
29
|
// convert the file into a buffer to allow the exceljs library to create an excel
|
|
29
30
|
// document to read through.
|
|
30
|
-
const filereader =
|
|
31
|
+
const filereader = stream_1.Readable.from(file.buffer);
|
|
31
32
|
const fileDataU8 = [];
|
|
32
33
|
while (true) {
|
|
33
34
|
const { done, value } = await filereader.read();
|