faas-js-runtime
Advanced tools
Comparing version 0.9.0 to 0.9.1
@@ -5,2 +5,9 @@ # Changelog | ||
### [0.9.1](https://www.github.com/boson-project/faas-js-runtime/compare/v0.9.0...v0.9.1) (2022-05-27) | ||
### Bug Fixes | ||
* add an explicit scope to function invocation ([#118](https://www.github.com/boson-project/faas-js-runtime/issues/118)) ([1eb75b3](https://www.github.com/boson-project/faas-js-runtime/commit/1eb75b3cec416cf96509a59a7af98d885f7de6c1)) | ||
## [0.9.0](https://www.github.com/boson-project/faas-js-runtime/compare/v0.8.0...v0.9.0) (2022-04-28) | ||
@@ -7,0 +14,0 @@ |
@@ -18,2 +18,3 @@ 'use strict'; | ||
const scope = Object.freeze({}); | ||
try { | ||
@@ -23,7 +24,7 @@ if (context.cloudevent) { | ||
// as the first parameter | ||
payload.response = await func(context, context.cloudevent); | ||
payload.response = await func.bind(scope)(context, context.cloudevent); | ||
} else { | ||
// Invoke with context | ||
// TODO: Should this actually just get the Node.js request object? | ||
payload.response = await func(context); | ||
payload.response = await func.bind(scope)(context); | ||
} | ||
@@ -30,0 +31,0 @@ } catch (err) { |
{ | ||
"name": "faas-js-runtime", | ||
"version": "0.9.0", | ||
"version": "0.9.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
43927
567