configurapi-runner-lambda-api 1.2.1 → 2.0.1
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/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "configurapi-runner-lambda-api",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "A lambda runner for configurapi.",
|
|
5
5
|
"bin": {
|
|
6
|
-
"configurapi-runner-lambda-api": "src/index.
|
|
6
|
+
"configurapi-runner-lambda-api": "src/index.mjs"
|
|
7
7
|
},
|
|
8
|
-
"main": "src/index.
|
|
8
|
+
"main": "src/index.mjs",
|
|
9
9
|
"files": [
|
|
10
10
|
"src/*"
|
|
11
11
|
],
|
|
@@ -19,11 +19,10 @@
|
|
|
19
19
|
"author": "Nithiwat Kampanya",
|
|
20
20
|
"license": "ISC",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"aws-sdk": "^2.619.0",
|
|
23
22
|
"commander": "^2.19.0",
|
|
24
|
-
"configurapi": "^1.
|
|
25
|
-
"configurapi-handler-http": "^1.
|
|
26
|
-
"configurapi-handler-logging": "^1.
|
|
23
|
+
"configurapi": "^1.9.0",
|
|
24
|
+
"configurapi-handler-http": "^1.4.1",
|
|
25
|
+
"configurapi-handler-logging": "^1.4.0",
|
|
27
26
|
"http-status": "^1.4.2",
|
|
28
27
|
"oneliner": "0.0.8",
|
|
29
28
|
"yargs-parser": "^11.1.1"
|
|
@@ -33,5 +32,8 @@
|
|
|
33
32
|
"@types/mocha": "^7.0.1",
|
|
34
33
|
"chai": "^4.2.0",
|
|
35
34
|
"mocha": "^7.0.1"
|
|
35
|
+
},
|
|
36
|
+
"engines": {
|
|
37
|
+
"node": ">=14"
|
|
36
38
|
}
|
|
37
39
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import Configurapi from 'configurapi';
|
|
2
|
+
import oneliner from 'one-liner';
|
|
3
|
+
import Adapter from './LambdaApiAdapter.js';
|
|
4
4
|
|
|
5
5
|
///////////////////////////////////
|
|
6
6
|
// Utility functions
|
|
@@ -20,6 +20,7 @@ function log(prefix, str)
|
|
|
20
20
|
|
|
21
21
|
const config = Configurapi.Config.load('./config.yaml');
|
|
22
22
|
const service = new Configurapi.Service(config);
|
|
23
|
+
await service.init();
|
|
23
24
|
|
|
24
25
|
service.on("trace", (s) => log('Trace', s));
|
|
25
26
|
service.on("debug", (s) => log('Debug', s));
|
|
@@ -28,7 +29,7 @@ service.on("error", (s) => log('Error', s));
|
|
|
28
29
|
///////////////////////////////////
|
|
29
30
|
// Entry point
|
|
30
31
|
///////////////////////////////////
|
|
31
|
-
|
|
32
|
+
export const handler = async (awsEvent, context, callback) =>
|
|
32
33
|
{
|
|
33
34
|
try
|
|
34
35
|
{
|