Socket
Socket
Sign inDemoInstall

@sentry/node

Package Overview
Dependencies
Maintainers
8
Versions
514
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sentry/node - npm Package Compare versions

Comparing version 4.3.4 to 4.4.0

7

dist/backend.d.ts

@@ -8,2 +8,3 @@ import { BaseBackend, Options } from '@sentry/core';

export interface NodeOptions extends Options {
[key: string]: any;
/** Callback that is executed when a fatal global error occurs. */

@@ -15,2 +16,8 @@ onFatalError?(error: Error): void;

shutdownTimeout?: number;
/** Set a HTTP proxy that should be used for outbound requests. */
httpProxy?: string;
/** Set a HTTPS proxy that should be used for outbound requests. */
httpsProxy?: string;
/** HTTPS proxy certificates path */
caCerts?: string;
}

@@ -17,0 +24,0 @@ /** The Sentry Node SDK Backend. */

28

dist/backend.js

@@ -8,3 +8,3 @@ "use strict";

var object_1 = require("@sentry/utils/object");
var md5 = require("md5");
var crypto_1 = require("crypto");
var parsers_1 = require("./parsers");

@@ -34,3 +34,7 @@ var transports_1 = require("./transports");

scope.setExtra('__serialized__', object_1.limitObjectDepthToSize(exception));
scope.setFingerprint([md5(keys_1.join(''))]);
scope.setFingerprint([
crypto_1.createHash('md5')
.update(keys_1.join(''))
.digest('hex'),
]);
});

@@ -97,4 +101,4 @@ ex = (hint && hint.syntheticException) || new Error(message);

