feat: use pnpm & lock core-js shim
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
"scripts": {
|
||||
"clean": "rimraf dist",
|
||||
"watch": "tsc --watch",
|
||||
"build": "yarn clean && tsc",
|
||||
"build": "pnpm clean && tsc",
|
||||
"test": "echo \"Error: run tests from root\" && exit 1"
|
||||
},
|
||||
"dependencies": {
|
||||
@@ -28,9 +28,6 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@ccms/nashorn": "^0.28.0-beta.3",
|
||||
"@javatypes/tomcat-websocket-api": "^0.0.3",
|
||||
"reflect-metadata": "^0.1.13",
|
||||
"rimraf": "^4.4.1",
|
||||
"typescript": "^4.9.5"
|
||||
"@javatypes/tomcat-websocket-api": "^0.0.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ export class WebSocketManager {
|
||||
constructor() {
|
||||
process.on('exit', () => {
|
||||
for (const client of this.clients.values()) {
|
||||
client.close(0, `client ${client.id} close connect`)
|
||||
client.close(1000, `client ${client.id} close connect due process exit.`)
|
||||
}
|
||||
this.clients.clear()
|
||||
})
|
||||
|
||||
@@ -711,6 +711,7 @@ export class Socket extends Emitter<{}, {}, SocketReservedEvents> {
|
||||
* @api private
|
||||
*/
|
||||
private resetPingTimeout() {
|
||||
// @ts-ignore
|
||||
this.clearTimeoutFn(this.pingTimeoutTimer)
|
||||
this.pingTimeoutTimer = this.setTimeoutFn(() => {
|
||||
this.onClose("ping timeout")
|
||||
@@ -919,6 +920,7 @@ export class Socket extends Emitter<{}, {}, SocketReservedEvents> {
|
||||
) {
|
||||
debug('socket close with reason: "%s"', reason)
|
||||
|
||||
// @ts-ignore
|
||||
// clear timers
|
||||
this.clearTimeoutFn(this.pingTimeoutTimer)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user