@socket.io/admin-ui
Advanced tools
Comparing version 0.5.0 to 0.5.1
@@ -0,1 +1,11 @@ | ||
## [0.5.1](https://github.com/socketio/socket.io-admin-ui/compare/0.5.0...0.5.1) (2022-10-07) | ||
### Bug Fixes | ||
* **server:** handle late HTTP server binding ([b21b649](https://github.com/socketio/socket.io-admin-ui/commit/b21b649ea246eec87af121ffe676c876b001de05)) | ||
* **server:** properly track events with acknowledgement ([6d58a75](https://github.com/socketio/socket.io-admin-ui/commit/6d58a755b4d692970d3f2066903a4d503f334f0a)) | ||
# [0.5.0](https://github.com/socketio/socket.io-admin-ui/compare/0.4.0...0.5.0) (2022-09-19) | ||
@@ -2,0 +12,0 @@ |
@@ -84,2 +84,3 @@ "use strict"; | ||
const emitStats = () => { | ||
var _a; | ||
debug("emit stats"); | ||
@@ -95,3 +96,3 @@ const namespaces = []; | ||
uptime: process.uptime(), | ||
clientsCount: io.engine.clientsCount, | ||
clientsCount: (_a = io.engine) === null || _a === void 0 ? void 0 : _a.clientsCount, | ||
pollingClientsCount: io._pollingClientsCount, | ||
@@ -286,2 +287,6 @@ aggregatedEvents: io._eventBuffer.getValuesAndClear(), | ||
socket.onAny((...args) => { | ||
const withAck = typeof args[args.length - 1] === "function"; | ||
if (withAck) { | ||
args = args.slice(0, -1); | ||
} | ||
adminNamespace.emit("event_received", nsp.name, socket.id, args, new Date()); | ||
@@ -369,3 +374,3 @@ }); | ||
io._pollingClientsCount = 0; | ||
io.engine.on("connection", (rawSocket) => { | ||
const onConnection = (rawSocket) => { | ||
io._eventBuffer.push("rawConnection"); | ||
@@ -398,3 +403,17 @@ if (rawSocket.transport.name === "polling") { | ||
}); | ||
}); | ||
}; | ||
if (io.engine) { | ||
io.engine.on("connection", onConnection); | ||
} | ||
else { | ||
// io.engine might be undefined if instrument() is called before binding the Socket.IO server to the HTTP server | ||
process.nextTick(() => { | ||
if (io.engine) { | ||
io.engine.on("connection", onConnection); | ||
} | ||
else { | ||
debug("WARN: no engine"); | ||
} | ||
}); | ||
} | ||
}; | ||
@@ -401,0 +420,0 @@ function instrument(io, opts) { |
{ | ||
"name": "@socket.io/admin-ui", | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"description": "Admin UI for Socket.IO", | ||
@@ -14,3 +14,3 @@ "files": [ | ||
"test": "npm run format:check && npm run compile && npm run test:unit", | ||
"test:unit": "nyc mocha --require ts-node/register --timeout 5000 test/index.ts --quit", | ||
"test:unit": "nyc mocha --require ts-node/register --timeout 5000 test/*.ts --quit", | ||
"format:check": "prettier --parser typescript --check 'lib/**/*.ts' 'test/**/*.ts'", | ||
@@ -17,0 +17,0 @@ "format:fix": "prettier --parser typescript --write 'lib/**/*.ts' 'test/**/*.ts'", |
{ | ||
"name": "ui", | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"private": true, | ||
@@ -5,0 +5,0 @@ "scripts": { |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
4785520
4359