Socket
Socket
Sign inDemoInstall

faas-js-runtime

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

faas-js-runtime - npm Package Compare versions

Comparing version 0.9.4 to 0.9.5

2

lib/invoker.js

@@ -29,3 +29,3 @@ /**

// to a Message first and respond with the headers/body
if (fnReturn instanceof CloudEvent) {
if (fnReturn instanceof CloudEvent || fnReturn.constructor?.name === 'CloudEvent') {
try {

@@ -32,0 +32,0 @@ const message = HTTP.binary(fnReturn);

@@ -8,8 +8,8 @@ /* eslint-disable no-unused-vars */

*/
export interface CloudEventFunction {
(context: Context, event: CloudEvent): CloudEventFunctionReturn;
export interface CloudEventFunction<I=never, R=unknown> {
(context: Context, event?: CloudEvent<I>): CloudEventFunctionReturn<R>;
}
// CloudEventFunctionReturn is the return type for a CloudEventFunction.
export type CloudEventFunctionReturn = Promise<CloudEvent> | CloudEvent | HTTPFunctionReturn;
export type CloudEventFunctionReturn<T=unknown> = Promise<CloudEvent<T>> | CloudEvent<T> | HTTPFunctionReturn;

@@ -54,3 +54,3 @@ /**

httpVersionMinor: number;
cloudevent: CloudEvent;
cloudevent: CloudEvent<unknown>;
cloudEventResponse(data: string|object): CloudEventResponse;

@@ -57,0 +57,0 @@ }

{
"name": "faas-js-runtime",
"version": "0.9.4",
"version": "0.9.5",
"repository": {

@@ -5,0 +5,0 @@ "type": "git",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc