@furystack/rest-service
Advanced tools
Comparing version 10.0.3 to 10.0.4
@@ -0,3 +1,3 @@ | ||
import { EventHub } from '@furystack/utils'; | ||
import type { IncomingMessage, Server, ServerResponse } from 'http'; | ||
import { EventEmitter } from 'stream'; | ||
export interface ServerOptions { | ||
@@ -19,3 +19,3 @@ hostName?: string; | ||
} | ||
export declare class ServerManager extends EventEmitter<{ | ||
export declare class ServerManager extends EventHub<{ | ||
onRequestFailed: [unknown, IncomingMessage, ServerResponse<IncomingMessage>]; | ||
@@ -22,0 +22,0 @@ }> implements AsyncDisposable { |
@@ -9,6 +9,6 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
import { Injectable } from '@furystack/inject'; | ||
import { EventHub } from '@furystack/utils'; | ||
import { createServer } from 'http'; | ||
import { Lock } from 'semaphore-async-await'; | ||
import { EventEmitter } from 'stream'; | ||
let ServerManager = class ServerManager extends EventEmitter { | ||
let ServerManager = class ServerManager extends EventHub { | ||
static { ServerManager_1 = this; } | ||
@@ -50,3 +50,3 @@ static DEFAULT_HOST = 'localhost'; | ||
apiMatch.onRequest({ req, res }).catch((error) => { | ||
this.emit('onRequestFailed', error, req, res); | ||
this.emit('onRequestFailed', [error, req, res]); | ||
}); | ||
@@ -53,0 +53,0 @@ } |
{ | ||
"name": "@furystack/rest-service", | ||
"version": "10.0.3", | ||
"version": "10.0.4", | ||
"description": "Repository implementation for FuryStack", | ||
@@ -5,0 +5,0 @@ "type": "module", |
import { Injectable } from '@furystack/inject' | ||
import { EventHub } from '@furystack/utils' | ||
import type { IncomingMessage, Server, ServerResponse } from 'http' | ||
@@ -6,3 +7,2 @@ import { createServer } from 'http' | ||
import { Lock } from 'semaphore-async-await' | ||
import { EventEmitter } from 'stream' | ||
@@ -31,3 +31,3 @@ export interface ServerOptions { | ||
export class ServerManager | ||
extends EventEmitter<{ onRequestFailed: [unknown, IncomingMessage, ServerResponse<IncomingMessage>] }> | ||
extends EventHub<{ onRequestFailed: [unknown, IncomingMessage, ServerResponse<IncomingMessage>] }> | ||
implements AsyncDisposable | ||
@@ -77,3 +77,3 @@ { | ||
apiMatch.onRequest({ req, res }).catch((error) => { | ||
this.emit('onRequestFailed', error, req, res) | ||
this.emit('onRequestFailed', [error, req, res]) | ||
}) | ||
@@ -80,0 +80,0 @@ } else { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
572525