faas-js-runtime
Advanced tools
Comparing version 0.5.0 to 0.5.1
@@ -5,2 +5,9 @@ # Changelog | ||
### [0.5.1](https://www.github.com/boson-project/faas-js-runtime/compare/v0.5.0...v0.5.1) (2020-11-03) | ||
### Bug Fixes | ||
* reverse the parameter order when invoking ([#71](https://www.github.com/boson-project/faas-js-runtime/issues/71)) ([df55e8a](https://www.github.com/boson-project/faas-js-runtime/commit/df55e8a9fe4e3f97cb1e82f2d6da6f5d82ec936b)) | ||
## [0.5.0](https://www.github.com/boson-project/faas-js-runtime/compare/v0.4.0...v0.5.0) (2020-10-30) | ||
@@ -7,0 +14,0 @@ |
@@ -1,2 +0,2 @@ | ||
const { Receiver } = require('cloudevents'); | ||
const { HTTP } = require('cloudevents'); | ||
const Spec = require('./ce-constants.js').Spec; | ||
@@ -17,4 +17,6 @@ | ||
try { | ||
const event = Receiver.accept(request.headers, request.body); | ||
request.fcontext.cloudevent = event; | ||
request.fcontext.cloudevent = HTTP.toEvent({ | ||
headers: request.headers, | ||
body: request.body | ||
}); | ||
} catch (err) { | ||
@@ -21,0 +23,0 @@ if (err.message.startsWith('invalid spec version')) { |
@@ -22,3 +22,3 @@ 'use strict'; | ||
// as the first parameter | ||
payload.response = await func(context.cloudevent.data, context); | ||
payload.response = await func(context, context.cloudevent.data); | ||
} else { | ||
@@ -25,0 +25,0 @@ // Invoke with context |
{ | ||
"name": "faas-js-runtime", | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"repository": { | ||
@@ -5,0 +5,0 @@ "type": "git", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
30769
322