@xylabs/log
Advanced tools
Comparing version 4.1.0 to 4.2.0
@@ -0,1 +1,2 @@ | ||
import type Rollbar from 'rollbar'; | ||
export interface LogConfig { | ||
@@ -5,3 +6,3 @@ commitHash?: string; | ||
payload?: Record<string, unknown>; | ||
rollbarToken?: string; | ||
rollbar?: Rollbar; | ||
} | ||
@@ -8,0 +9,0 @@ export declare class Log { |
{ | ||
"name": "@xylabs/log", | ||
"version": "4.1.0", | ||
"version": "4.2.0", | ||
"description": "Base functionality used throughout XY Labs TypeScript/JavaScript libraries", | ||
@@ -44,9 +44,9 @@ "keywords": [ | ||
"devDependencies": { | ||
"@xylabs/ts-scripts-yarn3": "^4.1.0", | ||
"@xylabs/tsconfig": "^4.1.0", | ||
"@xylabs/ts-scripts-yarn3": "^4.2.0", | ||
"@xylabs/tsconfig": "^4.2.0", | ||
"rollbar": "^2.26.4", | ||
"typescript": "^5.6.2" | ||
"typescript": "^5.6.3" | ||
}, | ||
"peerDependencies": { | ||
"rollbar": "^2.26.4" | ||
"rollbar": "^2" | ||
}, | ||
@@ -53,0 +53,0 @@ "peerDependenciesMeta": { |
@@ -1,2 +0,2 @@ | ||
import Rollbar from 'rollbar' | ||
import type Rollbar from 'rollbar' | ||
@@ -7,3 +7,3 @@ export interface LogConfig { | ||
payload?: Record<string, unknown> | ||
rollbarToken?: string | ||
rollbar?: Rollbar | ||
} | ||
@@ -17,26 +17,3 @@ | ||
this.devMode = config.devMode ?? false | ||
if (config.rollbarToken) { | ||
this.rollbar = new Rollbar({ | ||
accessToken: config.rollbarToken, | ||
captureUncaught: true, | ||
captureUnhandledRejections: true, | ||
codeVersion: config.commitHash, | ||
code_version: config.commitHash, | ||
payload: { | ||
client: { | ||
javascript: { | ||
code_version: config.commitHash, | ||
guess_uncaught_frames: true, | ||
source_map_enabled: true, | ||
}, | ||
}, | ||
codeVersion: config.commitHash, | ||
code_version: config.commitHash, | ||
environment: this.devMode ? 'development' : 'production', | ||
...config.payload, | ||
}, | ||
sendConfig: true, | ||
}) | ||
} | ||
this.rollbar = config.rollbar | ||
} | ||
@@ -43,0 +20,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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16394
119