🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

bridge

Package Overview
Dependencies
Maintainers
1
Versions
99
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bridge - npm Package Compare versions

Comparing version

to
2.0.13

1

dist/package/bridge.js

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

}
// @ts-nocheck
const initBridge = ({ routes, url, errorHandler, formidable, }) => new Bridge(routes, { formidable, errorHandler }, url || '');
exports.initBridge = initBridge;
//# sourceMappingURL=bridge.js.map

4

dist/package/core/handlers/methodValidator.d.ts
import { Method } from '../../routes';
import { AbstractHandler, Handler } from '../handler';
export declare class MethodValidator extends AbstractHandler {
private method;
constructor(method?: Method);
private method?;
constructor(method?: Method | undefined);
handle: Handler['handle'];
}
//# sourceMappingURL=methodValidator.d.ts.map

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

method;
constructor(method = 'POST') {
constructor(method) {
super();

@@ -14,5 +14,5 @@ this.method = method;

handle = async (data) => {
if (data.method === this.method)
if (!this.method || data.method === this.method)
return super.handle(data);
return (0, error_1.httpError)(error_1.StatusCode.NOT_FOUND, 'Wrong method', { method: this.method });
return (0, error_1.httpError)(error_1.StatusCode.METHOD_NOT_ALLOWED, 'Wrong method', { method: this.method });
};

@@ -19,0 +19,0 @@ }

{
"name": "bridge",
"version": "2.0.12",
"version": "2.0.13",
"description": "Bridge is a new way of developing your api's",

@@ -5,0 +5,0 @@ "author": "El Ouahabi Nabil",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet