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

retes

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

retes - npm Package Compare versions

Comparing version 0.14.0 to 0.15.0

3

dist/index.d.ts

@@ -32,5 +32,6 @@ /// <reference types="node" />

append: (request: Request) => () => void;
custom: (request: http.IncomingMessage, response: http.ServerResponse, next: Function) => void;
constructor(routes: Routes, middlewares?: Middleware[], handleError?: ({ response }: {
response: any;
}) => (error: any) => void, append?: (context: any) => () => void);
}) => (error: any) => void, append?: (context: any) => () => void, custom?: (request: any, response: any, next: any) => void);
use(middleware: Middleware): this;

@@ -37,0 +38,0 @@ add(method: HTTPMethod, path: string, ...fns: [...Middleware[], Handler]): this;

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

response.statusCode = 500;
}, append = context => () => { }) {
}, append = context => () => { }, custom = (request, response, next) => { next(); }) {
this.middlewares = middlewares;

@@ -89,2 +89,3 @@ this.router = new router_1.Router();

this.append = append;
this.custom = custom;
// TODO move it to `start` once it's abstracted

@@ -138,6 +139,7 @@ for (const [path, params] of this.routes) {

const pipeline = compose(...this.middlewares)((_) => response_1.NotFound());
pipeline(context)
const prepend = next => this.custom(request, response, next);
prepend(() => pipeline(context)
.then(core_1.handle(context))
.then(this.append(context))
.catch(this.handleError(context));
.catch(this.handleError(context)));
})

@@ -144,0 +146,0 @@ .on('error', error => {

{
"name": "retes",
"version": "0.14.0",
"version": "0.15.0",
"description": "Typed, Declarative, Data-Driven Routing for Node.js",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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