configurapi-runner-lambda-api 1.2.1 → 2.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/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "configurapi-runner-lambda-api",
3
- "version": "1.2.1",
3
+ "version": "2.0.0",
4
4
  "description": "A lambda runner for configurapi.",
5
5
  "bin": {
6
- "configurapi-runner-lambda-api": "src/index.js"
6
+ "configurapi-runner-lambda-api": "src/index.mjs"
7
7
  },
8
- "main": "src/index.js",
8
+ "main": "src/index.mjs",
9
9
  "files": [
10
10
  "src/*"
11
11
  ],
@@ -21,7 +21,7 @@
21
21
  "dependencies": {
22
22
  "aws-sdk": "^2.619.0",
23
23
  "commander": "^2.19.0",
24
- "configurapi": "^1.4.4",
24
+ "configurapi": "^1.8.0",
25
25
  "configurapi-handler-http": "^1.3.0",
26
26
  "configurapi-handler-logging": "^1.3.4",
27
27
  "http-status": "^1.4.2",
@@ -33,5 +33,8 @@
33
33
  "@types/mocha": "^7.0.1",
34
34
  "chai": "^4.2.0",
35
35
  "mocha": "^7.0.1"
36
+ },
37
+ "engines": {
38
+ "node": ">=14"
36
39
  }
37
40
  }
@@ -1,6 +1,6 @@
1
- const Configurapi = require('configurapi');
2
- const oneliner = require('one-liner');
3
- const Adapter = require('./LambdaApiAdapter');
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
- exports.handler = async (awsEvent, context, callback) =>
32
+ export const handler = async (awsEvent, context, callback) =>
32
33
  {
33
34
  try
34
35
  {