Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@pager/hapi-raven

Package Overview
Dependencies
Maintainers
12
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pager/hapi-raven - npm Package Compare versions

Comparing version 5.2.5 to 5.3.0

40

lib/index.js

@@ -8,29 +8,31 @@ 'use strict';

const dsn = options.dsn;
const client = new Raven.Client(dsn, options.client);
Raven.config(options.dsn, options.client);
if (dsn && options.patchGlobal) {
client.patchGlobal((err) => {
/* $lab:coverage:off$ */
console.error(err);
process.exit(1);
/* $lab:coverage:on$ */
});
if (options.patchGlobal) {
Raven.install();
}
server.expose('raven', client);
server.expose('raven', Raven);
server.on('request-error', (request, err) => {
client.captureError(err, {
/* $lab:coverage:off$ */
const baseUrl = request.info.uri ||
request.info.host && `${server.info.protocol}://${request.info.host}` ||
server.info.uri;
/* $lab:coverage:on$ */
Raven.captureException(err, {
request: {
method: request.method,
query_string: request.query,
headers: request.headers,
cookies: request.state,
url: baseUrl + request.path
},
extra: {
timestamp: request.info.received,
id: request.id,
method: request.method,
path: request.path,
query: request.query,
remoteAddress: request.info.remoteAddress,
userAgent: request.raw.req.headers['user-agent']
}
remoteAddress: request.info.remoteAddress
},
tags: options.tags
});

@@ -37,0 +39,0 @@ });

{
"name": "@pager/hapi-raven",
"version": "5.2.5",
"version": "5.3.0",
"description": "A Hapi plugin for sending exceptions to Sentry through Raven",

@@ -18,10 +18,8 @@ "main": "./lib",

"dependencies": {
"raven": "0.x.x"
"raven": "1.x.x"
},
"devDependencies": {
"boom": "4.x.x",
"code": "3.x.x",
"hapi": "15.x.x",
"lab": "11.x.x",
"sinon": "1"
"code": "4.x.x",
"hapi": "16.x.x",
"lab": "11.x.x"
},

@@ -28,0 +26,0 @@ "keywords": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc