@medicus.ai/medicus-report-pdf-generator 1.0.221 → 1.0.222
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/index.js +4 -4
- package/package.json +4 -5
package/index.js
CHANGED
|
@@ -93,8 +93,8 @@ module.exports = {
|
|
|
93
93
|
let reportData = JSON.parse(data)
|
|
94
94
|
let encryptionKey=reportData.encryptionKey
|
|
95
95
|
let sentData=reportData.data
|
|
96
|
-
let ecbDecrypted = encryptDecrypt.ecbDecrypt(sentData, encryptionKey)
|
|
97
|
-
let xorDecrypted = encryptDecrypt.XORDecrypt(ecbDecrypted, encryptionKey)
|
|
96
|
+
let ecbDecrypted = encryptDecrypt.ecbDecrypt(sentData.toString(), encryptionKey)
|
|
97
|
+
let xorDecrypted = encryptDecrypt.XORDecrypt(ecbDecrypted.toString(), encryptionKey)
|
|
98
98
|
let base64Object = Buffer.from(xorDecrypted, 'utf8').toString('base64');
|
|
99
99
|
let LOGS = '';
|
|
100
100
|
let LOGS_FILE_PATH = __dirname + '/output/LOGS.txt';
|
|
@@ -172,7 +172,7 @@ module.exports = {
|
|
|
172
172
|
return fileBuffer;
|
|
173
173
|
} else {
|
|
174
174
|
if (shouldSendEmail)
|
|
175
|
-
|
|
175
|
+
return await sendNascoEmail(decodedJSON, PDF_FILE_PATH, mailConfig,reportData.client)
|
|
176
176
|
else{
|
|
177
177
|
let xorEncrypted = encryptDecrypt.XOREncrypt(base64data, encryptionKey)
|
|
178
178
|
let ecbEncrypted = encryptDecrypt.ecbEncrypt(xorEncrypted.toString(), encryptionKey)
|
|
@@ -224,7 +224,7 @@ module.exports = {
|
|
|
224
224
|
|
|
225
225
|
|
|
226
226
|
let html = await generateHTMLCorporateReport(decodedJSON, isDebugging);
|
|
227
|
-
|
|
227
|
+
|
|
228
228
|
|
|
229
229
|
// 3: save PDF buffer
|
|
230
230
|
let fileBuffer = await generatePDFCorporateReport(html);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@medicus.ai/medicus-report-pdf-generator",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.222",
|
|
4
4
|
"description": "Nasco corporate report - latest update in 2/11/2022 - Fix sanusx coprorate report issues",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -11,13 +11,11 @@
|
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"babel-preset-env": "^1.7.0",
|
|
13
13
|
"babel-register": "^6.26.0",
|
|
14
|
-
"bcrypt": "^5.1.0",
|
|
15
14
|
"big-text.js": "^1.0.1",
|
|
16
15
|
"body-parser": "^1.18.3",
|
|
17
16
|
"canvas": "^2.6.1",
|
|
18
17
|
"canvas-constructor": "^3.2.0",
|
|
19
18
|
"chart.js": "^2.7.3",
|
|
20
|
-
"crypto-js": "^4.1.1",
|
|
21
19
|
"express": "^4.16.4",
|
|
22
20
|
"get-canvas-context": "^1.0.2",
|
|
23
21
|
"hummus": "1.0.111",
|
|
@@ -29,11 +27,12 @@
|
|
|
29
27
|
"node-fetch": "^2.3.0",
|
|
30
28
|
"node-pdftk": "^2.0.2",
|
|
31
29
|
"nodemailer": "^6.6.0",
|
|
32
|
-
"puppeteer": "^1.
|
|
30
|
+
"puppeteer": "^1.15.0",
|
|
33
31
|
"qr-image": "^3.2.0",
|
|
34
32
|
"qrcode": "^1.3.3",
|
|
35
33
|
"self-adapt-fontsize": "^1.0.6",
|
|
36
|
-
"textfit": "^2.3.1"
|
|
34
|
+
"textfit": "^2.3.1",
|
|
35
|
+
"crypto-js": "^4.1.1"
|
|
37
36
|
},
|
|
38
37
|
"devDependencies": {
|
|
39
38
|
"@babel/core": "^7.2.2",
|