@feathersjs/socketio
Advanced tools
Comparing version 4.0.0-pre.1 to 4.0.0-pre.2
@@ -6,2 +6,18 @@ # Change Log | ||
# [4.0.0-pre.2](https://github.com/feathersjs/feathers/compare/v4.0.0-pre.1...v4.0.0-pre.2) (2019-05-15) | ||
### Bug Fixes | ||
* Use `export =` in TypeScript definitions ([#1285](https://github.com/feathersjs/feathers/issues/1285)) ([12d0f4b](https://github.com/feathersjs/feathers/commit/12d0f4b)) | ||
### Features | ||
* Add global disconnect event ([#1355](https://github.com/feathersjs/feathers/issues/1355)) ([85afcca](https://github.com/feathersjs/feathers/commit/85afcca)) | ||
# [4.0.0-pre.1](https://github.com/feathersjs/feathers/compare/v4.0.0-pre.0...v4.0.0-pre.1) (2019-05-08) | ||
@@ -8,0 +24,0 @@ |
@@ -1,19 +0,19 @@ | ||
// Type definitions for @feathersjs/socketio 3.0 | ||
// Project: https://feathersjs.com | ||
// Definitions by: Jan Lohage <https://github.com/j2L4e> | ||
// Definitions: https://github.com/feathersjs-ecosystem/feathers-typescript | ||
// TypeScript Version: 2.3 | ||
import http from 'http'; | ||
import io from 'socket.io'; | ||
/// <reference types="@feathersjs/transport-commons"/> | ||
import Http from 'http'; | ||
import SocketIO from 'socket.io'; | ||
declare const socketio: FeathersSocketIO; | ||
export = socketio; | ||
interface FeathersSocketIO { | ||
(callback?: (io: io.Server) => void): () => void; | ||
(options: number | io.ServerOptions, callback?: (io: io.Server) => void): () => void; | ||
(port: number, options?: io.ServerOptions, callback?: (io: io.Server) => void): () => void; | ||
readonly SOCKET_KEY: unique symbol; | ||
default: FeathersSocketIO; | ||
} | ||
declare module '@feathersjs/feathers' { | ||
interface Application<ServiceTypes = any> { | ||
listen (port: number): Http.Server; | ||
listen (port: number): http.Server; | ||
} | ||
} | ||
export default function feathersSocketIO (callback?: (io: SocketIO.Server) => void): () => void; | ||
export default function feathersSocketIO (options: number | SocketIO.ServerOptions, callback?: (io: SocketIO.Server) => void): () => void; | ||
export default function feathersSocketIO (port: number, options?: SocketIO.ServerOptions, callback?: (io: SocketIO.Server) => void): () => void; |
@@ -68,9 +68,3 @@ const socketio = require('socket.io'); | ||
io.use((socket, next) => { | ||
socket.once('disconnect', () => { | ||
const { channels } = app; | ||
if (channels.length) { | ||
app.channel(app.channels).leave(getParams(socket)); | ||
} | ||
}); | ||
socket.once('disconnect', () => app.emit('disconnect', getParams(socket))); | ||
next(); | ||
@@ -77,0 +71,0 @@ }); |
{ | ||
"name": "@feathersjs/socketio", | ||
"description": "The Feathers Socket.io real-time API provider", | ||
"version": "4.0.0-pre.1", | ||
"version": "4.0.0-pre.2", | ||
"homepage": "https://feathersjs.com", | ||
@@ -39,3 +39,3 @@ "main": "lib/", | ||
"dependencies": { | ||
"@feathersjs/transport-commons": "^4.0.0-pre.1", | ||
"@feathersjs/transport-commons": "^4.0.0-pre.2", | ||
"@types/socket.io": "^2.1.2", | ||
@@ -48,5 +48,5 @@ "debug": "^4.1.1", | ||
"@feathersjs/commons": "^4.0.0-pre.0", | ||
"@feathersjs/express": "^4.0.0-pre.1", | ||
"@feathersjs/feathers": "^4.0.0-pre.1", | ||
"@feathersjs/tests": "^4.0.0-pre.1", | ||
"@feathersjs/express": "^4.0.0-pre.2", | ||
"@feathersjs/feathers": "^4.0.0-pre.2", | ||
"@feathersjs/tests": "^4.0.0-pre.2", | ||
"feathers": "^2.2.4", | ||
@@ -58,3 +58,3 @@ "feathers-memory": "^3.0.2", | ||
}, | ||
"gitHead": "e8ce9116c6a4433b64ffe400585b60a9c31ba644" | ||
"gitHead": "d665b9470435d6db0ecddd1fb152ab4a87266c52" | ||
} |
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
29479
97