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

@netlify/functions

Package Overview
Dependencies
Maintainers
18
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 1.6.0 to 2.4.0

dist/function/handler_context.d.ts

22

dist/function/handler.d.ts

@@ -1,17 +0,17 @@

import type { Context } from './context.js';
import type { Event } from './event.js';
import type { Response, BuilderResponse, StreamingResponse } from './response.js';
export interface HandlerCallback<ResponseType extends Response = Response> {
import type { HandlerContext } from './handler_context.js';
import type { HandlerEvent } from './handler_event.js';
import type { HandlerResponse, BuilderResponse, StreamingResponse } from './handler_response.js';
export interface HandlerCallback<ResponseType extends HandlerResponse = HandlerResponse> {
(error: any, response: ResponseType): void;
}
export interface BaseHandler<ResponseType extends Response = Response, C extends Context = Context> {
(event: Event, context: C, callback?: HandlerCallback<ResponseType>): void | Promise<ResponseType>;
export interface BaseHandler<ResponseType extends HandlerResponse = HandlerResponse, C extends HandlerContext = HandlerContext> {
(event: HandlerEvent, context: C, callback?: HandlerCallback<ResponseType>): void | Promise<ResponseType>;
}
export interface BackgroundHandler<C extends Context = Context> {
(event: Event, context: C): void | Promise<void>;
export interface BackgroundHandler<C extends HandlerContext = HandlerContext> {
(event: HandlerEvent, context: C): void | Promise<void>;
}
export type Handler = BaseHandler<Response, Context>;
export type BuilderHandler = BaseHandler<BuilderResponse, Context>;
export type Handler = BaseHandler<HandlerResponse, HandlerContext>;
export type BuilderHandler = BaseHandler<BuilderResponse, HandlerContext>;
export interface StreamingHandler {
(event: Event, context: Context): Promise<StreamingResponse>;
(event: HandlerEvent, context: HandlerContext): Promise<StreamingResponse>;
}

@@ -1,4 +0,5 @@

export { Context as HandlerContext } from './context.js';
export { Event as HandlerEvent } from './event.js';
export { HandlerContext } from './handler_context.js';
export { HandlerEvent } from './handler_event.js';
export { BuilderHandler, Handler, BackgroundHandler, HandlerCallback, StreamingHandler } from './handler.js';
export { BuilderResponse, Response as HandlerResponse, StreamingResponse } from './response.js';
export { BuilderResponse, HandlerResponse, StreamingResponse } from './handler_response.js';
export { Context, Config } from './v2.js';
export { builder } from './lib/builder.js';
export { purgeCache } from './lib/purge_cache.js';
export { schedule } from './lib/schedule.js';
export { stream } from './lib/stream.js';
export * from './function/index.js';

@@ -17,5 +17,7 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.stream = exports.schedule = exports.builder = void 0;
exports.stream = exports.schedule = exports.purgeCache = exports.builder = void 0;
var builder_js_1 = require("./lib/builder.js");
Object.defineProperty(exports, "builder", { enumerable: true, get: function () { return builder_js_1.builder; } });
var purge_cache_js_1 = require("./lib/purge_cache.js");
Object.defineProperty(exports, "purgeCache", { enumerable: true, get: function () { return purge_cache_js_1.purgeCache; } });
var schedule_js_1 = require("./lib/schedule.js");

@@ -22,0 +24,0 @@ Object.defineProperty(exports, "schedule", { enumerable: true, get: function () { return schedule_js_1.schedule; } });

@@ -5,7 +5,8 @@ {

"types": "./dist/main.d.ts",
"version": "1.6.0",
"version": "2.4.0",
"description": "JavaScript utilities for Netlify Functions",
"files": [
"dist/**/*.js",
"dist/**/*.d.ts"
"dist/**/*.d.ts",
"types/**/*.d.ts"
],

@@ -56,2 +57,3 @@ "scripts": {

"dependencies": {
"@netlify/serverless-functions-api": "1.11.0",
"is-promise": "^4.0.0"

@@ -67,3 +69,4 @@ },

"nyc": "^15.0.0",
"tsd": "^0.28.0",
"semver": "^7.5.4",
"tsd": "^0.29.0",
"typescript": "^4.4.4"

@@ -70,0 +73,0 @@ },

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