@kwiz/node 1.0.54 → 1.0.56
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/SPO/common.js +13 -24
- package/dist/SPO/common.js.map +1 -1
- package/dist/auth/discovery.js +3 -12
- package/dist/auth/discovery.js.map +1 -1
- package/dist/auth/msal.js +40 -62
- package/dist/auth/msal.js.map +1 -1
- package/dist/get-with-cache.js +23 -34
- package/dist/get-with-cache.js.map +1 -1
- package/dist/graph/graph.js +11 -22
- package/dist/graph/graph.js.map +1 -1
- package/dist/next-js/api.js +21 -32
- package/dist/next-js/api.js.map +1 -1
- package/dist/next-js/api.responses.js +6 -2
- package/dist/next-js/api.responses.js.map +1 -1
- package/dist/ns/ns-rest.d.ts +1 -1
- package/dist/ns/ns-rest.js +5 -16
- package/dist/ns/ns-rest.js.map +1 -1
- package/dist/ns/ns-restlet.d.ts +2 -2
- package/dist/ns/ns-restlet.js +5 -16
- package/dist/ns/ns-restlet.js.map +1 -1
- package/dist/ns/ns-soap.js +54 -63
- package/dist/ns/ns-soap.js.map +1 -1
- package/dist/ns/ns-suiteql.d.ts +1 -0
- package/dist/ns/ns-suiteql.js +10 -17
- package/dist/ns/ns-suiteql.js.map +1 -1
- package/dist/ns/ns.js +57 -53
- package/dist/ns/ns.js.map +1 -1
- package/dist/ns/oauth1.d.ts +1 -1
- package/dist/ns/oauth1.js +4 -4
- package/dist/ns/oauth1.js.map +1 -1
- package/dist/sf/actions.js +183 -217
- package/dist/sf/actions.js.map +1 -1
- package/dist/sf/connections.js +49 -64
- package/dist/sf/connections.js.map +1 -1
- package/dist/sf/types.js +1 -1
- package/dist/sf/types.js.map +1 -1
- package/dist/storage/blob-storage.js +87 -115
- package/dist/storage/blob-storage.js.map +1 -1
- package/dist/storage/common.js +11 -22
- package/dist/storage/common.js.map +1 -1
- package/dist/storage/table-storage.js +191 -268
- package/dist/storage/table-storage.js.map +1 -1
- package/dist/utilities/email.js +28 -39
- package/dist/utilities/email.js.map +1 -1
- package/dist/utilities/xml.js +11 -2
- package/dist/utilities/xml.js.map +1 -1
- package/package.json +4 -4
package/dist/utilities/email.js
CHANGED
|
@@ -1,46 +1,35 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.sendEmail = sendEmail;
|
|
13
4
|
const common_1 = require("@kwiz/common");
|
|
14
5
|
const nodemailer_1 = require("nodemailer");
|
|
15
|
-
function sendEmail(cfg, info) {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
});
|
|
6
|
+
async function sendEmail(cfg, info) {
|
|
7
|
+
const logger = common_1.ConsoleLogger.get("send-email");
|
|
8
|
+
try {
|
|
9
|
+
const email_user = cfg.login;
|
|
10
|
+
const email_password = cfg.password;
|
|
11
|
+
const mailTransport = (0, nodemailer_1.createTransport)({
|
|
12
|
+
host: 'smtp.office365.com',
|
|
13
|
+
port: 587,
|
|
14
|
+
secure: false,
|
|
15
|
+
auth: { user: email_user, pass: email_password },
|
|
16
|
+
tls: { ciphers: 'SSLv3' }
|
|
17
|
+
});
|
|
18
|
+
const result = await mailTransport.sendMail({
|
|
19
|
+
from: { address: email_user, name: info.fromName },
|
|
20
|
+
to: info.to,
|
|
21
|
+
cc: info.cc,
|
|
22
|
+
bcc: info.bcc,
|
|
23
|
+
replyTo: email_user,
|
|
24
|
+
subject: info.subject,
|
|
25
|
+
html: info.bodyHtml,
|
|
26
|
+
text: info.bodyText
|
|
27
|
+
});
|
|
28
|
+
return result.response;
|
|
29
|
+
}
|
|
30
|
+
catch (err) {
|
|
31
|
+
logger.error(err);
|
|
32
|
+
return (0, common_1.GetError)(err, "send365Email: An error occurred");
|
|
33
|
+
}
|
|
45
34
|
}
|
|
46
35
|
//# sourceMappingURL=email.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"email.js","sourceRoot":"","sources":["../../src/utilities/email.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"email.js","sourceRoot":"","sources":["../../src/utilities/email.ts"],"names":[],"mappings":";;AAQA,8BAqCC;AA7CD,yCAAuD;AACvD,2CAA6C;AAOtC,KAAK,UAAU,SAAS,CAAC,GAAyC,EAAE,IAS1E;IACG,MAAM,MAAM,GAAG,sBAAa,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;IAC/C,IAAI,CAAC;QACD,MAAM,UAAU,GAAG,GAAG,CAAC,KAAK,CAAC;QAC7B,MAAM,cAAc,GAAG,GAAG,CAAC,QAAQ,CAAC;QACpC,MAAM,aAAa,GAAG,IAAA,4BAAe,EAAC;YAClC,IAAI,EAAE,oBAAoB;YAC1B,IAAI,EAAE,GAAG;YACT,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,cAAc,EAAE;YAChD,GAAG,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE;SAC5B,CAAC,CAAC;QAEH,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC,QAAQ,CAAC;YACxC,IAAI,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE;YAClD,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,GAAG,EAAE,IAAI,CAAC,GAAG;YACb,OAAO,EAAE,UAAU;YACnB,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,IAAI,EAAE,IAAI,CAAC,QAAQ;YACnB,IAAI,EAAE,IAAI,CAAC,QAAQ;SACtB,CAAC,CAAC;QACH,OAAO,MAAM,CAAC,QAAQ,CAAC;IAC3B,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACX,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAClB,OAAO,IAAA,iBAAQ,EAAC,GAAG,EAAE,iCAAiC,CAAC,CAAC;IAC5D,CAAC;AACL,CAAC"}
|
package/dist/utilities/xml.js
CHANGED
|
@@ -5,12 +5,21 @@ const xml2js_1 = require("xml2js");
|
|
|
5
5
|
const processors_1 = require("xml2js/lib/processors");
|
|
6
6
|
function parseXml(xml, options) {
|
|
7
7
|
xml = xml.replace(/\r/g, ''); //\r\n will be replaced with " " instead of \n
|
|
8
|
-
return (0, xml2js_1.parseStringPromise)(xml,
|
|
8
|
+
return (0, xml2js_1.parseStringPromise)(xml, {
|
|
9
|
+
normalize: true,
|
|
10
|
+
trim: true,
|
|
11
|
+
explicitRoot: false,
|
|
12
|
+
explicitArray: false,
|
|
13
|
+
xmlns: false,
|
|
14
|
+
tagNameProcessors: [processors_1.stripPrefix],
|
|
9
15
|
//breaking values in text that have :
|
|
10
16
|
//valueProcessors: [stripPrefix],
|
|
11
17
|
attrNameProcessors: [name => {
|
|
12
18
|
let names = name.split(":");
|
|
13
19
|
return names[names.length - 1];
|
|
14
|
-
}],
|
|
20
|
+
}],
|
|
21
|
+
attrValueProcessors: [processors_1.stripPrefix],
|
|
22
|
+
...(options || {})
|
|
23
|
+
});
|
|
15
24
|
}
|
|
16
25
|
//# sourceMappingURL=xml.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"xml.js","sourceRoot":"","sources":["../../src/utilities/xml.ts"],"names":[],"mappings":";;AA8BA,4BAkBC;AAhDD,mCAA4C;AAC5C,sDAAoD;AA6BpD,SAAgB,QAAQ,CAAI,GAAW,EAAE,OAAkB;IACvD,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAA,8CAA8C;IAC3E,OAAO,IAAA,2BAAkB,EAAC,GAAG,
|
|
1
|
+
{"version":3,"file":"xml.js","sourceRoot":"","sources":["../../src/utilities/xml.ts"],"names":[],"mappings":";;AA8BA,4BAkBC;AAhDD,mCAA4C;AAC5C,sDAAoD;AA6BpD,SAAgB,QAAQ,CAAI,GAAW,EAAE,OAAkB;IACvD,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAA,8CAA8C;IAC3E,OAAO,IAAA,2BAAkB,EAAC,GAAG,EAAE;QAC3B,SAAS,EAAE,IAAI;QACf,IAAI,EAAE,IAAI;QACV,YAAY,EAAE,KAAK;QACnB,aAAa,EAAE,KAAK;QACpB,KAAK,EAAE,KAAK;QACZ,iBAAiB,EAAE,CAAC,wBAAW,CAAC;QAChC,qCAAqC;QACrC,iCAAiC;QACjC,kBAAkB,EAAE,CAAC,IAAI,CAAC,EAAE;gBACxB,IAAI,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gBAC5B,OAAO,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;YACnC,CAAC,CAAC;QACF,mBAAmB,EAAE,CAAC,wBAAW,CAAC;QAClC,GAAG,CAAC,OAAO,IAAI,EAAE,CAAC;KACrB,CAAM,CAAC;AACZ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kwiz/node",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.56",
|
|
4
4
|
"description": "KWIZ utilities and helpers for node applications",
|
|
5
5
|
"module": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"./package.json": "./package.json"
|
|
14
14
|
},
|
|
15
15
|
"scripts": {
|
|
16
|
-
"watch": "tsc-watch --onSuccess \"yalc push\"",
|
|
16
|
+
"watch": "tsc-watch --onSuccess \"yalc push --sig\"",
|
|
17
17
|
"build": "npm run prestart && npm run reindex-project && npm run test && tsc",
|
|
18
18
|
"build-explain": "tsc --explainFiles",
|
|
19
19
|
"check-dependencies": "npx dpdm --no-tree --no-warning ./src/index.ts",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
},
|
|
63
63
|
"packageManager": "npm@9.5.1",
|
|
64
64
|
"devDependencies": {
|
|
65
|
-
"@types/node": "^
|
|
65
|
+
"@types/node": "^22.19.15",
|
|
66
66
|
"@types/nodemailer": "^7.0.9",
|
|
67
67
|
"@types/xml2js": "^0.4.14",
|
|
68
68
|
"check-node-version": "^4.2.1",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"@azure/msal-node": "^2.6.4",
|
|
79
79
|
"@azure/storage-blob": "^12.31.0",
|
|
80
80
|
"@jsforce/jsforce-node": "^3.10.14",
|
|
81
|
-
"@kwiz/common": "^1.0.
|
|
81
|
+
"@kwiz/common": "^1.0.226",
|
|
82
82
|
"axios": "^1.6.7",
|
|
83
83
|
"esbuild": "^0.19.12",
|
|
84
84
|
"get-tsconfig": "^4.7.2",
|