leo-connector-common 4.0.11-rc → 5.0.0
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/checksum/index.js +14 -13
- package/package.json +6 -5
package/checksum/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
let leo = require("leo-sdk");
|
|
2
|
-
const
|
|
2
|
+
const { Lambda } = require("@aws-sdk/client-lambda");
|
|
3
3
|
const checksum = require("./lib/checksumNibbler.js");
|
|
4
4
|
const leoaws = require('leo-aws');
|
|
5
5
|
let cron = leo.bot;
|
|
@@ -271,17 +271,18 @@ module.exports = {
|
|
|
271
271
|
lastUpdate: moment.now(),
|
|
272
272
|
status: status,
|
|
273
273
|
statusReason: err ? err.toString() : stopReason
|
|
274
|
-
}))
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
274
|
+
}))
|
|
275
|
+
.then(result => {
|
|
276
|
+
async.parallel(tasks, (err, data) => {
|
|
277
|
+
if (err) {
|
|
278
|
+
reject(err);
|
|
279
|
+
} else {
|
|
280
|
+
resolve(session);
|
|
281
|
+
}
|
|
282
|
+
});
|
|
283
|
+
}, err => {
|
|
284
|
+
reject(err);
|
|
281
285
|
});
|
|
282
|
-
}, err => {
|
|
283
|
-
reject(err);
|
|
284
|
-
});
|
|
285
286
|
});
|
|
286
287
|
});
|
|
287
288
|
}, logError);
|
|
@@ -290,7 +291,7 @@ module.exports = {
|
|
|
290
291
|
},
|
|
291
292
|
lambdaConnector: function(id, lambdaName, settings) {
|
|
292
293
|
let region = (lambdaName.match(/arn:aws:lambda:(.*?):/) || [])[1];
|
|
293
|
-
const lambdaInvoker = new
|
|
294
|
+
const lambdaInvoker = new Lambda({
|
|
294
295
|
region: region || this.configuration._meta.region,
|
|
295
296
|
credentials: this.configuration ? this.configuration.credentials : null
|
|
296
297
|
});
|
|
@@ -567,7 +568,7 @@ module.exports = {
|
|
|
567
568
|
let session = null;
|
|
568
569
|
|
|
569
570
|
function invoke(method, func) {
|
|
570
|
-
func = func || ((d) => {});
|
|
571
|
+
func = func || ((d) => { });
|
|
571
572
|
return (data) => {
|
|
572
573
|
return new Promise((resolve, reject) => {
|
|
573
574
|
//logger.log(method, data)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "leo-connector-common",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"description": "Common package for all Leo Platform database connectors",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"directories": {},
|
|
@@ -20,15 +20,16 @@
|
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"chai": "^4.1.2",
|
|
22
22
|
"eslint": "^4.17.0",
|
|
23
|
-
"
|
|
24
|
-
"
|
|
23
|
+
"leo-sdk": "^7.1.0-awsv3",
|
|
24
|
+
"mocha": "^5.0.0"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
|
-
"leo-sdk": ">=
|
|
27
|
+
"leo-sdk": ">=7.1.0-awsv3"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
+
"@aws-sdk/client-lambda": "^3.489.0",
|
|
30
31
|
"async": "2.6.3",
|
|
31
|
-
"leo-aws": "^
|
|
32
|
+
"leo-aws": "^4.0.0-awsv3",
|
|
32
33
|
"leo-logger": "1.0.1",
|
|
33
34
|
"leo-streams": "2.0.0",
|
|
34
35
|
"moment": "2.24.0",
|