Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@netlify/functions

Package Overview
Dependencies
Maintainers
16
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@netlify/functions - npm Package Compare versions

Comparing version 0.8.0 to 0.8.1-beta.0

8

dist/function/handler.d.ts
import type { Context } from './context';
import type { Event } from './event';
import type { Response } from './response';
import type { Response, BuilderResponse } from './response';
export interface HandlerCallback {

@@ -10,1 +10,7 @@ (error: any, response: Response): void;

}
export interface BuilderCallback {
(error: any, response: BuilderResponse): void;
}
export interface BuilderHandler {
(event: Event, context: Context, callback: BuilderCallback): void | BuilderResponse | Promise<BuilderResponse>;
}

@@ -12,1 +12,4 @@ export interface Response {

}
export interface BuilderResponse extends Response {
ttl?: number;
}

4

dist/lib/builder.d.ts

@@ -1,3 +0,3 @@

import { Handler } from '../function/handler';
declare const wrapHandler: (handler: Handler) => Handler;
import { BuilderHandler } from '../function/handler';
declare const wrapHandler: (handler: BuilderHandler) => BuilderHandler;
export { wrapHandler as builder };

@@ -21,6 +21,8 @@ "use strict";

var augmentResponse = function (response) {
var _a;
if (!response || response.statusCode !== consts_1.HTTP_STATUS_OK) {
return response;
}
return __assign(__assign({}, response), { metadata: { version: consts_1.METADATA_VERSION, builder_function: consts_1.BUILDER_FUNCTIONS_FLAG } });
var metadata = { version: consts_1.METADATA_VERSION, builder_function: consts_1.BUILDER_FUNCTIONS_FLAG, ttl: (_a = response.ttl) !== null && _a !== void 0 ? _a : 0 };
return __assign(__assign({}, response), { metadata: metadata });
};

@@ -27,0 +29,0 @@ var wrapHandler = function (handler) {

@@ -5,3 +5,3 @@ {

"types": "./dist/main.d.ts",
"version": "0.8.0",
"version": "0.8.1-beta.0",
"description": "JavaScript utilities for Netlify Functions",

@@ -62,3 +62,3 @@ "files": [

"@commitlint/config-conventional": "^13.0.0",
"@netlify/eslint-config-node": "^3.3.4",
"@netlify/eslint-config-node": "^3.3.5",
"ava": "^2.4.0",

@@ -65,0 +65,0 @@ "husky": "^4.3.8",

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