New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

funclify

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

funclify - npm Package Compare versions

Comparing version 0.1.0 to 0.1.2

2

package.json
{
"name": "funclify",
"version": "0.1.0",
"version": "0.1.2",
"description": "",

@@ -5,0 +5,0 @@ "main": "src/index.ts",

import { Api } from './index';
import { HandlerEvent, HandlerResponse } from '@netlify/functions';
export class ApiTestHarness {
private api: Api;
constructor(api: Api) {
export interface TestRequest<TBody = unknown> {
method: string;
url: string;
headers: Record<string, string>;
body: TBody;
params?: Record<string, string>;
}
export class ApiTestHarness<TApi extends Api<any>> {
private api: TApi;
constructor(api: TApi) {
this.api = api;
}
async handleRequest(request: Request) {
this.api.baseHandler(
async handleRequest(request: TestRequest): Promise<HandlerResponse> {
return this.api.baseHandler(
{

@@ -16,3 +25,4 @@ httpMethod: request.method,

body: request.body,
} as any,
queryStringParameters: request.params ?? {},
} as HandlerEvent,
{} as any

@@ -19,0 +29,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