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

@netlify/functions

Package Overview
Dependencies
Maintainers
14
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.11.0 to 0.11.1

2

dist/function/handler.d.ts

@@ -8,5 +8,5 @@ import type { Context } from './context';

export interface BaseHandler<ResponseType extends Response = Response, C extends Context = Context> {
(event: Event, context: C, callback: HandlerCallback<ResponseType>): void | ResponseType | Promise<ResponseType>;
(event: Event, context: C, callback?: HandlerCallback<ResponseType>): void | Promise<ResponseType>;
}
export declare type Handler = BaseHandler<Response, Context>;
export declare type BuilderHandler = BaseHandler<BuilderResponse, Context>;

@@ -40,3 +40,3 @@ "use strict";

// eslint-disable-next-line promise/prefer-await-to-callbacks
var wrappedCallback = function (error, response) { return callback(error, augmentResponse(response)); };
var wrappedCallback = function (error, response) { return callback === null || callback === void 0 ? void 0 : callback(error, augmentResponse(response)); };
var execution = handler(modifiedEvent, context, wrappedCallback);

@@ -43,0 +43,0 @@ if ((0, is_promise_1.default)(execution)) {

@@ -37,6 +37,4 @@ import { Event as HandlerEvent } from '../function/event';

};
export declare type HandlerEventWithOneGraph = HandlerEvent & {
_oneGraph: OneGraphPayload;
};
export declare type HandlerEventWithOneGraph = HandlerEvent & OneGraphPayload;
export declare const getSecrets: (event?: HandlerEventWithOneGraph | HandlerEvent | undefined) => Promise<NetlifySecrets>;
export {};

@@ -129,7 +129,7 @@ "use strict";

var eventToken, secretToken, doc, body, result, newSecrets;
var _a, _b;
return __generator(this, function (_c) {
switch (_c.label) {
var _a;
return __generator(this, function (_b) {
switch (_b.label) {
case 0:
eventToken = (_b = (_a = event) === null || _a === void 0 ? void 0 : _a._oneGraph) === null || _b === void 0 ? void 0 : _b.authlifyToken;
eventToken = (_a = event) === null || _a === void 0 ? void 0 : _a.authlifyToken;
secretToken = eventToken || process_1.env.ONEGRAPH_AUTHLIFY_TOKEN;

@@ -143,3 +143,3 @@ if (!secretToken) {

case 1:
result = _c.sent();
result = _b.sent();
newSecrets = formatSecrets(result);

@@ -146,0 +146,0 @@ return [2 /*return*/, newSecrets];

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

"types": "./dist/main.d.ts",
"version": "0.11.0",
"version": "0.11.1",
"description": "JavaScript utilities for Netlify Functions",

@@ -8,0 +8,0 @@ "files": [

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