return tslib_1.__awaiter(this, void 0, void 0, function () {
var dsn, transportOptions;
return tslib_1.__generator(this, function (_a) {
var e_1, _a, dsn, transportOptions, clientOptions, clientOptions_1, clientOptions_1_1, option;
return tslib_1.__generator(this, function (_b) {
if (!this.options.dsn) {

@@ -108,2 +112,18 @@ throw new core_1.SentryError('Cannot sendEvent without a valid DSN');

transportOptions = this.options.transportOptions ? this.options.transportOptions : { dsn: dsn };
clientOptions = ['httpProxy', 'httpsProxy', 'caCerts'];
try {
for (clientOptions_1 = tslib_1.__values(clientOptions), clientOptions_1_1 = clientOptions_1.next(); !clientOptions_1_1.done; clientOptions_1_1 = clientOptions_1.next()) {
option = clientOptions_1_1.value;
if (this.options[option]) {
transportOptions[option] = transportOptions[option] || this.options[option];
}
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (clientOptions_1_1 && !clientOptions_1_1.done && (_a = clientOptions_1.return)) _a.call(clientOptions_1);
}
finally { if (e_1) throw e_1.error; }
}
this.transport = this.options.transport

@@ -110,0 +130,0 @@ ? new this.options.transport({ dsn: dsn })

2

dist/handlers.js

@@ -179,3 +179,3 @@ "use strict";

}
core_1.getCurrentHub().captureException(error, { originalException: error });
core_1.captureException(error);
next(error);

@@ -182,0 +182,0 @@ };

@@ -50,1 +50,7 @@ import { Integrations as CoreIntegrations } from '@sentry/core';

export declare function init(options?: NodeOptions): void;
/**
* This is the getter for lastEventId.
*
* @returns The last event id of a captured event.
*/
export declare function lastEventId(): string | undefined;

@@ -77,2 +77,11 @@ "use strict";

exports.init = init;
/**
* This is the getter for lastEventId.
*
* @returns The last event id of a captured event.
*/
function lastEventId() {
return core_1.getCurrentHub().lastEventId();
}
exports.lastEventId = lastEventId;
//# sourceMappingURL=sdk.js.map

@@ -17,3 +17,5 @@ /// <reference types="node" />

/** The Agent used for corresponding transport */
protected client: http.Agent | https.Agent | undefined;
module?: HTTPRequest;
/** The Agent used for corresponding transport */
client?: http.Agent | https.Agent;
/** Create instance and set this.dsn */

@@ -20,0 +22,0 @@ constructor(options: TransportOptions);

@@ -7,2 +7,3 @@ "use strict";

var object_1 = require("@sentry/utils/object");
var fs = require("fs");
var version_1 = require("../version");

@@ -20,3 +21,3 @@ /** Base Transport class implementation */

var dsn = this.api.getDsn();
return {
var options = {
agent: this.client,

@@ -30,2 +31,6 @@ headers: headers,

};
if (this.options.caCerts) {
options.ca = fs.readFileSync(this.options.caCerts);
}
return options;
};

@@ -32,0 +37,0 @@ /** JSDoc */

import { SentryEvent, SentryResponse, TransportOptions } from '@sentry/types';
import { BaseTransport } from './base';
/** /** Node http module transport */
/** Node http module transport */
export declare class HTTPTransport extends BaseTransport {

@@ -5,0 +5,0 @@ options: TransportOptions;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var core_1 = require("@sentry/core");
var http = require("http");
var HttpsProxyAgent = require("https-proxy-agent");
var base_1 = require("./base");
/** /** Node http module transport */
/** Node http module transport */
var HTTPTransport = /** @class */ (function (_super) {

@@ -13,3 +15,8 @@ tslib_1.__extends(HTTPTransport, _super);

_this.options = options;
_this.client = new http.Agent({ keepAlive: true, maxSockets: 100 });
_this.module = http;
var proxy = options.httpProxy || process.env.http_proxy;
_this.client = proxy
? // tslint:disable-next-line:no-unsafe-any
new HttpsProxyAgent(proxy)
: new http.Agent({ keepAlive: true, maxSockets: 100 });
return _this;

@@ -23,3 +30,6 @@ }

return tslib_1.__generator(this, function (_a) {
return [2 /*return*/, this.sendWithModule(http, event)];
if (!this.module) {
throw new core_1.SentryError('No module available in HTTPTransport');
}
return [2 /*return*/, this.sendWithModule(this.module, event)];
});

@@ -26,0 +36,0 @@ });

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var core_1 = require("@sentry/core");
var https = require("https");
var HttpsProxyAgent = require("https-proxy-agent");
var base_1 = require("./base");

@@ -13,3 +15,8 @@ /** Node https module transport */

_this.options = options;
_this.client = new https.Agent({ keepAlive: true, maxSockets: 100 });
_this.module = https;
var proxy = options.httpsProxy || options.httpProxy || process.env.https_proxy || process.env.http_proxy;
_this.client = proxy
? // tslint:disable-next-line:no-unsafe-any
new HttpsProxyAgent(proxy)
: new https.Agent({ keepAlive: true, maxSockets: 100 });
return _this;

@@ -23,3 +30,6 @@ }

return tslib_1.__generator(this, function (_a) {
return [2 /*return*/, this.sendWithModule(https, event)];
if (!this.module) {
throw new core_1.SentryError('No module available in HTTPSTransport');
}
return [2 /*return*/, this.sendWithModule(this.module, event)];
});

@@ -26,0 +36,0 @@ });

export declare const SDK_NAME = "sentry.javascript.node";
export declare const SDK_VERSION = "4.3.4";
export declare const SDK_VERSION = "4.4.0";
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SDK_NAME = 'sentry.javascript.node';
exports.SDK_VERSION = '4.3.4';
exports.SDK_VERSION = '4.4.0';
//# sourceMappingURL=version.js.map
{
"name": "@sentry/node",
"version": "4.3.4",
"version": "4.4.0",
"description": "Offical Sentry SDK for Node.js",

@@ -18,10 +18,10 @@ "repository": "git://github.com/getsentry/raven-js.git",

"dependencies": {
"@sentry/core": "4.3.4",
"@sentry/hub": "4.3.4",
"@sentry/types": "4.3.4",
"@sentry/utils": "4.3.4",
"@sentry/core": "4.4.0",
"@sentry/hub": "4.4.0",
"@sentry/types": "4.4.0",
"@sentry/utils": "4.4.0",
"@types/stack-trace": "0.0.29",
"cookie": "0.3.1",
"https-proxy-agent": "^2.2.1",
"lsmod": "1.0.0",
"md5": "2.2.1",
"stack-trace": "0.0.10",

@@ -32,3 +32,3 @@ "tslib": "^1.9.3"

"@types/cookie": "0.3.1",
"@types/md5": "2.1.32",
"@types/node": "^10.12.10",
"express": "^4.16.4",

@@ -75,3 +75,4 @@ "jest": "^22.4.3",

"ts-jest": {
"tsConfigFile": "./tsconfig.json"
"tsConfig": "./tsconfig.json",
"diagnostics": false
}

@@ -78,0 +79,0 @@ }

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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