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
12
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 8.0.6 to 8.0.7

5

lib/agent.js

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

try {
this._events.beforeServerClosed.fireEvent();
await utils_1.Promises.fromCallback(c => this._server.close(c));
this._events.serverClosed.fireEvent();
this._events.afterServerClosed.fireEvent();
}

@@ -222,3 +223,5 @@ catch (e) {

this._initialize();
await this._events.beforeServerOpen.fireEvent();
await utils_1.Promises.fromCallback(c => this._server.listen(port, c));
await this._events.afterServerOpen.fireEvent();
(cb) && cb(this);

@@ -225,0 +228,0 @@ return this;

11

lib/agent.ts

@@ -312,5 +312,10 @@ import {IOptions} from "./IOptions";

try {
(this._events.beforeServerClosed as Event<void>).fireEvent();
await Promises.fromCallback(c => this._server.close(c));
(this._events.serverClosed as Event<void>).fireEvent();
(this._events.afterServerClosed as Event<void>).fireEvent();
} catch (e) {

@@ -326,4 +331,8 @@ if (e.message !== "Not running" && e.code !== "ERR_SERVER_NOT_RUNNING") {

await (this._events.beforeServerOpen as Event<void>).fireEvent();
await Promises.fromCallback(c => this._server.listen(port, c as any));
await (this._events.afterServerOpen as Event<void>).fireEvent();
(cb) && cb(this);

@@ -330,0 +339,0 @@

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

this.routeAdded = new index_1.Event();
this.serverClosed = new index_1.Event();
this.beforeServerClosed = new index_1.Event();
this.afterServerClosed = new index_1.Event();
this.beforeServerOpen = new index_1.Event();
this.afterServerOpen = new index_1.Event();
}

@@ -11,0 +14,0 @@ }

@@ -6,3 +6,6 @@ import {Event, IEvent} from "@appolo/events/index";

public readonly routeAdded: IEvent<RouteAddedEvent> = new Event();
public readonly serverClosed: IEvent<void> = new Event();
public readonly beforeServerClosed: IEvent<void> = new Event();
public readonly afterServerClosed: IEvent<void> = new Event();
public readonly beforeServerOpen: IEvent<void> = new Event();
public readonly afterServerOpen: IEvent<void> = new Event();
}

@@ -19,3 +19,2 @@ import http = require('http');

params?: { [index: string]: any }
model?: { [index: string]: any }
next?: NextFn

@@ -22,0 +21,0 @@ pathName: string

@@ -30,3 +30,3 @@ {

"main": "./index.js",
"version": "8.0.6",
"version": "8.0.7",
"license": "MIT",

@@ -33,0 +33,0 @@ "repository": {

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

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