Comparing version 4.2.0 to 4.3.0
@@ -141,2 +141,3 @@ import { Server as HttpServer, IncomingMessage, ServerResponse } from 'http' | ||
interface Service<P extends Protocol> extends Router<P> { | ||
routes(): string[], | ||
getRouter(): Router<P>, | ||
@@ -143,0 +144,0 @@ newRouter(): Router<P> |
@@ -20,2 +20,4 @@ 'use strict' | ||
}) | ||
const routes = new Set() | ||
const router = requestRouter(options) | ||
@@ -35,2 +37,6 @@ const server = options.server || require('http').createServer() | ||
const app = { | ||
routes () { | ||
return [...routes] | ||
}, | ||
getRouter () { | ||
@@ -86,2 +92,3 @@ return router | ||
app[method] = (...args) => { | ||
routes.add(`${method.toUpperCase()}${args[0]}`) | ||
router[method].apply(router, args) | ||
@@ -88,0 +95,0 @@ |
{ | ||
"name": "restana", | ||
"version": "4.2.0", | ||
"version": "4.3.0", | ||
"description": "Super fast and minimalist web framework for building REST micro-services.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22033
323