@kksiuda/http-session
Advanced tools
Comparing version 0.9.25 to 0.9.26
@@ -57,2 +57,3 @@ /// <reference types="node" /> | ||
private serialize; | ||
private makeStatus; | ||
private getParams; | ||
@@ -71,3 +72,3 @@ private changeStatus; | ||
requestSession(timeout?: number): Promise<HttpSessionObject<P>>; | ||
private invalidateSession; | ||
invalidateSession(errorMessage: string): Promise<void>; | ||
private reportLockout; | ||
@@ -74,0 +75,0 @@ private releaseSession; |
@@ -43,2 +43,3 @@ "use strict"; | ||
this.statusChangeListeners.push(listener); | ||
listener(this.makeStatus()); | ||
return () => { | ||
@@ -58,2 +59,12 @@ const index = this.statusChangeListeners.indexOf(listener); | ||
} | ||
makeStatus() { | ||
return { | ||
status: this.status, | ||
uptimeSince: this.uptimeSince, | ||
lastError: this.lastError, | ||
inQueue: this.requestCount, | ||
error: this.error, | ||
isInitialised: this.isInitialised, | ||
}; | ||
} | ||
getParams() { | ||
@@ -71,12 +82,4 @@ return this.params; | ||
this.error = params.error; | ||
this.statusChangeListeners.forEach((listener) => { | ||
listener({ | ||
status: this.status, | ||
uptimeSince: this.uptimeSince, | ||
lastError: this.lastError, | ||
inQueue: this.requestCount, | ||
error: this.error, | ||
isInitialised: this.isInitialised, | ||
}); | ||
}); | ||
const status = this.makeStatus(); | ||
this.statusChangeListeners.forEach((fn) => fn(status)); | ||
} | ||
@@ -83,0 +86,0 @@ async forceStop() { |
{ | ||
"name": "@kksiuda/http-session", | ||
"version": "0.9.25", | ||
"version": "0.9.26", | ||
"description": "Http session and cookies management", | ||
@@ -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
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
112685
1410