Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

planet

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

planet - npm Package Compare versions

Comparing version
0.14.2
to
0.14.3
+3
-3
package.json
{
"name": "planet"
, "version": "0.14.2"
, "version": "0.14.3"
, "author": "Enrique Erne (http://mild.ch/)"

@@ -25,7 +25,7 @@ , "description": "collaboratively edit anything"

, "dependencies": {
"socket.io": ">= 0.9.13"
"socket.io": "= 0.9.13"
, "optparse": ">= 1.0.3"
}
, "devDependencies": {
"socket.io-client": ">= 0.9.11"
"socket.io-client": "= 0.9.11"
, "benchmark": ">= 1.0.0"

@@ -32,0 +32,0 @@ }

@@ -15,7 +15,7 @@ var Emitter = require('events').EventEmitter,

this.server = io.server
this.server = (io.server || io.manager.server)
.on('listening', listen.bind(this))
.on('clientError', error.bind(this));
this.sockets = io.sockets
this.sockets = (!!io.manager ? io.manager.sockets : io.sockets)
.on('connection', connect.bind(this));

@@ -29,9 +29,2 @@

/*
Planet.prototype.send = function(t, h, i, s){
this.sockets.emit(t, h, i, s);
//this.sockets.emit.apply(this.sockets, arguments);
return this;
};*/
Planet.prototype.destroy = function(){

@@ -38,0 +31,0 @@ this.server.removeAllListeners();

@@ -18,3 +18,3 @@ var Testigo = require('./testigo/Source/testigo').Testigo,

new planet(socket, {});
new planet(socket);
server.listen(8004, 'localhost');

@@ -21,0 +21,0 @@ },

@@ -145,2 +145,3 @@ var planet = require('../../planet'),

it('should start planet from cli', function(expect){

@@ -165,4 +166,49 @@

it('should start 2 namespaced planets', function(expect){
var socket = io.listen(8106, {
'log level': 1
});
var foo = planet(socket.of('/foo'))
.on('listening', function(location, port){
expect(port).toBe(8106);
require('socket.io-client')
.connect('//:8106/foo')
.on('connect', function(){
this.disconnect();
});
})
//.on('disconnect', function(socket){
//expect(socket).toBeType('object');
//this.destroy();
//})
.on('connection', function(socket){
expect(socket).toBeType('object');
});
var bar = planet(socket.of('/bar'))
.on('listening', function(location, port){
expect(port).toBe(8106);
require('socket.io-client')
.connect('//:8106/bar')
.on('connect', function(){
this.disconnect();
});
})
//.on('disconnect', function(socket){
//expect(socket).toBeType('object');
//this.destroy();
//})
.on('connection', function(socket){
expect(socket).toBeType('object');
});
});
});
};