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

@ips-hosting/pino-sentry-stream

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ips-hosting/pino-sentry-stream - npm Package Compare versions

Comparing version 1.0.2 to 2.0.0

6

dist/index.d.ts
/// <reference types="node" />
import { Transform } from 'stream';
import * as Sentry from '@sentry/node';
import type * as Sentry from '@sentry/node';
export declare class ParsedSentryError extends Error {

@@ -8,3 +8,3 @@ constructor(message: string, stack?: string, type?: string);

export declare type SeverityMap = {
[value in string | number]: Sentry.Severity;
[value in string | number]: Sentry.SeverityLevel;
};

@@ -24,5 +24,5 @@ export declare const DefaultSeverityMap: SeverityMap;

scope: Sentry.Scope;
severity: Sentry.Severity;
severity: Sentry.SeverityLevel;
}) => void | false;
}
export declare function pinoSentryStream({ sentry, severityMap, callback, }: PinoSentryStreamOptions): Transform;
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.pinoSentryStream = exports.DefaultSeverityMap = exports.ParsedSentryError = void 0;
const stream_1 = require("stream");
const Sentry = __importStar(require("@sentry/node"));
class ParsedSentryError extends Error {

@@ -36,8 +16,8 @@ constructor(message, stack, type) {

exports.DefaultSeverityMap = {
10: Sentry.Severity.Debug,
20: Sentry.Severity.Debug,
30: Sentry.Severity.Info,
40: Sentry.Severity.Warning,
50: Sentry.Severity.Error,
60: Sentry.Severity.Fatal, // fatal
10: 'debug',
20: 'debug',
30: 'info',
40: 'warning',
50: 'error',
60: 'fatal',
};

@@ -53,3 +33,3 @@ function pinoSentryStream({ sentry, severityMap, callback, }) {

severityMap ?? (severityMap = exports.DefaultSeverityMap);
const severity = severityMap[parsedLog.level] ?? Sentry.Severity.Info;
const severity = severityMap[parsedLog.level] ?? 'info';
if (callback) {

@@ -78,4 +58,3 @@ if (callback({ log: parsedLog, scope, severity }) === false) {

let capturedException = false;
if (severity === Sentry.Severity.Error ||
severity === Sentry.Severity.Fatal) {
if (severity === 'error' || severity === 'fatal') {
if (typeof parsedLog.stack === 'string') {

@@ -82,0 +61,0 @@ // The error object was given directly to a pino logger.

{
"name": "@ips-hosting/pino-sentry-stream",
"version": "1.0.2",
"description": "A pino stream to automatically pass errors to Sentry.",
"license": "MIT",
"scripts": {
"build": "tsc --project ./tsconfig.json",
"tsc:check": "tsc --project ./tsconfig.json --noEmit",
"dev": "nodemon",
"start": "node ./dist/index.js",
"lint": "eslint \"src/**/*.ts\"",
"lint:fix": "eslint --fix \"src/**/*.ts\"",
"test": "yarn tsc:check",
"prepack": "yarn build"
},
"files": [
"dist/**/*.js",
"dist/**/*.js.map",
"dist/**/*.d.ts"
],
"main": "dist/index.js",
"types": "./dist/index.d.ts",
"sideEffects": false,
"publishConfig": {
"access": "public"
},
"peerDependencies": {
"@sentry/node": "^6.0.0"
},
"devDependencies": {
"@semantic-release/changelog": "5.0.1",
"@semantic-release/git": "9.0.0",
"@semantic-release/npm": "7.1.1",
"@sentry/node": "6.2.5",
"@tsconfig/node14": "1.0.0",
"@types/node": "14.14.37",
"@types/semantic-release": "17.2.0",
"@typescript-eslint/eslint-plugin": "4.21.0",
"@typescript-eslint/parser": "4.21.0",
"@typescript-eslint/typescript-estree": "4.21.0",
"dotenv": "8.2.0",
"eslint": "7.24.0",
"eslint-config-prettier": "8.1.0",
"eslint-plugin-prettier": "3.3.1",
"nodemon": "2.0.7",
"prettier": "2.2.1",
"semantic-release": "17.4.2",
"ts-node": "9.1.1",
"typescript": "4.2.4"
},
"release": {
"branches": [
"main",
{
"name": "next",
"prelease": true
}
],
"preset": "angular",
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
"@semantic-release/npm",
"@semantic-release/github",
"@semantic-release/git"
]
}
"name": "@ips-hosting/pino-sentry-stream",
"version": "2.0.0",
"description": "A pino stream to automatically pass errors to Sentry.",
"license": "MIT",
"scripts": {
"build": "tsc --project ./tsconfig.json",
"tsc:check": "tsc --project ./tsconfig.json --noEmit",
"dev": "nodemon",
"start": "node ./dist/index.js",
"lint": "eslint \"src/**/*.ts\"",
"lint:fix": "eslint --fix \"src/**/*.ts\"",
"test": "yarn tsc:check",
"prepack": "yarn build"
},
"files": [
"dist/**/*.js",
"dist/**/*.js.map",
"dist/**/*.d.ts"
],
"main": "dist/index.js",
"types": "./dist/index.d.ts",
"sideEffects": false,
"publishConfig": {
"access": "public"
},
"peerDependencies": {
"@sentry/node": "^7.0.0"
},
"devDependencies": {
"@semantic-release/changelog": "6.0.1",
"@semantic-release/git": "10.0.1",
"@semantic-release/npm": "9.0.1",
"@sentry/node": "7.0.0",
"@tsconfig/node14": "1.0.1",
"@types/node": "16.11.38",
"@types/semantic-release": "17.2.3",
"@typescript-eslint/eslint-plugin": "5.27.0",
"@typescript-eslint/parser": "5.27.0",
"@typescript-eslint/typescript-estree": "5.27.0",
"dotenv": "16.0.1",
"eslint": "8.17.0",
"eslint-config-prettier": "8.5.0",
"eslint-plugin-prettier": "4.0.0",
"nodemon": "2.0.16",
"prettier": "2.6.2",
"semantic-release": "19.0.2",
"ts-node": "10.8.1",
"typescript": "4.7.3"
},
"release": {
"branches": [
"main",
{
"name": "next",
"prerelease": true
}
],
"preset": "angular",
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
"@semantic-release/npm",
"@semantic-release/github",
"@semantic-release/git"
]
}
}

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