@hybridless/hybridless 0.0.84-alpha12 → 0.0.84-alpha14

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@hybridless/hybridless",
3
- "version": "0.0.84-alpha12",
3
+ "version": "0.0.84-alpha14",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -10,4 +10,4 @@ WORKDIR /usr/src/app
10
10
  RUN cd /usr/src/hybridless-runtime/ && npm i -S @hybridless/runtime-nodejs-httpd@latest
11
11
 
12
12
  # Run the specified command within the container.
13
- ENTRYPOINT node -e ../hybridless-runtime/proxy.js
13
+ ENTRYPOINT node ../hybridless-runtime/proxy.js
@@ -5,20 +5,25 @@ process.on('SIGINT', function() {
5
5
  });
6
6
  //Execution scope
7
7
  (async () => {
8
- //Get inputs
9
- let input = {};
10
- try { input = JSON.parse(process.argv[2]); }
11
- catch (e) { console.log('[Hybridless Runtime] - Error while decoding inputEvent parameter!', e); }
8
+ try {
9
+ //Get inputs
10
+ let input = {};
11
+ try { input = JSON.parse(process.argv[2]); }
12
+ catch (e) { console.log('[Hybridless Runtime] - Error while decoding inputEvent parameter!', e); }
12
13
 
13
- //Init lambda event and call it
14
- const LambdaEvent = require("@hybridless/runtime-nodejs-httpd").LambdaEvent;
15
- const functionPath = `${__dirname}/../app/${process.env.ENTRYPOINT}`
16
- const lambda = new LambdaEvent({ payload: input }, functionPath, process.env.ENTRYPOINT_FUNC);
17
- //Callout
18
- const resp = await lambda.invoke();
14
+ //Init lambda event and call it
15
+ const LambdaEvent = require("@hybridless/runtime-nodejs-httpd").LambdaEvent;
16
+ const functionPath = `${__dirname}/../app/${process.env.ENTRYPOINT}`;
17
+ const lambda = new LambdaEvent({ payload: input }, functionPath, process.env.ENTRYPOINT_FUNC);
18
+ //Callout
19
+ const resp = await lambda.invoke();
19
20
 
20
- //Return
21
- console.log(resp);
22
- if (resp.getCode && resp.getCode() == 200) process.exit(0);
23
- else process.exit(1);
21
+ //Return
22
+ console.log(resp);
23
+ if (resp.getCode && resp.getCode() == 200) process.exit(0);
24
+ else process.exit(1);
25
+ } catch (e) {
26
+ console.error(e);
27
+ process.exit(1);
28
+ }
24
29
  })();