🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@n8n/errors

Package Overview
Dependencies
Maintainers
6
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@n8n/errors - npm Package Compare versions

Comparing version
0.3.0
to
0.4.0
+9
dist/application.error.d.ts
import type { Event } from '@sentry/node';
import type { ErrorLevel, ReportingOptions } from './types';
export declare class ApplicationError extends Error {
level: ErrorLevel;
readonly tags: NonNullable<Event['tags']>;
readonly extra?: Event['extra'];
readonly packageName?: string;
constructor(message: string, { level, tags, extra, ...rest }?: ErrorOptions & ReportingOptions);
}
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ApplicationError = void 0;
const callsites_1 = __importDefault(require("callsites"));
class ApplicationError extends Error {
constructor(message, { level, tags = {}, extra, ...rest } = {}) {
super(message, rest);
this.level = level ?? 'error';
this.tags = tags;
this.extra = extra;
try {
const filePath = (0, callsites_1.default)()[2].getFileName() ?? '';
const match = /packages\/([^\/]+)\//.exec(filePath)?.[1];
if (match)
this.tags.packageName = match;
}
catch { }
}
}
exports.ApplicationError = ApplicationError;
//# sourceMappingURL=application.error.js.map
{"version":3,"file":"application.error.js","sourceRoot":"","sources":["../src/application.error.ts"],"names":[],"mappings":";;;;;;AACA,0DAAkC;AAOlC,MAAa,gBAAiB,SAAQ,KAAK;IAS1C,YACC,OAAe,EACf,EAAE,KAAK,EAAE,IAAI,GAAG,EAAE,EAAE,KAAK,EAAE,GAAG,IAAI,KAAsC,EAAE;QAE1E,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QACrB,IAAI,CAAC,KAAK,GAAG,KAAK,IAAI,OAAO,CAAC;QAC9B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QAEnB,IAAI,CAAC;YACJ,MAAM,QAAQ,GAAG,IAAA,mBAAS,GAAE,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,IAAI,EAAE,CAAC;YAEpD,MAAM,KAAK,GAAG,sBAAsB,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;YAEzD,IAAI,KAAK;gBAAE,IAAI,CAAC,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;QAE1C,CAAC;QAAC,MAAM,CAAC,CAAA,CAAC;IACX,CAAC;CACD;AA3BD,4CA2BC"}
import type { Event } from '@sentry/node';
export type ErrorLevel = 'fatal' | 'error' | 'warning' | 'info';
export type ErrorTags = NonNullable<Event['tags']>;
export type ReportingOptions = {
shouldReport?: boolean;
shouldBeLogged?: boolean;
level?: ErrorLevel;
tags?: ErrorTags;
extra?: Event['extra'];
executionId?: string;
};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=types.js.map
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
+2
-1

@@ -1,1 +0,2 @@

export {};
export { ApplicationError } from './application.error';
export * from './types';
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ApplicationError = void 0;
var application_error_1 = require("./application.error");
Object.defineProperty(exports, "ApplicationError", { enumerable: true, get: function () { return application_error_1.ApplicationError; } });
__exportStar(require("./types"), exports);
//# sourceMappingURL=index.js.map

@@ -1,1 +0,1 @@

{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,yDAAuD;AAA9C,qHAAA,gBAAgB,OAAA;AACzB,0CAAwB"}
{
"name": "@n8n/errors",
"version": "0.3.0",
"version": "0.4.0",
"main": "dist/index.js",

@@ -9,8 +9,12 @@ "module": "src/index.ts",

"dist/**/*",
"LICENSE_EE.md",
"LICENSE.md"
"LICENSE.md",
"LICENSE_EE.md"
],
"devDependencies": {
"@sentry/node": "^9.42.1",
"@n8n/typescript-config": "1.3.0"
},
"dependencies": {
"callsites": "3.1.0"
},
"license": "SEE LICENSE IN LICENSE.md",

@@ -17,0 +21,0 @@ "homepage": "https://n8n.io",

Sorry, the diff of this file is not supported yet