Comparing version 0.2.1 to 0.2.2
@@ -10,3 +10,2 @@ var HTTP_STATUS_CODES = require('http').STATUS_CODES; | ||
var stackTrace = require('stack-trace'); | ||
var traverse = require('traverse'); | ||
var hashish = require('hashish'); | ||
@@ -36,6 +35,2 @@ var querystring = require('querystring'); | ||
Airbrake.createClient = function(key, env) { | ||
if (!key || typeof key !== 'string' || key.length !== 32) { | ||
throw new Error('You must supply a valid Airbreak API key.'); | ||
} | ||
var instance = new this(); | ||
@@ -93,4 +88,10 @@ instance.key = key; | ||
var status = HTTP_STATUS_CODES[res.statusCode]; | ||
var explanation = body.match(/<error>([^<]+)/i); | ||
explanation = (explanation) | ||
? ': ' + explanation[1] | ||
: ''; | ||
return callback(new Error( | ||
'Notification failed: ' + res.statusCode + ' ' + status | ||
'Notification failed: ' + res.statusCode + ' ' + status + explanation | ||
)); | ||
@@ -145,3 +146,3 @@ } | ||
.ele('api-key') | ||
.txt(this.key) | ||
.txt(this.key || '-') | ||
.up() | ||
@@ -213,18 +214,7 @@ .ele('notifier') | ||
Object.keys(vars).forEach(function(key) { | ||
// JSON.stringify throws on circular structures, lets remove those | ||
var val = traverse(vars[key]).map(function(node) { | ||
if (this.circular) { | ||
this.update('[Circular]'); | ||
} | ||
}); | ||
val = JSON.stringify(val); | ||
node = node || request.ele(type); | ||
node | ||
.ele('var') | ||
.att('key', key) | ||
.txt(val); | ||
.txt(util.inspect(vars[key])); | ||
}); | ||
@@ -231,0 +221,0 @@ }; |
@@ -5,3 +5,3 @@ { | ||
"description": "Node.js client for airbrakeapp.com, formerly known as hoptoadapp.com.", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"homepage": "https://github.com/felixge/node-airbrake", | ||
@@ -20,3 +20,2 @@ "repository": { | ||
"stack-trace": "0.0.5", | ||
"traverse": "0.4.4", | ||
"hashish": "0.0.4" | ||
@@ -23,0 +22,0 @@ }, |
@@ -162,7 +162,7 @@ # airbrake | ||
### airbrake.url = 'http://' + os.hostname() | ||
### airbrake.host = 'http://' + os.hostname() | ||
The base url for errors. If `err.url` is not set, `airbrake.url` is used | ||
The base url for errors. If `err.url` is not set, `airbrake.host` is used | ||
instead. If `err.url` is a relative url starting with `'/'`, it is appended | ||
to `airbrake.url`. If `err.url` is an absolute url, `airbrake.url` is ignored. | ||
to `airbrake.host`. If `err.url` is an absolute url, `airbrake.host` is ignored. | ||
@@ -169,0 +169,0 @@ ### airbrake.projectRoot = null |
var common = require('../common'); | ||
var airbrake = require(common.dir.root).createClient() | ||
var airbrake = require(common.dir.root).createClient(); | ||
var assert = require('assert'); | ||
@@ -4,0 +4,0 @@ var sinon = require('sinon'); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 3 instances 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
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
4
39
1056958
15
16
+ Addedarray-buffer-byte-length@1.0.1(transitive)
+ Addedarraybuffer.prototype.slice@1.0.3(transitive)
+ Addedavailable-typed-arrays@1.0.7(transitive)
+ Addedcall-bind@1.0.7(transitive)
+ Addeddata-view-buffer@1.0.1(transitive)
+ Addeddata-view-byte-length@1.0.1(transitive)
+ Addeddata-view-byte-offset@1.0.0(transitive)
+ Addeddefine-data-property@1.1.4(transitive)
+ Addeddefine-properties@1.2.1(transitive)
+ Addedes-abstract@1.23.5(transitive)
+ Addedes-define-property@1.0.0(transitive)
+ Addedes-errors@1.3.0(transitive)
+ Addedes-object-atoms@1.0.0(transitive)
+ Addedes-set-tostringtag@2.0.3(transitive)
+ Addedes-to-primitive@1.3.0(transitive)
+ Addedfor-each@0.3.3(transitive)
+ Addedfunction-bind@1.1.2(transitive)
+ Addedfunction.prototype.name@1.1.6(transitive)
+ Addedfunctions-have-names@1.2.3(transitive)
+ Addedget-intrinsic@1.2.4(transitive)
+ Addedget-symbol-description@1.0.2(transitive)
+ Addedglobalthis@1.0.4(transitive)
+ Addedgopd@1.0.1(transitive)
+ Addedhas-bigints@1.0.2(transitive)
+ Addedhas-property-descriptors@1.0.2(transitive)
+ Addedhas-proto@1.0.3(transitive)
+ Addedhas-symbols@1.0.3(transitive)
+ Addedhas-tostringtag@1.0.2(transitive)
+ Addedhasown@2.0.2(transitive)
+ Addedinternal-slot@1.0.7(transitive)
+ Addedis-array-buffer@3.0.4(transitive)
+ Addedis-async-function@2.0.0(transitive)
+ Addedis-bigint@1.0.4(transitive)
+ Addedis-boolean-object@1.1.2(transitive)
+ Addedis-callable@1.2.7(transitive)
+ Addedis-data-view@1.0.1(transitive)
+ Addedis-date-object@1.0.5(transitive)
+ Addedis-finalizationregistry@1.1.0(transitive)
+ Addedis-generator-function@1.0.10(transitive)
+ Addedis-map@2.0.3(transitive)
+ Addedis-negative-zero@2.0.3(transitive)
+ Addedis-number-object@1.0.7(transitive)
+ Addedis-regex@1.1.4(transitive)
+ Addedis-set@2.0.3(transitive)
+ Addedis-shared-array-buffer@1.0.3(transitive)
+ Addedis-string@1.0.7(transitive)
+ Addedis-symbol@1.0.4(transitive)
+ Addedis-typed-array@1.1.13(transitive)
+ Addedis-weakmap@2.0.2(transitive)
+ Addedis-weakref@1.0.2(transitive)
+ Addedis-weakset@2.0.3(transitive)
+ Addedisarray@2.0.5(transitive)
+ Addedobject-inspect@1.13.3(transitive)
+ Addedobject-keys@1.1.1(transitive)
+ Addedobject.assign@4.1.5(transitive)
+ Addedpossible-typed-array-names@1.0.0(transitive)
+ Addedreflect.getprototypeof@1.0.7(transitive)
+ Addedregexp.prototype.flags@1.5.3(transitive)
+ Addedsafe-array-concat@1.1.2(transitive)
+ Addedsafe-regex-test@1.0.3(transitive)
+ Addedset-function-length@1.2.2(transitive)
+ Addedset-function-name@2.0.2(transitive)
+ Addedside-channel@1.0.6(transitive)
+ Addedstring.prototype.trim@1.2.9(transitive)
+ Addedstring.prototype.trimend@1.0.8(transitive)
+ Addedstring.prototype.trimstart@1.0.8(transitive)
+ Addedtraverse@0.6.10(transitive)
+ Addedtyped-array-buffer@1.0.2(transitive)
+ Addedtyped-array-byte-length@1.0.1(transitive)
+ Addedtyped-array-byte-offset@1.0.3(transitive)
+ Addedtyped-array-length@1.0.7(transitive)
+ Addedtypedarray.prototype.slice@1.0.3(transitive)
+ Addedunbox-primitive@1.0.2(transitive)
+ Addedwhich-boxed-primitive@1.0.2(transitive)
+ Addedwhich-builtin-type@1.2.0(transitive)
+ Addedwhich-collection@1.0.2(transitive)
+ Addedwhich-typed-array@1.1.16(transitive)
- Removedtraverse@0.4.4
- Removedtraverse@0.4.4(transitive)