Comparing version 0.7.2 to 0.7.3
30
index.js
@@ -45,6 +45,12 @@ var net = require('net'); | ||
stream.on('connect', function() { | ||
attachDnode(); | ||
attachDnode(); | ||
}); | ||
} | ||
} | ||
else if (params.path) { | ||
stream = net.createConnection(params.path); | ||
stream.on('connect', function() { | ||
attachDnode(); | ||
}); | ||
} | ||
else { | ||
@@ -153,4 +159,14 @@ attachDnode(); | ||
} | ||
else if (server && server instanceof http.Server | ||
|| 'httpAllowHalfOpen' in server || params.webserver) { | ||
else if (params.path) { | ||
server = net.createServer(); | ||
server.listen( | ||
params.path, | ||
this.emit.bind(this, 'ready') | ||
); | ||
} | ||
else if (server && ( | ||
server instanceof http.Server | ||
|| server.hasOwnProperty('httpAllowHalfOpen') | ||
|| params.webserver | ||
)) { | ||
// a webserver, use socket.io | ||
@@ -170,5 +186,7 @@ if (!SocketIO) SocketIO = require('./lib/stream_socketio'); | ||
var clients = {}; | ||
var listenFor = server instanceof tls.Server | ||
? 'secureConnection' | ||
: 'connection' ; | ||
var listenFor = server instanceof tls.Server | ||
? 'secureConnection' | ||
: 'connection' | ||
; | ||
server.on(listenFor, (function (stream) { | ||
@@ -175,0 +193,0 @@ var client = createClient(this.proto, stream); |
{ | ||
"name" : "dnode", | ||
"version" : "0.7.2", | ||
"version" : "0.7.3", | ||
"description" : "freestyle RPC", | ||
@@ -26,6 +26,6 @@ "main" : "./index.js", | ||
"socket.io" : ">=0.6.1 <0.7", | ||
"lazy" : ">=1.0.2 <1.1", | ||
"lazy" : ">=1.0.5 <1.1", | ||
"traverse" : ">=0.3.1 <0.4", | ||
"browserify" : ">=0.5.2 <0.6", | ||
"dnode-protocol" : ">=0.0.9 <0.1" | ||
"browserify" : ">=1.1.3 <1.2", | ||
"dnode-protocol" : ">=0.0.10 <0.1" | ||
}, | ||
@@ -35,9 +35,3 @@ "devDependencies" : { | ||
}, | ||
"browserify" : { | ||
"name" : "dnode", | ||
"main" : "./browser/index.js", | ||
"base" : "./browser", | ||
"require" : [ "dnode-protocol" ], | ||
"dependencies" : {} | ||
}, | ||
"browserify" : "browser/index.js", | ||
"engine" : { | ||
@@ -44,0 +38,0 @@ "node" : ">=0.4.0" |
@@ -1,2 +0,2 @@ | ||
var dnode = require('dnode'); | ||
var dnode = require('../'); | ||
var assert = require('assert'); | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
var dnode = require('dnode'); | ||
var dnode = require('../'); | ||
var assert = require('assert'); | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
var dnode = require('dnode'); | ||
var dnode = require('../'); | ||
var EventEmitter = require('events').EventEmitter; | ||
@@ -3,0 +3,0 @@ var util = require('util'); |
var assert = require('assert'); | ||
var dnode = require('dnode'); | ||
var dnode = require('../'); | ||
var http = require('http'); | ||
@@ -4,0 +4,0 @@ var express = require('express'); |
@@ -1,2 +0,2 @@ | ||
var dnode = require('dnode'); | ||
var dnode = require('../'); | ||
var util = require('util'); | ||
@@ -3,0 +3,0 @@ var assert = require('assert'); |
@@ -1,2 +0,2 @@ | ||
var dnode = require('dnode'); | ||
var dnode = require('../'); | ||
var assert = require('assert'); | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
var dnode = require('dnode'); | ||
var dnode = require('../'); | ||
var EventEmitter = require('events').EventEmitter; | ||
@@ -3,0 +3,0 @@ var assert = require('assert'); |
@@ -1,2 +0,2 @@ | ||
var dnode = require('dnode'); | ||
var dnode = require('../'); | ||
var sys = require('sys'); | ||
@@ -71,1 +71,18 @@ var assert = require('assert'); | ||
}; | ||
exports.refused = function () { | ||
var port = Math.floor(Math.random() * 40000 + 10000); | ||
var client = dnode.connect(port, function (remote, conn) { | ||
assert.fail('should have been refused, very unlikely'); | ||
}); | ||
var to = setTimeout(function () { | ||
assert.fail('never caught error'); | ||
}, 5000); | ||
client.on('error', function (err) { | ||
clearTimeout(to); | ||
assert.equal(err.code, 'ECONNREFUSED'); | ||
assert.equal(err.syscall, 'connect'); | ||
}); | ||
} |
@@ -1,2 +0,2 @@ | ||
var dnode = require('dnode'); | ||
var dnode = require('../'); | ||
var assert = require('assert'); | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
var dnode = require('dnode'); | ||
var dnode = require('../'); | ||
var assert = require('assert'); | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
var dnode = require('dnode'); | ||
var dnode = require('../'); | ||
var assert = require('assert'); | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
var dnode = require('dnode'); | ||
var dnode = require('../'); | ||
var assert = require('assert'); | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
var dnode = require('dnode'); | ||
var dnode = require('../'); | ||
var assert = require('assert'); | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
var dnode = require('dnode'); | ||
var dnode = require('../'); | ||
var assert = require('assert'); | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
var dnode = require('dnode') | ||
var dnode = require('../') | ||
var assert = require('assert'); | ||
@@ -3,0 +3,0 @@ var util = require('util'); |
@@ -1,2 +0,2 @@ | ||
var dnode = require('dnode'); | ||
var dnode = require('../'); | ||
var assert = require('assert'); | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
var dnode = require('dnode') | ||
var dnode = require('../') | ||
var util = require('util'); | ||
@@ -3,0 +3,0 @@ var assert = require('assert'); |
var assert = require('assert'); | ||
var dnode = require('dnode'); | ||
var dnode = require('../'); | ||
var net = require('net'); | ||
@@ -4,0 +4,0 @@ |
@@ -10,3 +10,3 @@ // (A) dnode.listen(tls.createServer(options),cb) | ||
var assert = require('assert'); | ||
var dnode = require('dnode'); | ||
var dnode = require('../'); | ||
var tls = require('tls'); | ||
@@ -13,0 +13,0 @@ var fs = require('fs'); |
@@ -1,2 +0,2 @@ | ||
var dnode = require('dnode'); | ||
var dnode = require('../'); | ||
var assert = require('assert'); | ||
@@ -3,0 +3,0 @@ |
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
Uses eval
Supply chain riskPackage uses eval() which is a dangerous function. This prevents the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 2 instances in 1 package
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
63
310
5
8
138398
3350
+ Addedbrowserify@1.1.4(transitive)
+ Addedburrito@0.2.12(transitive)
+ Addeddetective@0.0.4(transitive)
+ Addedresolve@0.0.4(transitive)
+ Addedtraverse@0.5.2(transitive)
+ Addeduglify-js@1.1.1(transitive)
- Removedbrowserify@0.5.2(transitive)
- Removedchainsaw@0.1.0(transitive)
- Removedes5-shim@1.0.0(transitive)
- Removedfindit@0.0.5(transitive)
- Removedhashish@0.0.4(transitive)
- Removedseq@0.2.5(transitive)
- Removedsource@0.0.3(transitive)
Updatedbrowserify@>=1.1.3 <1.2
Updateddnode-protocol@>=0.0.10 <0.1
Updatedlazy@>=1.0.5 <1.1