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

appolo-agent

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

appolo-agent - npm Package Compare versions

Comparing version 6.0.27 to 6.0.28

17

lib/agent.js

@@ -138,2 +138,11 @@ "use strict";

}
all(path, ...handler) {
this.add(appolo_route_1.Methods.GET, path, handler)
.add(appolo_route_1.Methods.PATCH, path, handler)
.add(appolo_route_1.Methods.POST, path, handler)
.add(appolo_route_1.Methods.PUT, path, handler)
.add(appolo_route_1.Methods.DELETE, path, handler)
.add(appolo_route_1.Methods.HEAD, path, handler);
return this;
}
add(method, path, handlers, route, hooks) {

@@ -170,3 +179,9 @@ handlers = _(handlers).map(handler => _.isArray(handler) ? handler : [handler]).flatten().value();

}
use(...fn) {
use(path, ...fn) {
if (typeof path === "string") {
return this.all(path, ...fn);
}
else {
fn.unshift(path);
}
let result = _.partition(fn, handler => handler.length <= 3);

@@ -173,0 +188,0 @@ if (result[0].length) {

@@ -218,2 +218,13 @@ import {IOptions} from "./IOptions";

public all(path: string, ...handler: MiddlewareHandlerParams[]): this {
this.add(Methods.GET, path, handler)
.add(Methods.PATCH, path, handler)
.add(Methods.POST, path, handler)
.add(Methods.PUT, path, handler)
.add(Methods.DELETE, path, handler)
.add(Methods.HEAD, path, handler)
return this;
}
public add(method: keyof typeof Methods, path: string, handlers: MiddlewareHandlerParams[], route?: any, hooks?: IHooks): this {

@@ -263,4 +274,10 @@

public use(...fn: MiddlewareHandlerParams[]): this {
public use(path: string | MiddlewareHandlerParams, ...fn: MiddlewareHandlerParams[]): this {
if (typeof path === "string") {
return this.all(path, ...fn)
} else {
fn.unshift(path)
}
let result = _.partition(fn, handler => handler.length <= 3);

@@ -267,0 +284,0 @@

6

package.json

@@ -27,3 +27,3 @@ {

"main": "./index.js",
"version": "6.0.27",
"version": "6.0.28",
"license": "MIT",

@@ -72,4 +72,4 @@ "repository": {

"mocha": "^5.2.0",
"nunjucks": "^3.1.4",
"nyc": "^13.3.0",
"nunjucks": "^3.2.0",
"nyc": "^14.1.1",
"sinon": "^7.2.4",

@@ -76,0 +76,0 @@ "sinon-chai": "^3.3.0",

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