Comparing version 0.2.4 to 0.3.0
@@ -6,3 +6,3 @@ var parsers = require('./parsers'), | ||
uuid = require('node-uuid'), | ||
http = {http: require('http'), https: require('https')}, | ||
transports = require('./transports'), | ||
node_util = require('util'), // node_util to avoid confusion with "utils" | ||
@@ -72,29 +72,2 @@ events = require('events'); | ||
_.sendRemote = function sendRemote(message, headers, cb) { | ||
var self = this; | ||
var options = { | ||
host: self.dsn.host, | ||
path: self.dsn.path + '/api/store/', | ||
headers: headers, | ||
method: 'POST', | ||
port: self.dsn.port | ||
}, req = http[self.dsn.protocol].request(options, function(res){ | ||
res.setEncoding('utf8'); | ||
res.on('data', function(data) { | ||
// don't care! | ||
}); | ||
res.on('end', function(){ | ||
if(res.statusCode === 200) { | ||
self.emit('logged'); | ||
} else { | ||
self.emit('error'); | ||
} | ||
}); | ||
}); | ||
req.on('error', function(e){ | ||
self.emit('error'); | ||
}); | ||
req.end(message); | ||
}; | ||
_.send = function send(kwargs) { | ||
@@ -111,4 +84,4 @@ var self = this; | ||
}; | ||
self.sendRemote(message, headers); | ||
transports[self.dsn.protocol].send(self, message, headers); | ||
}); | ||
@@ -115,0 +88,0 @@ }; |
var raven = require('./client'), | ||
crypto = require('crypto'), | ||
fs = require('fs'), | ||
url = require('url'); | ||
url = require('url') | ||
transports = require('./transports'); | ||
@@ -43,2 +44,8 @@ var protocolMap = { | ||
if(~response.protocol.indexOf('+')) | ||
response.protocol = response.protocol.split('+')[1]; | ||
if(!transports.hasOwnProperty(response.protocol)) | ||
throw new Error('Invalid transport'); | ||
var path = parsed.path.substr(1), | ||
@@ -45,0 +52,0 @@ index = path.lastIndexOf('/'); |
@@ -5,3 +5,3 @@ { | ||
"keywords": ["raven", "sentry", "python"], | ||
"version": "0.2.4", | ||
"version": "0.3.0", | ||
"repository": "git://github.com/mattrobenolt/raven-node.git", | ||
@@ -26,4 +26,5 @@ "author": "Matt Robenolt <matt@ydekproductions.com>", | ||
"nock": "*", | ||
"glob": "*" | ||
"glob": "*", | ||
"mock-udp": "*" | ||
} | ||
} |
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
Network access
Supply chain riskThis module accesses the network.
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
16770
9
409
7
3