@zthun/lumberjacky-sentry 4.0.3 → 4.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,50 +1,33 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
-
5
- const lumberjackyLog = require('@zthun/lumberjacky-log');
6
-
7
- function _define_property(obj, key, value) {
8
- if (key in obj) {
9
- Object.defineProperty(obj, key, {
10
- value: value,
11
- enumerable: true,
12
- configurable: true,
13
- writable: true
14
- });
15
- } else {
16
- obj[key] = value;
17
- }
18
- return obj;
19
- }
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ let _zthun_lumberjacky_log = require("@zthun/lumberjacky-log");
3
+ //#region src/logger/logger-sentry.mts
20
4
  /**
21
- * A logger that logs to sentry (https://sentry.io)
22
- */ class ZLoggerSentry {
23
- log(entry) {
24
- this._client.captureEvent({
25
- message: entry.message,
26
- level: ZLoggerSentry.SeverityMap[entry.level],
27
- extra: {
28
- context: entry.context
29
- }
30
- });
31
- }
32
- /**
33
- * Initializes a new instance of this object.
34
- *
35
- * @param _client -
36
- * The sentry client to log to.
37
- */ constructor(_client){
38
- _define_property(this, "_client", void 0);
39
- this._client = _client;
40
- }
41
- }
42
- _define_property(ZLoggerSentry, "SeverityMap", Object.freeze({
43
- [lumberjackyLog.ZLogLevel.CATASTROPHE]: "fatal",
44
- [lumberjackyLog.ZLogLevel.ERROR]: "error",
45
- [lumberjackyLog.ZLogLevel.WARNING]: "warning",
46
- [lumberjackyLog.ZLogLevel.INFO]: "info"
47
- }));
48
-
5
+ * A logger that logs to sentry (https://sentry.io)
6
+ */ var ZLoggerSentry = class ZLoggerSentry {
7
+ _client;
8
+ static SeverityMap = Object.freeze({
9
+ [_zthun_lumberjacky_log.ZLogLevel.CATASTROPHE]: "fatal",
10
+ [_zthun_lumberjacky_log.ZLogLevel.ERROR]: "error",
11
+ [_zthun_lumberjacky_log.ZLogLevel.WARNING]: "warning",
12
+ [_zthun_lumberjacky_log.ZLogLevel.INFO]: "info"
13
+ });
14
+ /**
15
+ * Initializes a new instance of this object.
16
+ *
17
+ * @param _client -
18
+ * The sentry client to log to.
19
+ */ constructor(_client) {
20
+ this._client = _client;
21
+ }
22
+ log(entry) {
23
+ this._client.captureEvent({
24
+ message: entry.message,
25
+ level: ZLoggerSentry.SeverityMap[entry.level],
26
+ extra: { context: entry.context }
27
+ });
28
+ }
29
+ };
30
+ //#endregion
49
31
  exports.ZLoggerSentry = ZLoggerSentry;
50
- //# sourceMappingURL=index.cjs.map
32
+
33
+ //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../src/logger/logger-sentry.mts"],"sourcesContent":["import type { Client, SeverityLevel } from \"@sentry/core\";\nimport type { IZLogEntry, IZLogger } from \"@zthun/lumberjacky-log\";\nimport { ZLogLevel } from \"@zthun/lumberjacky-log\";\n\n/**\n * A logger that logs to sentry (https://sentry.io)\n */\nexport class ZLoggerSentry implements IZLogger {\n private static readonly SeverityMap: Record<ZLogLevel, SeverityLevel> =\n Object.freeze({\n [ZLogLevel.CATASTROPHE]: \"fatal\",\n [ZLogLevel.ERROR]: \"error\",\n [ZLogLevel.WARNING]: \"warning\",\n [ZLogLevel.INFO]: \"info\",\n });\n\n /**\n * Initializes a new instance of this object.\n *\n * @param _client -\n * The sentry client to log to.\n */\n public constructor(private _client: Client) {}\n\n public log(entry: IZLogEntry): void {\n this._client.captureEvent({\n message: entry.message,\n level: ZLoggerSentry.SeverityMap[entry.level],\n extra: {\n context: entry.context,\n },\n });\n }\n}\n"],"names":["ZLoggerSentry","log","entry","_client","captureEvent","message","level","SeverityMap","extra","context","Object","freeze","ZLogLevel","CATASTROPHE","ERROR","WARNING","INFO"],"mappings":";;;;;;;;;;;;;;;;;;;AAIA;;AAEC,IACM,MAAMA,aAAAA,CAAAA;AAiBJC,IAAAA,GAAAA,CAAIC,KAAiB,EAAQ;AAClC,QAAA,IAAI,CAACC,OAAO,CAACC,YAAY,CAAC;AACxBC,YAAAA,OAAAA,EAASH,MAAMG,OAAO;AACtBC,YAAAA,KAAAA,EAAON,aAAAA,CAAcO,WAAW,CAACL,KAAAA,CAAMI,KAAK,CAAC;YAC7CE,KAAAA,EAAO;AACLC,gBAAAA,OAAAA,EAASP,MAAMO;AACjB;AACF,SAAA,CAAA;AACF,IAAA;AAhBA;;;;;MAMA,WAAA,CAAmB,OAAuB,CAAE;;aAAjBN,OAAAA,GAAAA,OAAAA;AAAkB,IAAA;AAW/C;AAzBE,gBAAA,CADWH,aAAAA,EACaO,aAAAA,EACtBG,MAAAA,CAAOC,MAAM,CAAC;IACZ,CAACC,wBAAAA,CAAUC,WAAW,GAAG,OAAA;IACzB,CAACD,wBAAAA,CAAUE,KAAK,GAAG,OAAA;IACnB,CAACF,wBAAAA,CAAUG,OAAO,GAAG,SAAA;IACrB,CAACH,wBAAAA,CAAUI,IAAI,GAAG;AACpB,CAAA,CAAA,CAAA;;;;"}
1
+ {"version":3,"file":"index.cjs","names":["ZLogLevel","ZLoggerSentry","SeverityMap","Object","freeze","CATASTROPHE","ERROR","WARNING","INFO","_client","log","entry","captureEvent","message","level","extra","context"],"sources":["../src/logger/logger-sentry.mts"],"sourcesContent":["import type { Client, SeverityLevel } from \"@sentry/core\";\nimport type { IZLogEntry, IZLogger } from \"@zthun/lumberjacky-log\";\nimport { ZLogLevel } from \"@zthun/lumberjacky-log\";\n\n/**\n * A logger that logs to sentry (https://sentry.io)\n */\nexport class ZLoggerSentry implements IZLogger {\n private static readonly SeverityMap: Record<ZLogLevel, SeverityLevel> =\n Object.freeze({\n [ZLogLevel.CATASTROPHE]: \"fatal\",\n [ZLogLevel.ERROR]: \"error\",\n [ZLogLevel.WARNING]: \"warning\",\n [ZLogLevel.INFO]: \"info\",\n });\n\n /**\n * Initializes a new instance of this object.\n *\n * @param _client -\n * The sentry client to log to.\n */\n public constructor(private _client: Client) {}\n\n public log(entry: IZLogEntry): void {\n this._client.captureEvent({\n message: entry.message,\n level: ZLoggerSentry.SeverityMap[entry.level],\n extra: {\n context: entry.context,\n },\n });\n }\n}\n"],"mappings":";;;;;GAOA,IAAaC,gBAAb,MAAaA,cAAAA;;CACX,OAAwBC,cACtBC,OAAOC,OAAO;GACXJ,uBAAAA,UAAUK,cAAc;GACxBL,uBAAAA,UAAUM,QAAQ;GAClBN,uBAAAA,UAAUO,UAAU;GACpBP,uBAAAA,UAAUQ,OAAO;EACpB,CAAA;;;;;;IAQF,YAAmB,SAAyB;OAAjBC,UAAAA;;CAEpBC,IAAIC,OAAyB;AAClC,OAAKF,QAAQG,aAAa;GACxBC,SAASF,MAAME;GACfC,OAAOb,cAAcC,YAAYS,MAAMG;GACvCC,OAAO,EACLC,SAASL,MAAMK,SACjB;GACF,CAAA"}
package/dist/index.js CHANGED
@@ -1,46 +1,32 @@
1
- import { ZLogLevel } from '@zthun/lumberjacky-log';
2
-
3
- function _define_property(obj, key, value) {
4
- if (key in obj) {
5
- Object.defineProperty(obj, key, {
6
- value: value,
7
- enumerable: true,
8
- configurable: true,
9
- writable: true
10
- });
11
- } else {
12
- obj[key] = value;
13
- }
14
- return obj;
15
- }
1
+ import { ZLogLevel } from "@zthun/lumberjacky-log";
2
+ //#region src/logger/logger-sentry.mts
16
3
  /**
17
- * A logger that logs to sentry (https://sentry.io)
18
- */ class ZLoggerSentry {
19
- log(entry) {
20
- this._client.captureEvent({
21
- message: entry.message,
22
- level: ZLoggerSentry.SeverityMap[entry.level],
23
- extra: {
24
- context: entry.context
25
- }
26
- });
27
- }
28
- /**
29
- * Initializes a new instance of this object.
30
- *
31
- * @param _client -
32
- * The sentry client to log to.
33
- */ constructor(_client){
34
- _define_property(this, "_client", void 0);
35
- this._client = _client;
36
- }
37
- }
38
- _define_property(ZLoggerSentry, "SeverityMap", Object.freeze({
39
- [ZLogLevel.CATASTROPHE]: "fatal",
40
- [ZLogLevel.ERROR]: "error",
41
- [ZLogLevel.WARNING]: "warning",
42
- [ZLogLevel.INFO]: "info"
43
- }));
44
-
4
+ * A logger that logs to sentry (https://sentry.io)
5
+ */ var ZLoggerSentry = class ZLoggerSentry {
6
+ _client;
7
+ static SeverityMap = Object.freeze({
8
+ [ZLogLevel.CATASTROPHE]: "fatal",
9
+ [ZLogLevel.ERROR]: "error",
10
+ [ZLogLevel.WARNING]: "warning",
11
+ [ZLogLevel.INFO]: "info"
12
+ });
13
+ /**
14
+ * Initializes a new instance of this object.
15
+ *
16
+ * @param _client -
17
+ * The sentry client to log to.
18
+ */ constructor(_client) {
19
+ this._client = _client;
20
+ }
21
+ log(entry) {
22
+ this._client.captureEvent({
23
+ message: entry.message,
24
+ level: ZLoggerSentry.SeverityMap[entry.level],
25
+ extra: { context: entry.context }
26
+ });
27
+ }
28
+ };
29
+ //#endregion
45
30
  export { ZLoggerSentry };
46
- //# sourceMappingURL=index.js.map
31
+
32
+ //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/logger/logger-sentry.mts"],"sourcesContent":["import type { Client, SeverityLevel } from \"@sentry/core\";\nimport type { IZLogEntry, IZLogger } from \"@zthun/lumberjacky-log\";\nimport { ZLogLevel } from \"@zthun/lumberjacky-log\";\n\n/**\n * A logger that logs to sentry (https://sentry.io)\n */\nexport class ZLoggerSentry implements IZLogger {\n private static readonly SeverityMap: Record<ZLogLevel, SeverityLevel> =\n Object.freeze({\n [ZLogLevel.CATASTROPHE]: \"fatal\",\n [ZLogLevel.ERROR]: \"error\",\n [ZLogLevel.WARNING]: \"warning\",\n [ZLogLevel.INFO]: \"info\",\n });\n\n /**\n * Initializes a new instance of this object.\n *\n * @param _client -\n * The sentry client to log to.\n */\n public constructor(private _client: Client) {}\n\n public log(entry: IZLogEntry): void {\n this._client.captureEvent({\n message: entry.message,\n level: ZLoggerSentry.SeverityMap[entry.level],\n extra: {\n context: entry.context,\n },\n });\n }\n}\n"],"names":["ZLoggerSentry","log","entry","_client","captureEvent","message","level","SeverityMap","extra","context","Object","freeze","ZLogLevel","CATASTROPHE","ERROR","WARNING","INFO"],"mappings":";;;;;;;;;;;;;;;AAIA;;AAEC,IACM,MAAMA,aAAAA,CAAAA;AAiBJC,IAAAA,GAAAA,CAAIC,KAAiB,EAAQ;AAClC,QAAA,IAAI,CAACC,OAAO,CAACC,YAAY,CAAC;AACxBC,YAAAA,OAAAA,EAASH,MAAMG,OAAO;AACtBC,YAAAA,KAAAA,EAAON,aAAAA,CAAcO,WAAW,CAACL,KAAAA,CAAMI,KAAK,CAAC;YAC7CE,KAAAA,EAAO;AACLC,gBAAAA,OAAAA,EAASP,MAAMO;AACjB;AACF,SAAA,CAAA;AACF,IAAA;AAhBA;;;;;MAMA,WAAA,CAAmB,OAAuB,CAAE;;aAAjBN,OAAAA,GAAAA,OAAAA;AAAkB,IAAA;AAW/C;AAzBE,gBAAA,CADWH,aAAAA,EACaO,aAAAA,EACtBG,MAAAA,CAAOC,MAAM,CAAC;IACZ,CAACC,SAAAA,CAAUC,WAAW,GAAG,OAAA;IACzB,CAACD,SAAAA,CAAUE,KAAK,GAAG,OAAA;IACnB,CAACF,SAAAA,CAAUG,OAAO,GAAG,SAAA;IACrB,CAACH,SAAAA,CAAUI,IAAI,GAAG;AACpB,CAAA,CAAA,CAAA;;;;"}
1
+ {"version":3,"file":"index.js","names":["ZLogLevel","ZLoggerSentry","SeverityMap","Object","freeze","CATASTROPHE","ERROR","WARNING","INFO","_client","log","entry","captureEvent","message","level","extra","context"],"sources":["../src/logger/logger-sentry.mts"],"sourcesContent":["import type { Client, SeverityLevel } from \"@sentry/core\";\nimport type { IZLogEntry, IZLogger } from \"@zthun/lumberjacky-log\";\nimport { ZLogLevel } from \"@zthun/lumberjacky-log\";\n\n/**\n * A logger that logs to sentry (https://sentry.io)\n */\nexport class ZLoggerSentry implements IZLogger {\n private static readonly SeverityMap: Record<ZLogLevel, SeverityLevel> =\n Object.freeze({\n [ZLogLevel.CATASTROPHE]: \"fatal\",\n [ZLogLevel.ERROR]: \"error\",\n [ZLogLevel.WARNING]: \"warning\",\n [ZLogLevel.INFO]: \"info\",\n });\n\n /**\n * Initializes a new instance of this object.\n *\n * @param _client -\n * The sentry client to log to.\n */\n public constructor(private _client: Client) {}\n\n public log(entry: IZLogEntry): void {\n this._client.captureEvent({\n message: entry.message,\n level: ZLoggerSentry.SeverityMap[entry.level],\n extra: {\n context: entry.context,\n },\n });\n }\n}\n"],"mappings":";;;;GAOA,IAAaC,gBAAb,MAAaA,cAAAA;;CACX,OAAwBC,cACtBC,OAAOC,OAAO;GACXJ,UAAUK,cAAc;GACxBL,UAAUM,QAAQ;GAClBN,UAAUO,UAAU;GACpBP,UAAUQ,OAAO;EACpB,CAAA;;;;;;IAQF,YAAmB,SAAyB;OAAjBC,UAAAA;;CAEpBC,IAAIC,OAAyB;AAClC,OAAKF,QAAQG,aAAa;GACxBC,SAASF,MAAME;GACfC,OAAOb,cAAcC,YAAYS,MAAMG;GACvCC,OAAO,EACLC,SAASL,MAAMK,SACjB;GACF,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zthun/lumberjacky-sentry",
3
- "version": "4.0.3",
3
+ "version": "4.0.5",
4
4
  "description": "A standard lumberjacky log interface to interact with sentry.",
5
5
  "author": "Anthony Bonta",
6
6
  "license": "MIT",
@@ -31,16 +31,15 @@
31
31
  "access": "public"
32
32
  },
33
33
  "dependencies": {
34
- "@sentry/core": "^10.32.1",
35
- "@zthun/lumberjacky-log": "^4.0.3",
36
- "lodash": "^4.17.21"
34
+ "@sentry/core": "^10.47.0",
35
+ "@zthun/lumberjacky-log": "^4.0.5"
37
36
  },
38
37
  "devDependencies": {
39
- "@zthun/janitor-build-config": "^19.5.4",
40
- "@zthun/janitor-ts-config": "^19.5.3",
38
+ "@zthun/janitor-build-config": "^20.0.2",
39
+ "@zthun/janitor-ts-config": "^20.0.0",
41
40
  "typescript": "~5.9.3",
42
- "vite": "^7.3.0",
43
- "vitest": "^4.0.16",
41
+ "vite": "^8.0.3",
42
+ "vitest": "^4.1.2",
44
43
  "vitest-mock-extended": "^3.1.0"
45
44
  },
46
45
  "peerDependencies": {
@@ -64,5 +63,5 @@
64
63
  "dist"
65
64
  ],
66
65
  "sideEffects": false,
67
- "gitHead": "5463a8d88b52d1e7781e4f8c266f9496729246bb"
66
+ "gitHead": "04c207e6dcd5a19938bda163d8b9c3bd4d92b87c"
68
67
  }