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

@arkitektum/client-logger

Package Overview
Dependencies
Maintainers
3
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@arkitektum/client-logger - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

11

lib/cjs/functions.js

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

function getErrorDataFromError(error, consumer) {
var _a, _b;
var errorData = getErrorDataFromStack(error);

@@ -58,3 +59,4 @@ if (consumer !== null && errorData !== null) {

return {
message: error.message,
message: error === null || error === void 0 ? void 0 : error.message,
stackTrace: (error === null || error === void 0 ? void 0 : error.message) ? (_a = new Error(error === null || error === void 0 ? void 0 : error.message)) === null || _a === void 0 ? void 0 : _a.stack : null,
originalPosition: originalPosition

@@ -64,3 +66,4 @@ };

return {
message: error.message,
message: error === null || error === void 0 ? void 0 : error.message,
stackTrace: (error === null || error === void 0 ? void 0 : error.message) ? (_b = new Error(error === null || error === void 0 ? void 0 : error.message)) === null || _b === void 0 ? void 0 : _b.stack : null,
originalPosition: {

@@ -74,3 +77,3 @@ source: errorData === null || errorData === void 0 ? void 0 : errorData.source,

exports.getErrorDataFromError = getErrorDataFromError;
function getErrorDataFromSourceMap(event, source, line, column, consumer) {
function getErrorDataFromSourceMap(event, source, line, column, error, consumer) {
if (consumer !== null && line !== undefined && column !== undefined) {

@@ -80,2 +83,3 @@ var originalPosition = consumer.originalPositionFor({ line: line, column: column });

message: event.toString(),
stackTrace: error === null || error === void 0 ? void 0 : error.stack,
originalPosition: originalPosition

@@ -86,2 +90,3 @@ };

message: event.toString(),
stackTrace: error === null || error === void 0 ? void 0 : error.stack,
originalPosition: {

@@ -88,0 +93,0 @@ column: column,

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

return __generator(this, function (_a) {
errorData = (0, functions_1.getErrorDataFromSourceMap)(event, source, line, column, consumer);
errorData = (0, functions_1.getErrorDataFromSourceMap)(event, source, line, column, error, consumer);
logMessages = [errorData];

@@ -145,3 +145,3 @@ clientLogger.postLogData(logMessages);

};
ClientLogger.prototype.getLoggMessageFromError = function (error, logMessageProps) {
ClientLogger.prototype.getLogMessageFromError = function (error, logMessageProps) {
return __awaiter(this, void 0, void 0, function () {

@@ -148,0 +148,0 @@ var consumer, _a, errorData;

export declare function getErrorDataFromError(error: Error, consumer: any): {
message: string;
stackTrace: string;
originalPosition: any;
};
export declare function getErrorDataFromSourceMap(event: Event | string, source?: string, line?: number, column?: number, consumer?: any): {
export declare function getErrorDataFromSourceMap(event: Event | string, source?: string, line?: number, column?: number, error?: Error, consumer?: any): {
message: string;
stackTrace: string;
originalPosition: any;
};

@@ -14,3 +14,3 @@ interface LogMessage {

path?: string;
stacktrace?: string;
stackTrace?: string;
statuscode?: string;

@@ -28,4 +28,5 @@ correlationId?: string;

static create(logApiUrl: string, sourceMapUrl: string, appName: string): Promise<ClientLogger>;
getLoggMessageFromError(error: Error, logMessageProps: LogMessage): Promise<{
getLogMessageFromError(error: Error, logMessageProps: LogMessage): Promise<{
message: string;
stackTrace: string;
originalPosition: any;

@@ -37,3 +38,2 @@ appName?: string;

path?: string;
stacktrace?: string;
statuscode?: string;

@@ -40,0 +40,0 @@ correlationId?: string;

{
"name": "@arkitektum/client-logger",
"version": "1.0.1",
"version": "1.0.2",
"description": "",

@@ -5,0 +5,0 @@ "types": "./lib/cjs/types/index.d.ts",

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